Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: K8S IaC - GitOps with ArgoCD #2

Merged
merged 269 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
8e0b4ec
feat: move weave to kust foler
smuu Mar 22, 2023
b4b2caa
fix: editorconfig
smuu Mar 22, 2023
89522d8
feat: add prometheus
smuu Mar 23, 2023
df60d57
fix: net issues :/
tty47 Mar 23, 2023
0a809af
feat: move otel to obsy namespace
smuu Mar 23, 2023
c300985
feat: enable helm chart inflation
smuu Mar 23, 2023
9b012e4
feat: add loki and promtail
smuu Mar 23, 2023
d61b14b
fix: some changes on the names - tags - azs
tty47 Mar 23, 2023
92396d1
feat: remove redis
smuu Mar 23, 2023
1eaa22a
feat: move obsy from argo to kust
smuu Mar 23, 2023
25aa220
feat: rename folder
smuu Mar 23, 2023
674956d
feat: try different configuration
smuu Mar 23, 2023
c052d4f
Connectivity working
tty47 Mar 23, 2023
e134503
enable cni - argocd manage addonsg
tty47 Mar 23, 2023
51cfc98
undo - to _
tty47 Mar 23, 2023
6020a0a
cleanup commented code
tty47 Mar 24, 2023
5e213f8
fix: change name to root
tty47 Mar 24, 2023
a3e3f79
fix: wrong name
tty47 Mar 24, 2023
ee7e17e
feat: pending code to push
tty47 Mar 30, 2023
c6ec9a3
fix: app generation
tty47 Apr 27, 2023
c391e5a
refactor: split backend.tf file
tty47 Apr 27, 2023
6370417
feat: update apps
tty47 Apr 27, 2023
826b331
feat: add comments - remove branch
tty47 Apr 27, 2023
9611bdc
feat: add tooling app
tty47 Apr 27, 2023
95cd8a1
feat: add tooling app
tty47 Apr 27, 2023
68067aa
feat: add tooling app
tty47 Apr 27, 2023
602a006
feat: add tooling app
tty47 Apr 27, 2023
ecf7691
feat: split in folders
tty47 Apr 27, 2023
f7c09e1
feat: split in folders
tty47 Apr 27, 2023
50cca93
feat: add branch
tty47 Apr 28, 2023
07d3103
fix: change target revision value in root app
tty47 Apr 28, 2023
35b3ac4
fix: update tools path
tty47 Apr 28, 2023
aed6883
fix: update tools path
tty47 Apr 28, 2023
be55c63
fix: update tools path
tty47 Apr 28, 2023
ac8701d
fix: update tools path
tty47 Apr 28, 2023
ddd9ae4
fix: update tools path
tty47 Apr 28, 2023
3fced58
fix: update tools path
tty47 Apr 28, 2023
36fe48e
fix: update tools path
tty47 Apr 28, 2023
b073568
fix: update tools path
tty47 Apr 28, 2023
817e77e
fix: update tools path
tty47 Apr 28, 2023
a6b0953
fix: values file
tty47 Apr 28, 2023
4e6dca3
fix: values file
tty47 Apr 28, 2023
f09c811
fix: values file
tty47 Apr 28, 2023
74c9444
fix: values file
tty47 Apr 28, 2023
192a5ae
fix: values file
tty47 Apr 28, 2023
c4310d2
fix: values file
tty47 Apr 28, 2023
bb0175f
fix: values file
tty47 Apr 28, 2023
cd944c8
fix: values file
tty47 Apr 28, 2023
2b75556
fix: values file
tty47 Apr 28, 2023
0cdbbc2
fix: values file
tty47 Apr 28, 2023
7134653
fix: values file
tty47 Apr 28, 2023
f70bfde
fix: values file
tty47 Apr 28, 2023
43bef4d
fix: values file
tty47 Apr 28, 2023
483bc3b
fix: values file
tty47 Apr 28, 2023
c9339cc
fix: values file
tty47 Apr 28, 2023
3de6790
fix: values file
tty47 Apr 28, 2023
29a3cbf
fix: values file
tty47 Apr 28, 2023
65e515c
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
245746e
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
6bb0803
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
6aca92e
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
216d7b7
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
d571aee
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
21ae582
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
9279199
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
14da5c7
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
17995ba
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
c4423ac
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
d935b5a
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
bb0eb2e
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
26919b5
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
7dc8800
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
67f7860
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
b3ed847
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
8df5920
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
9fb02ab
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
1f7f136
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
87ab9ec
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
595b5e1
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
d14d67e
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
31f197a
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
6f51729
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
b0a32f1
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
f95d03c
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
2b062c9
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
812c475
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
1532761
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
3b28eda
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
8c5c672
feat: add influxdb for tg-sidecar
tty47 Apr 28, 2023
745bf5f
feat: fix influx
tty47 Apr 28, 2023
bd31931
feat: fix influx
tty47 Apr 28, 2023
8f6fcc0
feat: fix influx
tty47 Apr 28, 2023
5edee12
feat: fix influx
tty47 Apr 28, 2023
c99ba5b
try to use containerd sock
tty47 Apr 28, 2023
63f5657
undo containerd sock
tty47 Apr 28, 2023
55c4556
feat: upgrade versions - some tests
tty47 May 2, 2023
9260cf7
some updates and fixes - cluster can be created now
tty47 May 2, 2023
683ad25
specify ns
tty47 May 2, 2023
d33f0ae
feat: add argocd values file - more nodes/masters
tty47 May 3, 2023
f2ff399
feat: change ami zone to eu-west-1
tty47 May 3, 2023
88c41fc
feat: add comments
tty47 May 3, 2023
2d9cf0c
feat: add resources required when creating a cluster with kops
tty47 May 3, 2023
d04c4ec
feat: add efs helm chart installation
tty47 May 3, 2023
03962f1
feat: add context name
tty47 May 3, 2023
1e62320
feat: change tag
tty47 May 3, 2023
818a7c0
feat: comment not create sa
tty47 May 3, 2023
2b846f3
resources for efs
tty47 May 3, 2023
049ea50
feat: add rbac
tty47 May 4, 2023
3055f3f
feat: remove efs roles
tty47 May 4, 2023
fbab8ef
fix: issues with EFS - update AMI
tty47 May 4, 2023
73fb4b2
feat: add nfs client installation to the nodes
tty47 May 4, 2023
b68ca2a
feat: test create sa from helm
tty47 May 4, 2023
a57fdf5
feat: test create sa from helm need permission cannot get resource le…
tty47 May 4, 2023
ec2901c
remove comments
tty47 May 4, 2023
176d575
temp commented
tty47 May 4, 2023
a45b9df
temp commented
tty47 May 4, 2023
4dfd34d
feat: uncomment networking
tty47 May 4, 2023
5942e9b
update registry
tty47 May 4, 2023
8ea0b8a
update registry
tty47 May 4, 2023
c7518af
fix: cleanup ds_store
tty47 May 5, 2023
e5f2c88
feat: add delete tf resources + cluster
tty47 May 5, 2023
7258631
feat: create tf resoruces + add description
tty47 May 5, 2023
9d67884
feat: move ns to kustomization
tty47 May 5, 2023
ea88f68
feat: move ns to kustomization
tty47 May 5, 2023
9b4b598
feat: move ns to kustomization
tty47 May 5, 2023
9cbf33a
feat: move ns to kustomization
tty47 May 5, 2023
323698d
feat: comment influx observability out
tty47 May 5, 2023
3a0523e
feat: add grafana resources
tty47 May 5, 2023
ad4da44
feat: remove influxdb
tty47 May 5, 2023
6c904b0
feat: add grafana crdsb
tty47 May 5, 2023
8c51fcf
feat: add grafana crdsb
tty47 May 5, 2023
5ac2c07
feat: add grafana crdsb
tty47 May 5, 2023
95431fb
feat: add olm + grafana opeartor
tty47 May 5, 2023
0d9f1db
feat: add ns
tty47 May 5, 2023
7d8fbc4
feat: add ns
tty47 May 5, 2023
aabb631
cleanup comments
tty47 May 5, 2023
1a6e6a3
test another version
tty47 May 5, 2023
2ef9ebc
test another version
tty47 May 5, 2023
b983491
test another version
tty47 May 5, 2023
df5a7b7
test another version
tty47 May 5, 2023
9130e0e
move resources
tty47 May 5, 2023
2ede26e
add monitoring
tty47 May 8, 2023
e9478cc
add monitoring
tty47 May 8, 2023
09505cf
add monitoring
tty47 May 8, 2023
f1e3649
add monitoring
tty47 May 8, 2023
590d379
rename monitoring
tty47 May 8, 2023
452dba3
rename monitoring
tty47 May 8, 2023
3e8a227
add ns observability
tty47 May 8, 2023
8f8a5ca
add ns observability
tty47 May 8, 2023
9bb8cf7
add ns observability
tty47 May 8, 2023
c41cfe5
add crds
tty47 May 8, 2023
6964c91
add crds
tty47 May 8, 2023
edff363
feat: redis change name
tty47 May 8, 2023
0dbe1f7
feat: redis add ns
tty47 May 8, 2023
5b25311
feat: redis add ns
tty47 May 8, 2023
01f59f7
feat: redis add ns
tty47 May 8, 2023
4902ec0
feat: redis not specify ns
tty47 May 8, 2023
fc168f7
feat: redis add url
tty47 May 8, 2023
9bd4866
feat: redis add url
tty47 May 8, 2023
ec3e7e5
add permissions
tty47 May 8, 2023
620bf24
add permissions
tty47 May 8, 2023
da242ab
redis - bitnami
tty47 May 8, 2023
eb5ddac
redis - bitnami
tty47 May 8, 2023
8e31888
add influxdb charts - bitnami
tty47 May 8, 2023
c853aeb
add redis charts - bitnami
tty47 May 8, 2023
bbb5c4a
fix prometheus
tty47 May 8, 2023
329a806
add ns
tty47 May 8, 2023
4d9843f
add ns
tty47 May 8, 2023
ef2a661
change service to redis
tty47 May 8, 2023
9eede62
change service to redis
tty47 May 8, 2023
3d5ab8b
change img
tty47 May 8, 2023
0a54899
fix: lb permissions issues
tty47 May 8, 2023
07603c4
fix: crds names
tty47 May 8, 2023
f22da40
fix: crds names
tty47 May 8, 2023
c611228
fix: crds names
tty47 May 8, 2023
5b0bbec
fix: olm
tty47 May 8, 2023
d8e8cf4
fix: prometheus admission controller
tty47 May 8, 2023
b62aa70
add ns
tty47 May 8, 2023
efe1364
add system-tools
tty47 May 8, 2023
ba66f7a
add grafana-agent-operator
tty47 May 8, 2023
43021c1
add crd
tty47 May 8, 2023
d2cb5fb
add grafana-agent crd
tty47 May 8, 2023
f25406d
add grafana-agent crd - 2
tty47 May 8, 2023
5260087
add crds
tty47 May 8, 2023
92db4b8
add crd grafana-dashboard
tty47 May 8, 2023
4dfe321
add loki config
tty47 May 8, 2023
8ab922c
add storage class
tty47 May 8, 2023
6794f28
feat: add multi master in 3 pols, rename cluster - rename tf resources
tty47 May 9, 2023
3e915cf
fix: CNI to AWS-CNI
tty47 May 9, 2023
bfc7404
fix: CNI to AWS-CNI
tty47 May 9, 2023
dff2a19
fix: update telegraf-operator
tty47 May 9, 2023
77ca84e
fix: move to default nsl
tty47 May 9, 2023
af401f6
fix: comment telegraf - manual installation
tty47 May 9, 2023
1589f8f
fix: move telegraf to tools
tty47 May 9, 2023
ea06479
fix: install telegraf again
tty47 May 9, 2023
c127362
test: comment telegraf
tty47 May 10, 2023
9ed1e20
test: uncomment telegraf
tty47 May 10, 2023
8788334
refactor: cleanup not needed files
tty47 May 10, 2023
d0ed1d2
test: comment telegraf
tty47 May 10, 2023
991b9b9
test: comment telegraf
tty47 May 10, 2023
bab0289
test: comment telegraf
tty47 May 10, 2023
f632508
test: comment telegraf
tty47 May 10, 2023
e96ceab
add serversiderender to all
tty47 May 10, 2023
4ab549a
fix: commete
tty47 May 10, 2023
1c39a50
fix: values inline
tty47 May 10, 2023
d802edb
fix: values inline
tty47 May 10, 2023
90fd5f7
feat: use argocd app instead
tty47 May 10, 2023
8dcdd2d
feat: rename app
tty47 May 10, 2023
951d241
comment network
tty47 May 12, 2023
b54f4ae
comment telegraf
tty47 May 12, 2023
e783bf0
network resources updated
tty47 May 12, 2023
ede46e4
deactivate telegraf
tty47 May 12, 2023
90aacce
activate telegraf
tty47 May 12, 2023
8aecfa1
activate networking
tty47 May 12, 2023
6d30b18
refactor: cleanup
tty47 May 12, 2023
52eab64
use files for telegraf
tty47 May 12, 2023
653cc0a
use files for telegraf
tty47 May 12, 2023
b8a1d96
use files for telegraf
tty47 May 12, 2023
8883966
use telegraf
tty47 May 12, 2023
96440a8
feat: add clusterautoscaler - tags
tty47 May 12, 2023
ab1e08f
feat: add clusterautoscaler - increase number of nodes
tty47 May 15, 2023
236fbe6
feat: test versions
tty47 May 15, 2023
90a13e3
feat: update comments
tty47 May 15, 2023
7e9c44e
feat: cleanup not needed files
tty47 May 15, 2023
ef27331
feat: update variables
tty47 May 15, 2023
bb945e9
feat: cleanup not needed files
tty47 May 15, 2023
c64b2db
feat: cleanup not needed files
tty47 May 15, 2023
9d690f4
remove comments
tty47 May 15, 2023
62d0abf
docs: update readme + content
tty47 May 15, 2023
a353bfe
fix: blank spaces
tty47 May 15, 2023
efd129f
feat: resources increased
tty47 May 16, 2023
03023ad
feat: multus resources increased
tty47 May 16, 2023
a30dc8f
feat: increase timeouts
tty47 May 16, 2023
d9abd6c
fix: solve comments in the PR
tty47 May 17, 2023
4ae3a8f
feat: add more replicas to influxdb
tty47 May 17, 2023
57ff198
feat: add more replicas to influxdb
tty47 May 17, 2023
2fdd675
feat: update cidr - nodes - types
tty47 May 17, 2023
1fa0cea
feat: reduce number of instances on the infra pool
tty47 May 18, 2023
14192ed
feat: update to the latest version 900c23e
tty47 May 18, 2023
3f79931
feat: influxdb changes url
tty47 May 19, 2023
d57d166
feat: add autoscaler
tty47 May 22, 2023
263e22e
feat: update sync-service - increase timeouts
tty47 May 22, 2023
c61585a
feat: use latest commit for sync-service
tty47 May 22, 2023
652fd92
feat: update sync-service - increase timeouts
tty47 May 22, 2023
882e5b8
feat: update resources - running 6k nodes
tty47 May 22, 2023
7dd2a3b
feat: update resources
tty47 May 22, 2023
e10361f
feat: dont autosync
tty47 May 23, 2023
9fe440e
feat: undo autosync
tty47 May 23, 2023
d269b76
feat: move observability to default ns
tty47 May 24, 2023
41edeaa
feat: update redis svc
tty47 May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yaml,yml,tf}]
indent_size = 2
5 changes: 5 additions & 0 deletions argocd-root/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- root.yaml
22 changes: 22 additions & 0 deletions argocd-root/root.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# We generate this ArgoCD application with Terraform, but we keep it here as a workaround
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: root
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'argocd'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: argocd
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
34 changes: 34 additions & 0 deletions argocd/aws-applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: aws
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/celestiaorg/testground-infra.git
revision: jose/hackground-k8s-tf
directories:
- path: 'manifests/aws/*'
- path: manifests/aws/deactivated
exclude: true
template:
metadata:
name: 'aws-{{path[2]}}'
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'manifests/aws/{{path[2]}}'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: default
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
11 changes: 11 additions & 0 deletions argocd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: argocd

