Skip to content

Commit

Permalink
feat: allow non-sync config for low cpu usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Oct 15, 2024
1 parent 0dc09ba commit 2b0b31e
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 27 deletions.
4 changes: 2 additions & 2 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ AtomiCloud's Deployment Platform via ArgoCD
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| admin | bool | `true` | Enable Admin Access |
| applicationWait | bool | `true` | Enable waiting in sync-waves |
| argo-cd | object | `{"applicationSet":{"replicas":1},"configs":{"cm":{"create":false},"params":{"create":false},"rbac":{"create":false}},"controller":{"replicas":2,"resources":{"limits":{"cpu":"1000m","memory":"1000Mi"},"requests":{"cpu":"500m","memory":"500Mi"}}},"dex":{"enabled":false},"global":{"logging":{"format":"json","level":"info"}},"redis":{"resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}}},"repoServer":{"replicas":2,"resources":{"limits":{"cpu":"1000m","memory":"1000Mi"},"requests":{"cpu":"500m","memory":"500Mi"}}},"server":{"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}}}}` | ArgoCD Specific configuration. See [ArgoCD Helm Documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd) |
| applicationWait | bool | `false` | Enable waiting in sync-waves |
| argo-cd | object | `{"applicationSet":{"replicas":1},"configs":{"cm":{"create":false},"params":{"create":false},"rbac":{"create":false}},"controller":{"replicas":1,"resources":{"limits":{"cpu":"1800m","memory":"2Gi"},"requests":{"cpu":"900m","memory":"1Gi"}}},"dex":{"enabled":false},"global":{"logging":{"format":"json","level":"info"}},"redis":{"resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}}},"repoServer":{"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"250m","memory":"250Mi"}}},"server":{"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}}}}` | ArgoCD Specific configuration. See [ArgoCD Helm Documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd) |
| banner | string | `""` | Banner to show in ArgoCD UI |
| connector | object | `{"clusters":{},"policy":{"creation":"Owner","deletion":"Retain"},"secretStore":{"kind":"SecretStore","name":"helium"}}` | Connectors to other cluster |
| connector.clusters | object | `{}` | Clusters to connect to |
Expand Down
Empty file modified chart/charts/argo-cd-7.4.2.tgz
100755 → 100644
Empty file.
Empty file modified chart/charts/sulfoxide-bromine-1.5.1.tgz
100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions chart/templates/argocd_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ data:
timeout.hard.reconciliation: 0s
timeout.reconciliation: 180s
resource.ignoreResourceUpdatesEnabled: "true"
resource.customizations.ignoreResourceUpdates.argoproj.io_ApplicationSet: |
jsonPointers:
- /status/resources
resource.customizations.ignoreResourceUpdates.argoproj.io_Application: |
jsonPointers:
- /status/reconciledAt
Expand Down
30 changes: 15 additions & 15 deletions chart/values.suicune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ radon:
repoURL: https://github.com/AtomiCloud/sulfoxide.radon
targetRevision: HEAD
path: chart
values: ['values.yaml', 'values.entei.opal-ruby.yaml']
values: [ 'values.yaml', 'values.entei.opal-ruby.yaml' ]

