From b00b82f7d74a5303c1e915eaf7c6ec770b03d7ab Mon Sep 17 00:00:00 2001 From: Jonas Juselius Date: Sun, 22 Jun 2025 16:05:47 +0200 Subject: [PATCH] fix: misc fixes and simplifications for atlantis, sorcerer and plume --- helmfile.d/atlantis.yaml.gotmpl | 13 +++++------- helmfile.d/plume.yaml.gotmpl | 2 +- helmfile.d/sorcerer.yaml.gotmpl | 11 ++++------ values/atlantis/env-oceanbox.yaml.gotmpl | 3 +++ values/atlantis/env.yaml.gotmpl | 4 ++-- values/atlantis/manifests/atlantis.yaml | 8 +++++--- values/plume/env-ekman.yaml.gotmpl | 2 -- values/plume/env-oceanbox.yaml.gotmpl | 4 ---- values/plume/env.yaml.gotmpl | 6 ++++-- values/plume/manifests/plume.yaml | 20 +++++++++---------- ...taging.yaml.gotmpl => values-staging.yaml} | 3 +++ values/sorcerer/env-ekman.yapl.gotmpl | 3 +++ values/sorcerer/env.yaml.gotmpl | 4 ++-- values/sorcerer/manifests/sorcerer.yaml | 8 +++++--- 14 files changed, 47 insertions(+), 44 deletions(-) create mode 100644 values/atlantis/env-oceanbox.yaml.gotmpl delete mode 100644 values/plume/env-oceanbox.yaml.gotmpl rename values/plume/values/{plume-staging.yaml.gotmpl => values-staging.yaml} (95%) create mode 100644 values/sorcerer/env-ekman.yapl.gotmpl diff --git a/helmfile.d/atlantis.yaml.gotmpl b/helmfile.d/atlantis.yaml.gotmpl index b7e24a4e..ab926f5b 100644 --- a/helmfile.d/atlantis.yaml.gotmpl +++ b/helmfile.d/atlantis.yaml.gotmpl @@ -1,20 +1,17 @@ bases: - ../envs/environments.yaml.gotmpl -repositories: -- name: oceanbox - url: "git+https://git:{{ requiredEnv "HELM_GIT_ACCESS_TOKEN" }}@gitlab.com/oceanbox/manifests@charts?ref=main" +# repositories: +# - name: oceanbox +# url: "git+https://git:{{ requiredEnv "HELM_GIT_ACCESS_TOKEN" }}@gitlab.com/oceanbox/manifests@charts?ref=main" commonLabels: - tier: system - -apiVersions: -- monitoring.coreos.com/v1 + tier: oceanbox releases: - name: {{ .Environment.Name }}-atlantis namespace: {{ .Environment.Name }}-atlantis - chart: oceanbox/atlantis + chart: ../charts/atlantis condition: atlantis.enabled values: - ../values/atlantis/values/values.yaml.gotmpl diff --git a/helmfile.d/plume.yaml.gotmpl b/helmfile.d/plume.yaml.gotmpl index 0cedd550..f3c63fa2 100644 --- a/helmfile.d/plume.yaml.gotmpl +++ b/helmfile.d/plume.yaml.gotmpl @@ -2,7 +2,7 @@ bases: - ../envs/environments.yaml.gotmpl commonLabels: - tier: plume + tier: oceanbox releases: - name: plume diff --git a/helmfile.d/sorcerer.yaml.gotmpl b/helmfile.d/sorcerer.yaml.gotmpl index c179723d..45116066 100644 --- a/helmfile.d/sorcerer.yaml.gotmpl +++ b/helmfile.d/sorcerer.yaml.gotmpl @@ -1,15 +1,12 @@ bases: - ../envs/environments.yaml.gotmpl -repositories: -- name: oceanbox - url: "git+https://git:{{ requiredEnv "HELM_GIT_ACCESS_TOKEN" }}@gitlab.com/oceanbox/manifests@charts?ref=main" +# repositories: +# - name: oceanbox +# url: "git+https://git:{{ requiredEnv "HELM_GIT_ACCESS_TOKEN" }}@gitlab.com/oceanbox/manifests@charts?ref=main" commonLabels: - tier: system - -apiVersions: -- monitoring.coreos.com/v1 + tier: oceanbox releases: - name: {{ .Environment.Name }}-sorcerer diff --git a/values/atlantis/env-oceanbox.yaml.gotmpl b/values/atlantis/env-oceanbox.yaml.gotmpl new file mode 100644 index 00000000..f2791458 --- /dev/null +++ b/values/atlantis/env-oceanbox.yaml.gotmpl @@ -0,0 +1,3 @@ +atlantis: + enabled: true + diff --git a/values/atlantis/env.yaml.gotmpl b/values/atlantis/env.yaml.gotmpl index 6139ea8a..817e26cb 100644 --- a/values/atlantis/env.yaml.gotmpl +++ b/values/atlantis/env.yaml.gotmpl @@ -1,5 +1,5 @@ atlantis: - enabled: true - autosync: true + enabled: false + autosync: {{ if eq .Environment.Name "prod" }} false {{ else }} true {{ end }} env: {{ .Environment.Name }} diff --git a/values/atlantis/manifests/atlantis.yaml b/values/atlantis/manifests/atlantis.yaml index 024bace7..7688b8c5 100644 --- a/values/atlantis/manifests/atlantis.yaml +++ b/values/atlantis/manifests/atlantis.yaml @@ -70,7 +70,9 @@ spec: syncOptions: - CreateNamespace=true - ApplyOutOfSyncOnly=true - # automated: - # prune: true - # selfHeal: false + {{- if .Values.atlantis.autosync }} + automated: + prune: true + selfHeal: false + {{- end }} {{- end }} diff --git a/values/plume/env-ekman.yaml.gotmpl b/values/plume/env-ekman.yaml.gotmpl index f33e724e..c425c096 100644 --- a/values/plume/env-ekman.yaml.gotmpl +++ b/values/plume/env-ekman.yaml.gotmpl @@ -1,4 +1,2 @@ plume: enabled: true - envs: - - staging diff --git a/values/plume/env-oceanbox.yaml.gotmpl b/values/plume/env-oceanbox.yaml.gotmpl deleted file mode 100644 index f33e724e..00000000 --- a/values/plume/env-oceanbox.yaml.gotmpl +++ /dev/null @@ -1,4 +0,0 @@ -plume: - enabled: true - envs: - - staging diff --git a/values/plume/env.yaml.gotmpl b/values/plume/env.yaml.gotmpl index 006747c7..c7a26d30 100644 --- a/values/plume/env.yaml.gotmpl +++ b/values/plume/env.yaml.gotmpl @@ -1,3 +1,5 @@ plume: - enabled: false - autosync: true + enabled: true # for now + autosync: {{ if eq .Environment.Name "prod" }} false {{ else }} true {{ end }} + env: {{ .Environment.Name }} + diff --git a/values/plume/manifests/plume.yaml b/values/plume/manifests/plume.yaml index 523fa388..f9564e23 100644 --- a/values/plume/manifests/plume.yaml +++ b/values/plume/manifests/plume.yaml @@ -1,9 +1,8 @@ {{ if .Values.clusterConfig.argo.enabled }} -{{- range .Values.plume.envs }} apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: {{ . }}-plume + name: {{ .Values.plume.env }}-plume namespace: argocd annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true @@ -11,28 +10,29 @@ metadata: - resources-finalizer.argocd.argoproj.io spec: destination: - namespace: {{ . }}-plume + namespace: {{ .Values.plume.env }}-plume server: https://10.255.241.99:4443 project: default sources: - - repoURL: https://gitlab.com/oceanbox/manifests.git + - repoURL: {{ .Values.clusterConfig.manifests }} targetRevision: HEAD path: helmfile.d plugin: name: helmfile-cmp env: - name: CLUSTER_NAME - value: {{ $.Values.clusterConfig.cluster }} + value: {{ .Values.clusterConfig.cluster }} - name: HELMFILE_ENVIRONMENT - value: {{ . }} + value: {{ .Values.plume.env }} - name: HELMFILE_FILE_PATH value: plume.yaml.gotmpl syncPolicy: syncOptions: - CreateNamespace=true - ApplyOutOfSyncOnly=true - # automated: - # prune: true - # selfHeal: false -{{- end }} + {{- if .Values.plume.autosync }} + automated: + prune: true + selfHeal: false + {{- end }} {{- end }} diff --git a/values/plume/values/plume-staging.yaml.gotmpl b/values/plume/values/values-staging.yaml similarity index 95% rename from values/plume/values/plume-staging.yaml.gotmpl rename to values/plume/values/values-staging.yaml index a0c30063..037e3660 100644 --- a/values/plume/values/plume-staging.yaml.gotmpl +++ b/values/plume/values/values-staging.yaml @@ -1,3 +1,6 @@ +image: + tag: replaceme + ingress: enabled: true className: "nginx" diff --git a/values/sorcerer/env-ekman.yapl.gotmpl b/values/sorcerer/env-ekman.yapl.gotmpl new file mode 100644 index 00000000..95b06a8d --- /dev/null +++ b/values/sorcerer/env-ekman.yapl.gotmpl @@ -0,0 +1,3 @@ +sorcerer: + enabled: true + diff --git a/values/sorcerer/env.yaml.gotmpl b/values/sorcerer/env.yaml.gotmpl index 0f594c5d..232d83c5 100644 --- a/values/sorcerer/env.yaml.gotmpl +++ b/values/sorcerer/env.yaml.gotmpl @@ -1,5 +1,5 @@ sorcerer: - enabled: true - autosync: false + enabled: true # for now + autosync: {{ if eq .Environment.Name "prod" }} false {{ else }} true {{ end }} env: {{ .Environment.Name }} diff --git a/values/sorcerer/manifests/sorcerer.yaml b/values/sorcerer/manifests/sorcerer.yaml index 296a80f7..7f6c6d65 100644 --- a/values/sorcerer/manifests/sorcerer.yaml +++ b/values/sorcerer/manifests/sorcerer.yaml @@ -46,7 +46,9 @@ spec: syncOptions: - CreateNamespace=true - ApplyOutOfSyncOnly=true - # automated: - # prune: true - # selfHeal: false + {{- if .Values.sorcerer.autosync }} + automated: + prune: true + selfHeal: false + {{- end }} {{- end }}