resources:
- aws-applicationset.yaml
- observability-applicationset.yaml
- testground-applicationset.yaml
- networking-applicationset.yaml
- testground-tools-applicationset.yaml
35 changes: 35 additions & 0 deletions argocd/networking-applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: networking
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/celestiaorg/testground-infra.git
revision: jose/hackground-k8s-tf
directories:
- path: 'manifests/networking/*'
- path: manifests/networking/deactivated
exclude: true
template:
metadata:
name: 'networking-{{path[2]}}'
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'manifests/networking/{{path[2]}}'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: default
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- ServerSideApply=true
35 changes: 35 additions & 0 deletions argocd/observability-applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: observability
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/celestiaorg/testground-infra.git
revision: jose/hackground-k8s-tf
directories:
- path: 'manifests/observability/*'
- path: manifests/observability/deactivated
exclude: true
template:
metadata:
name: 'observability-{{path[2]}}'
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'manifests/observability/{{path[2]}}'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: default
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- ServerSideApply=true
41 changes: 41 additions & 0 deletions argocd/telegraf-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: testground-tools-telegraf-operator
namespace: argocd
spec:
project: default
source:
chart: telegraf-operator
repoURL: https://helm.influxdata.com/
targetRevision: 1.3.11
helm:
releaseName: telegraf-operator
values: |
replicaCount: 2
classes:
data:
default: |
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
database = "testground"
resources:
limits:
cpu: 400m
memory: 256Mi
requests:
cpu: 50m
memory: 64Mi
hotReload: true
destination:
namespace: default
name: in-cluster
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- ServerSideApply=true
35 changes: 35 additions & 0 deletions argocd/testground-applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: testground
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/celestiaorg/testground-infra.git
revision: jose/hackground-k8s-tf
directories:
- path: 'manifests/testground/*'
- path: manifests/testground/deactivated
exclude: true
template:
metadata:
name: 'testground-{{path[2]}}'
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'manifests/testground/{{path[2]}}'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: default
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- ServerSideApply=true
35 changes: 35 additions & 0 deletions argocd/testground-tools-applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: testground-tools
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/celestiaorg/testground-infra.git
revision: jose/hackground-k8s-tf
directories:
- path: 'manifests/tooling/*'
- path: manifests/tooling/deactivated
exclude: true
template:
metadata:
name: 'testground-tools-{{path[2]}}'
spec:
project: default
source:
repoURL: https://github.com/celestiaorg/testground-infra.git
path: 'manifests/tooling/{{path[2]}}'
targetRevision: jose/hackground-k8s-tf
destination:
name: in-cluster
namespace: default
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- ServerSideApply=true
Binary file added docs/argocd_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/argocd_root_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions k8s/eks/bash/functions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# error log prep check
prep_log_dir(){
prep_log_dir(){
mkdir -p $real_path/log/$start-log/
mkdir -p $real_path/.cluster/
}
Expand Down Expand Up @@ -319,7 +319,7 @@ aws_get_vpc_id(){
vpc_id=$(aws ec2 describe-vpcs --region $REGION --filters Name=tag:Name,Values=eksctl-$CLUSTER_NAME-cluster/VPC |jq -r ".Vpcs[] | .VpcId")
}

aws_get_subnet_id(){
aws_get_subnet_id(){
aws_get_vpc_id
concat_availability_zone
upper_az=$(echo $AVAILABILITY_ZONE | tr '[:lower:]' '[:upper:]' | tr -d \-)
Expand All @@ -334,7 +334,7 @@ aws_get_sg_id(){
aws_create_efs_mount_point(){
aws efs create-mount-target --file-system-id $efs_fs_id --subnet-id $subnet_id --security-group $efs_sg_id --region $REGION
efs_dns=$efs_fs_id.efs.$REGION.amazonaws.com

}

create_cm_efs(){
Expand Down Expand Up @@ -365,10 +365,10 @@ aws_create_ebs(){
echo -e "EBS created with this volume ID: $ebs_volume\n"
else
echo "EBS already exists, skipping to the next step."
fi
fi
}

make_persistent_volume(){
make_persistent_volume(){
export TG_EBS_DATADIR_VOLUME_ID=$ebs_volume

EBS_PV=$(mktemp)
Expand All @@ -378,11 +378,11 @@ make_persistent_volume(){

helm_redis_add_repo(){
helm repo add bitnami https://charts.bitnami.com/bitnami
}
}

helm_infra_install_redis(){
helm install testground-infra-redis --set auth.enabled=false --set master.nodeSelector='testground.node.role.infra: "true"' bitnami/redis
}
}

helm_infra_install_influx_db(){
# We are using v2.6.1 of the helm chart, which has been evicted from the regular index.yaml.
Expand All @@ -402,7 +402,7 @@ metadata:
data:
.env.toml: |
["aws"]
region = "$REGION"
region = "$REGION"
[runners."cluster:k8s"]
run_timeout_min = 15
Expand Down Expand Up @@ -506,26 +506,26 @@ log(){
echo "========================"
echo "Log file generated with name $start-$CLUSTER_NAME.tar.gz"
echo -e "\n"
rm -rf $real_path/log/$start-log/
rm -rf $real_path/log/$start-log/
}

##### Functions below are used by the 'testground_uninstall.sh' script #######

remove_efs_mp_timer(){
remove_efs_mp_timer(){
efs_mp_state=available # setting the start value for the loop to consider
sleep 15
while [[ $efs_mp_state == available ]];do
while [[ $efs_mp_state == available ]];do
efs_mp_state=$(aws efs describe-mount-targets --file-system-id $efs --region $region | jq -r ".MountTargets[] | .LifeCycleState")
sleep 1
done
done
}

remove_efs_fs_timer(){
remove_efs_fs_timer(){
efs_fs_state=available # setting the start value for the loop to consider
while [[ $efs_fs_state == available ]];do
while [[ $efs_fs_state == available ]];do
efs_fs_state=$(aws efs describe-file-systems --region $region --file-system-id $efs | jq -r ".FileSystems[] | .LifeCycleState")
sleep 1
done
done
}

obtain_efs_id(){
Expand Down Expand Up @@ -621,12 +621,12 @@ cleanup(){
else
echo -e "Looks like the EBS you have specified ($ebs) does not exist in the selected region ($region).\nIt is possible that it has already been deleted.\n"
fi

if [ "$efs_deleted" == "true" ] && [ "$ebs_deleted" == "true" ] && [ "$cluster_deleted" == "true" ]
then
rm -f $real_path/.cluster/$cluster_name-$region.cs
echo -e "Uninstall script completed and removed the '.cluster/$cluster_name-$region.cs' file.\n"
else
echo -e "Uninstall script completed, but did not remove the '.cluster/$cluster_name-$region.cs' file due to other resources not being deleted.\nPlease check the '.cluster/$cluster_name-$region.cs' file and try again.\n"
fi
}
}
Loading