connector:
clusters:
Expand All @@ -70,7 +70,7 @@ connector:
version: HEAD
path: chart
release: entei-topaz-carbon
values: ['values.yaml', 'values.entei.topaz.yaml']
values: [ 'values.yaml', 'values.entei.topaz.yaml' ]
amber:
enable: false
refreshInterval: 1h
Expand All @@ -83,7 +83,7 @@ connector:
version: HEAD
path: chart
release: entei-amber-carbon
values: ['values.yaml', 'values.entei.amber.yaml']
values: [ 'values.yaml', 'values.entei.amber.yaml' ]
opal:
enable: false
refreshInterval: 1h
Expand All @@ -96,33 +96,33 @@ connector:
version: HEAD
path: chart
release: entei-opal-carbon
values: ['values.yaml', 'values.entei.opal.yaml']
values: [ 'values.yaml', 'values.entei.opal.yaml' ]
ruby:
enable: true
enable: false
refreshInterval: 1h
remoteSecretName: ENTEI_RUBY_KUBECONFIG
destination: 'https://00cfcaba-7d46-4c8f-8760-75ee9c3fc965.k8s.ondigitalocean.com'
deployAppSet: true
destination: ''
deployAppSet: false
aoa:
enable: true
enable: false
repo: https://github.com/AtomiCloud/sulfoxide.carbon
version: HEAD
path: chart
release: entei-ruby-carbon
values: ['values.yaml', 'values.entei.ruby.yaml']
values: [ 'values.yaml', 'values.entei.ruby.yaml' ]
mica:
enable: false
enable: true
refreshInterval: 1h
remoteSecretName: ENTEI_MICA_KUBECONFIG
destination: ''
deployAppSet: false
destination: 'https://eb519879-ce0e-4d5d-94d9-dc752028cabd.vultr-k8s.com:6443'
deployAppSet: true
aoa:
enable: false
enable: true
repo: https://github.com/AtomiCloud/sulfoxide.carbon
version: HEAD
path: chart
release: entei-mica-carbon
values: ['values.yaml', 'values.entei.mica.yaml']
values: [ 'values.yaml', 'values.entei.mica.yaml' ]
talc:
enable: false
refreshInterval: 1h
Expand All @@ -135,4 +135,4 @@ connector:
version: HEAD
path: chart
release: entei-talc-carbon
values: ['values.yaml', 'values.entei.talc.yaml']
values: [ 'values.yaml', 'values.entei.talc.yaml' ]
236 changes: 236 additions & 0 deletions chart/values.sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
# -- AtomiCloud Service Tree. See [ServiceTree](https://atomicloud.larksuite.com/wiki/OkfJwTXGFiMJkrk6W3RuwRrZs64?theme=DARK&contentTheme=DARK#MHw5d76uDo2tBLx86cduFQMRsBb)
serviceTree:
platform: &platform sulfoxide
service: &service chlorine
layer: '1'

# -- ArgoCD Specific configuration. See [ArgoCD Helm Documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd)
argo-cd:
controller:
replicas: 3
resources:
limits:
cpu: 1800m
memory: 2000Mi
requests:
cpu: 1800m
memory: 2000Mi
applicationSet:
replicas: 1
redis:
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
server:
replicas: 2
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
repoServer:
replicas: 2
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 250m
memory: 250Mi
configs:
cm:
create: false
params:
create: false
rbac:
create: false
global:
logging:
format: json
level: info
dex:
enabled: false

# -- Create SecretStore via secret of secrets pattern
sulfoxide-bromine:
serviceTree:
platform: *platform
service: *service
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/weight: '-5'
# -- Store name to create
storeName: *service
# -- Secret of Secrets reference
rootSecret:
name: *service
# -- Infisical Token Reference
ref:
clientId: SULFOXIDE_HELIUM_CLIENT_ID
clientSecret: SULFOXIDE_HELIUM_CLIENT_SECRET

# -- Enable Kustomize Application
kustomize: true
# -- Enable JSONNET Application
jsonnet: true
# -- Enable Helm Application
helm: true
# -- Enable Admin Access
admin: true
# -- Enable Exec in ArgoCD
exec: true
# -- Enable waiting in sync-waves
applicationWait: false
# -- Banner to show in ArgoCD UI
banner: ''

# -- OTEL Collector Endpoint
otelAddress: ''

# -- Projects to create in ArgoCD
projects:
bootstrap:
desc: Bootstrap Project used to setup the cluster

# -- URL of ArgoCD endpoint
url: https://deploy.atomi.cloud

# -- RBAC Setup
rbac:
# -- Enable of RBAC
enable: true
# -- Group claim to use for OIDC for RBAC
group: https://atomi.cloud/roles
# -- Name of the OIDC Provider
name: Atomi
# -- Name of OIDC Issuer
issuer: https://atomicloud-internal.jp.auth0.com/
# -- Client ID for OIDC
clientID: ''
# -- Scopes to request from OIDC
requestedScopes:
- openid
- profile
- email
- https://atomi.cloud/roles

# -- GitHub Auth Setup
github:
# -- Secret name of Github Auth
secretName: argo-cd-creds
# -- ArgoCD Credential Type
url: ''
# -- ArgoCD Credential Type
type: ''
# -- Internal Secret, Hard coded secrets
internal:
# -- Enable Internal Secret
enable: false
# -- Username for Github Auth
username: ''
# -- Password for Github Auth
password: ''
# -- External Secrets
external:
# -- Enable External Secrets
enable: true
# -- Refresh Interval for fetching the secret from remote
refreshInterval: 1h
# -- Username Remote Reference
usernameRef: ''
# -- Password Remote Reference
passwordRef: ''
secretStore:
# -- Name of the Secret Store
name: helium
# -- Kind of the Secret Store: `ClusterSecretStore` or `SecretStore`
kind: SecretStore
# -- External Secret Policy
policy:
# -- Creation Policy
creation: Owner
# -- Deletion Policy
deletion: Retain

# -- SSO Secret using OIDC
sso:
# -- Secret Name of SSO Secret
secretName: argo-cd-sso-secret
# -- Internal Secret, Hard coded secrets
internal:
# -- Enable Internal Secret
enable: false
# -- Secret for SSO
secret: ''
# -- External Secret Configuration
external:
# -- Enable External Secret
enable: true
# -- Refresh Interval for fetching the secret from remote
refreshInterval: 1h
# -- Secret Remote Reference for OIDC Client Secret
remoteSecretName: ''
secretStore:
# -- Name of the Secret Store
name: helium
# -- Kind of the Secret Store: `ClusterSecretStore` or `SecretStore`
kind: ClusterStore
# -- External Secret Policy
policy:
# -- Creation policy
creation: Owner
# -- Deletion policy
deletion: Retain

# -- ApplicationSets for L2 Applications
radon:
# -- Enable ApplicationSets for L2 Applications
enable: true
# -- App name of the App of ApplicationSets
appName: radon
# -- Release name for Radon
releaseName: radon
# -- Radon helm chart repository
repoURL: https://github.com/AtomiCloud/sulfoxide.radon
# -- Version for Radon to deploy
targetRevision: HEAD
# -- Path in the repository that poitns to the helm chart
path: chart
# -- values to use for the helm chart
values: ['values.yaml', 'values.entei.opal-ruby.yaml']

# -- Connectors to other cluster
connector:
secretStore:
# -- Name of the Secret Store
name: helium
# -- Kind of the Secret Store: `ClusterSecretStore` or `SecretStore`
kind: SecretStore
# -- External Secret Policy
policy:
# -- Creation policy
creation: Owner
# -- Deletion policy
deletion: Retain
# -- Clusters to connect to
clusters: {}
# pichu:
# opal:
# # -- refresh interval for fetching the secret from remote
# refreshInterval: 24h
# # -- secret for the cluster
# remoteSecretName: /suicune/clusters/pichu-opal
# # -- enable App of Apps
# aoa:
# enable: true
# repo: https://github.com/AtomiCloud/helm.systems_app-of-apps
# version: HEAD
# path: chart
# release: pichu-opal-bootstrap
# values: [ "values.pichu.opal.yaml" ]
18 changes: 9 additions & 9 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ serviceTree:
# -- ArgoCD Specific configuration. See [ArgoCD Helm Documentation](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd)
argo-cd:
controller:
replicas: 2
replicas: 1
resources:
limits:
cpu: 1000m
memory: 1000Mi
cpu: 1800m
memory: 2Gi
requests:
cpu: 500m
memory: 500Mi
cpu: 900m
memory: 1Gi
applicationSet:
replicas: 1
redis:
Expand All @@ -38,11 +38,11 @@ argo-cd:
replicas: 2
resources:
limits:
cpu: 1000m
memory: 1000Mi
requests:
cpu: 500m
memory: 500Mi
requests:
cpu: 250m
memory: 250Mi
configs:
cm:
create: false
Expand Down Expand Up @@ -86,7 +86,7 @@ admin: true
# -- Enable Exec in ArgoCD
exec: true
# -- Enable waiting in sync-waves
applicationWait: true
applicationWait: false
# -- Banner to show in ArgoCD UI
banner: ''

Expand Down
7 changes: 6 additions & 1 deletion tasks/Taskfile.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ tasks:
cmds:
- helm dependency update
- helm upgrade --install $RELEASE_NAME . --wait --cleanup-on-fail --values values.yaml --values values.{{.LANDSCAPE}}.yaml --values values.{{.LANDSCAPE}}.{{.CLUSTER}}.yaml {{.CLI_ARGS}}

install-sync:
desc: Installs the chart with sync enabled
dir: chart
cmds:
- helm dependency update
- helm upgrade --install $RELEASE_NAME . --wait --cleanup-on-fail --values values.sync.yaml --values values.{{.LANDSCAPE}}.yaml --values values.{{.LANDSCAPE}}.{{.CLUSTER}}.yaml --set argo-cd.controller.sync.enabled=true {{.CLI_ARGS}}
remove:
desc: Removes an installed release
cmds:
Expand Down

0 comments on commit 2b0b31e

Please sign in to comment.