From bc08798b30a66697b03cc4cd27a858b8ebd689f8 Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Thu, 20 Jul 2023 09:38:34 +0200 Subject: [PATCH 1/3] feat: structure changes Signed-off-by: Jan Lauber --- .../{{root} => momentum-root}/kustomization.yaml | 0 .../{application}/_base/kustomization.yaml | 0 .../{{root} => momentum-root}/{application}/_base/ns.yaml | 2 +- .../{application}/_base/release.yaml | 0 .../momentum-root/{application}/_base/secrets.yaml | 1 + .../momentum-root/{application}/_base/values.yaml | 1 + .../{application}/_deploy/{deployment}/kustomization.yaml | 0 .../{application}/_deploy/{deployment}/release.yaml | 0 .../{application}/_deploy/{deployment}/secrets.yaml | 1 + .../{application}/_deploy/{deployment}/values.yaml | 1 + .../momentum-root/{application}/_template/secrets.yaml | 1 + .../momentum-root/{application}/_template/values.yaml | 1 + .../{application}/kustomization.yaml | 0 .../{{root} => momentum-root}/{application}/ns.yaml | 0 .../{{root} => momentum-root}/{application}/repository.yaml | 0 .../{{root} => momentum-root}/{application}/{deployment}.yaml | 4 +++- .../{application}/{stage}/_base/kustomization.yaml | 0 .../{application}/{stage}/_base/release.yaml | 0 .../momentum-root/{application}/{stage}/_base/secrets.yaml | 1 + .../momentum-root/{application}/{stage}/_base/values.yaml | 1 + .../{stage}/_deploy/{deployment}/kustomization.yaml | 0 .../{application}/{stage}/_deploy/{deployment}/release.yaml | 0 .../{application}/{stage}/_deploy/{deployment}/secrets.yaml | 1 + .../{application}/{stage}/_deploy/{deployment}/values.yaml | 1 + .../{application}/{stage}/_template/secrets.yaml | 1 + .../momentum-root/{application}/{stage}/_template/values.yaml | 1 + .../{application}/{stage}/kustomization.yaml | 0 .../{application}/{stage}/{deployment}.yaml | 2 ++ .../{application}/{stage}/{stage}/_base/kustomization.yaml | 0 .../{application}/{stage}/{stage}/_base/release.yaml | 0 .../{application}/{stage}/{stage}/_base/secrets.yaml | 1 + .../{application}/{stage}/{stage}/_base/values.yaml | 1 + .../{stage}/{stage}/_deploy/{deployment}/kustomization.yaml | 0 .../{stage}/{stage}/_deploy/{deployment}/release.yaml | 0 .../{stage}/{stage}/_deploy/{deployment}/secrets.yaml | 1 + .../{stage}/{stage}/_deploy/{deployment}/values.yaml | 1 + .../{application}/{stage}/{stage}/_template/secrets.yaml | 1 + .../{application}/{stage}/{stage}/_template/values.yaml | 1 + .../{application}/{stage}/{stage}/kustomization.yaml | 0 .../{application}/{stage}/{stage}/{deployment}.yaml | 0 momentum-structure/{root}/{application}/_base/secrets.yaml | 1 - momentum-structure/{root}/{application}/_base/values.yaml | 1 - .../{root}/{application}/_deploy/{deployment}/secrets.yaml | 1 - .../{root}/{application}/_deploy/{deployment}/values.yaml | 1 - .../{root}/{application}/_template/secrets.yaml | 1 - momentum-structure/{root}/{application}/_template/values.yaml | 1 - .../{root}/{application}/{stage}/_base/secrets.yaml | 1 - .../{root}/{application}/{stage}/_base/values.yaml | 1 - .../{application}/{stage}/_deploy/{deployment}/secrets.yaml | 1 - .../{application}/{stage}/_deploy/{deployment}/values.yaml | 1 - .../{root}/{application}/{stage}/_template/secrets.yaml | 1 - .../{root}/{application}/{stage}/_template/values.yaml | 1 - .../{root}/{application}/{stage}/{stage}/_base/secrets.yaml | 1 - .../{root}/{application}/{stage}/{stage}/_base/values.yaml | 1 - .../{stage}/{stage}/_deploy/{deployment}/secrets.yaml | 1 - .../{stage}/{stage}/_deploy/{deployment}/values.yaml | 1 - .../{application}/{stage}/{stage}/_template/secrets.yaml | 1 - .../{application}/{stage}/{stage}/_template/values.yaml | 1 - 58 files changed, 24 insertions(+), 20 deletions(-) rename momentum-structure/{{root} => momentum-root}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/_base/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/_base/ns.yaml (74%) rename momentum-structure/{{root} => momentum-root}/{application}/_base/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/_base/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/_base/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/_deploy/{deployment}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/_deploy/{deployment}/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/_deploy/{deployment}/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/_deploy/{deployment}/values.yaml create mode 100644 momentum-structure/momentum-root/{application}/_template/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/_template/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/ns.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/repository.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{deployment}.yaml (61%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/_base/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/_base/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_base/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_base/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/_deploy/{deployment}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/_deploy/{deployment}/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/values.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_template/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/_template/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{deployment}.yaml (81%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/_base/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/_base/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml (100%) create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/secrets.yaml create mode 100644 momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/values.yaml rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/kustomization.yaml (100%) rename momentum-structure/{{root} => momentum-root}/{application}/{stage}/{stage}/{deployment}.yaml (100%) delete mode 100644 momentum-structure/{root}/{application}/_base/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/_base/values.yaml delete mode 100644 momentum-structure/{root}/{application}/_deploy/{deployment}/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/_deploy/{deployment}/values.yaml delete mode 100644 momentum-structure/{root}/{application}/_template/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/_template/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_base/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_base/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_template/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/_template/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_base/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_base/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_template/secrets.yaml delete mode 100644 momentum-structure/{root}/{application}/{stage}/{stage}/_template/values.yaml diff --git a/momentum-structure/{root}/kustomization.yaml b/momentum-structure/momentum-root/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/kustomization.yaml rename to momentum-structure/momentum-root/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/_base/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/_base/kustomization.yaml rename to momentum-structure/momentum-root/{application}/_base/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/_base/ns.yaml b/momentum-structure/momentum-root/{application}/_base/ns.yaml similarity index 74% rename from momentum-structure/{root}/{application}/_base/ns.yaml rename to momentum-structure/momentum-root/{application}/_base/ns.yaml index 01e4139..a881f74 100644 --- a/momentum-structure/{root}/{application}/_base/ns.yaml +++ b/momentum-structure/momentum-root/{application}/_base/ns.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: patch \ No newline at end of file + name: patch diff --git a/momentum-structure/{root}/{application}/_base/release.yaml b/momentum-structure/momentum-root/{application}/_base/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/_base/release.yaml rename to momentum-structure/momentum-root/{application}/_base/release.yaml diff --git a/momentum-structure/momentum-root/{application}/_base/secrets.yaml b/momentum-structure/momentum-root/{application}/_base/secrets.yaml new file mode 100644 index 0000000..c423301 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_base/secrets.yaml @@ -0,0 +1 @@ +base-secretkey: base-secretvalue diff --git a/momentum-structure/momentum-root/{application}/_base/values.yaml b/momentum-structure/momentum-root/{application}/_base/values.yaml new file mode 100644 index 0000000..a6694a3 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_base/values.yaml @@ -0,0 +1 @@ +base-key: base-value diff --git a/momentum-structure/{root}/{application}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/_deploy/{deployment}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/_deploy/{deployment}/release.yaml rename to momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml diff --git a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/secrets.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/secrets.yaml new file mode 100644 index 0000000..152a252 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/secrets.yaml @@ -0,0 +1 @@ +deploy-secretkey: deploy-secretvalue diff --git a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/values.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/values.yaml new file mode 100644 index 0000000..7e917e2 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/values.yaml @@ -0,0 +1 @@ +deploy-key: deploy-value diff --git a/momentum-structure/momentum-root/{application}/_template/secrets.yaml b/momentum-structure/momentum-root/{application}/_template/secrets.yaml new file mode 100644 index 0000000..4a0dda1 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_template/secrets.yaml @@ -0,0 +1 @@ +template-secretkey: {{ .template-secretvalue }} diff --git a/momentum-structure/momentum-root/{application}/_template/values.yaml b/momentum-structure/momentum-root/{application}/_template/values.yaml new file mode 100644 index 0000000..53d5d19 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/_template/values.yaml @@ -0,0 +1 @@ +template-key: {{.template-value}} diff --git a/momentum-structure/{root}/{application}/kustomization.yaml b/momentum-structure/momentum-root/{application}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/ns.yaml b/momentum-structure/momentum-root/{application}/ns.yaml similarity index 100% rename from momentum-structure/{root}/{application}/ns.yaml rename to momentum-structure/momentum-root/{application}/ns.yaml diff --git a/momentum-structure/{root}/{application}/repository.yaml b/momentum-structure/momentum-root/{application}/repository.yaml similarity index 100% rename from momentum-structure/{root}/{application}/repository.yaml rename to momentum-structure/momentum-root/{application}/repository.yaml diff --git a/momentum-structure/{root}/{application}/{deployment}.yaml b/momentum-structure/momentum-root/{application}/{deployment}.yaml similarity index 61% rename from momentum-structure/{root}/{application}/{deployment}.yaml rename to momentum-structure/momentum-root/{application}/{deployment}.yaml index eb389c9..1a417f0 100644 --- a/momentum-structure/{root}/{application}/{deployment}.yaml +++ b/momentum-structure/momentum-root/{application}/{deployment}.yaml @@ -2,9 +2,11 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: '{deployment}' + namespace: flux-system spec: + targetNamespace: '{deployment}' interval: 5m0s - path: ./_deploy/{deployment}/ + path: ./momentum-root/{application}/_deploy/{deployment}/ prune: true sourceRef: kind: GitRepository diff --git a/momentum-structure/{root}/{application}/{stage}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/_base/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/_base/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/_base/release.yaml rename to momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml diff --git a/momentum-structure/momentum-root/{application}/{stage}/_base/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/secrets.yaml new file mode 100644 index 0000000..f67a17d --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_base/secrets.yaml @@ -0,0 +1 @@ +stage-base-secretkey: stage-base-secretvalue diff --git a/momentum-structure/momentum-root/{application}/{stage}/_base/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/values.yaml new file mode 100644 index 0000000..9fd259c --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_base/values.yaml @@ -0,0 +1 @@ +stage-base-key: stage-base-value diff --git a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/release.yaml rename to momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml diff --git a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/secrets.yaml new file mode 100644 index 0000000..152a252 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/secrets.yaml @@ -0,0 +1 @@ +deploy-secretkey: deploy-secretvalue diff --git a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/values.yaml new file mode 100644 index 0000000..7e917e2 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/values.yaml @@ -0,0 +1 @@ +deploy-key: deploy-value diff --git a/momentum-structure/momentum-root/{application}/{stage}/_template/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/_template/secrets.yaml new file mode 100644 index 0000000..4a0dda1 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_template/secrets.yaml @@ -0,0 +1 @@ +template-secretkey: {{ .template-secretvalue }} diff --git a/momentum-structure/momentum-root/{application}/{stage}/_template/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/_template/values.yaml new file mode 100644 index 0000000..53d5d19 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/_template/values.yaml @@ -0,0 +1 @@ +template-key: {{.template-value}} diff --git a/momentum-structure/{root}/{application}/{stage}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/{deployment}.yaml b/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml similarity index 81% rename from momentum-structure/{root}/{application}/{stage}/{deployment}.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml index 3570465..a1b749b 100644 --- a/momentum-structure/{root}/{application}/{stage}/{deployment}.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml @@ -2,7 +2,9 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: '{deployment}-{stage}' # next stage would be '{deployment}-{stage}-{next_stage}' + namespace: flux-system spec: + targetNamespace: '{deployment}-{stage}' interval: 5m0s path: ./_deploy/{deployment}/ prune: true diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/_base/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/_base/release.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/secrets.yaml new file mode 100644 index 0000000..f67a17d --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/secrets.yaml @@ -0,0 +1 @@ +stage-base-secretkey: stage-base-secretvalue diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/values.yaml new file mode 100644 index 0000000..9fd259c --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/values.yaml @@ -0,0 +1 @@ +stage-base-key: stage-base-value diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml new file mode 100644 index 0000000..152a252 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml @@ -0,0 +1 @@ +deploy-secretkey: deploy-secretvalue diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml new file mode 100644 index 0000000..7e917e2 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml @@ -0,0 +1 @@ +deploy-key: deploy-value diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/secrets.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/secrets.yaml new file mode 100644 index 0000000..4a0dda1 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/secrets.yaml @@ -0,0 +1 @@ +template-secretkey: {{ .template-secretvalue }} diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/values.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/values.yaml new file mode 100644 index 0000000..53d5d19 --- /dev/null +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_template/values.yaml @@ -0,0 +1 @@ +template-key: {{.template-value}} diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/kustomization.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/kustomization.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/kustomization.yaml diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/{deployment}.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml similarity index 100% rename from momentum-structure/{root}/{application}/{stage}/{stage}/{deployment}.yaml rename to momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml diff --git a/momentum-structure/{root}/{application}/_base/secrets.yaml b/momentum-structure/{root}/{application}/_base/secrets.yaml deleted file mode 100644 index 85931f7..0000000 --- a/momentum-structure/{root}/{application}/_base/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -base-secretkey: base-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/_base/values.yaml b/momentum-structure/{root}/{application}/_base/values.yaml deleted file mode 100644 index 28e0cff..0000000 --- a/momentum-structure/{root}/{application}/_base/values.yaml +++ /dev/null @@ -1 +0,0 @@ -base-key: base-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/_deploy/{deployment}/secrets.yaml b/momentum-structure/{root}/{application}/_deploy/{deployment}/secrets.yaml deleted file mode 100644 index 0d94305..0000000 --- a/momentum-structure/{root}/{application}/_deploy/{deployment}/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-secretkey: deploy-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/_deploy/{deployment}/values.yaml b/momentum-structure/{root}/{application}/_deploy/{deployment}/values.yaml deleted file mode 100644 index 833e9f5..0000000 --- a/momentum-structure/{root}/{application}/_deploy/{deployment}/values.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-key: deploy-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/_template/secrets.yaml b/momentum-structure/{root}/{application}/_template/secrets.yaml deleted file mode 100644 index db87856..0000000 --- a/momentum-structure/{root}/{application}/_template/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -template-secretkey: {{ .template-secretvalue }} \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/_template/values.yaml b/momentum-structure/{root}/{application}/_template/values.yaml deleted file mode 100644 index e9a9104..0000000 --- a/momentum-structure/{root}/{application}/_template/values.yaml +++ /dev/null @@ -1 +0,0 @@ -template-key: {{.template-value}} \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_base/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/_base/secrets.yaml deleted file mode 100644 index 86bb9ca..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_base/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -stage-base-secretkey: stage-base-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_base/values.yaml b/momentum-structure/{root}/{application}/{stage}/_base/values.yaml deleted file mode 100644 index 22682de..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_base/values.yaml +++ /dev/null @@ -1 +0,0 @@ -stage-base-key: stage-base-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/secrets.yaml deleted file mode 100644 index 0d94305..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-secretkey: deploy-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/values.yaml b/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/values.yaml deleted file mode 100644 index 833e9f5..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_deploy/{deployment}/values.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-key: deploy-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_template/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/_template/secrets.yaml deleted file mode 100644 index db87856..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_template/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -template-secretkey: {{ .template-secretvalue }} \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/_template/values.yaml b/momentum-structure/{root}/{application}/{stage}/_template/values.yaml deleted file mode 100644 index e9a9104..0000000 --- a/momentum-structure/{root}/{application}/{stage}/_template/values.yaml +++ /dev/null @@ -1 +0,0 @@ -template-key: {{.template-value}} \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_base/secrets.yaml deleted file mode 100644 index 86bb9ca..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -stage-base-secretkey: stage-base-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/values.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_base/values.yaml deleted file mode 100644 index 22682de..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_base/values.yaml +++ /dev/null @@ -1 +0,0 @@ -stage-base-key: stage-base-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml deleted file mode 100644 index 0d94305..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-secretkey: deploy-secretvalue \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml deleted file mode 100644 index 833e9f5..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_deploy/{deployment}/values.yaml +++ /dev/null @@ -1 +0,0 @@ -deploy-key: deploy-value \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_template/secrets.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_template/secrets.yaml deleted file mode 100644 index db87856..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_template/secrets.yaml +++ /dev/null @@ -1 +0,0 @@ -template-secretkey: {{ .template-secretvalue }} \ No newline at end of file diff --git a/momentum-structure/{root}/{application}/{stage}/{stage}/_template/values.yaml b/momentum-structure/{root}/{application}/{stage}/{stage}/_template/values.yaml deleted file mode 100644 index e9a9104..0000000 --- a/momentum-structure/{root}/{application}/{stage}/{stage}/_template/values.yaml +++ /dev/null @@ -1 +0,0 @@ -template-key: {{.template-value}} \ No newline at end of file From 1e225ba1fdb0acca0fd6ea03a9e437030641ee61 Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Thu, 20 Jul 2023 10:11:27 +0200 Subject: [PATCH 2/3] feat: maybe final structural changes Signed-off-by: Jan Lauber --- .../{application}/_base/kustomization.yaml | 2 +- .../{application}/_base/release.yaml | 4 +- .../_deploy/{deployment}/kustomization.yaml | 2 +- .../_deploy/{deployment}/release.yaml | 5 + .../{stage}/_base/kustomization.yaml | 19 +-- .../{application}/{stage}/_base/release.yaml | 4 + .../_deploy/{deployment}/kustomization.yaml | 2 +- .../{stage}/_deploy/{deployment}/release.yaml | 5 + .../{application}/{stage}/{deployment}.yaml | 2 +- .../{stage}/{stage}/_base/kustomization.yaml | 24 +--- .../{stage}/{stage}/_base/release.yaml | 4 + .../_deploy/{deployment}/kustomization.yaml | 2 +- .../{stage}/_deploy/{deployment}/release.yaml | 5 + .../{stage}/{stage}/{deployment}.yaml | 6 +- momentum-structure/test.yaml | 123 ------------------ 15 files changed, 43 insertions(+), 166 deletions(-) delete mode 100644 momentum-structure/test.yaml diff --git a/momentum-structure/momentum-root/{application}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/_base/kustomization.yaml index e52824c..c95e0d6 100644 --- a/momentum-structure/momentum-root/{application}/_base/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/_base/kustomization.yaml @@ -11,7 +11,7 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - secrets.yaml + - values.yaml=secrets.yaml name: base-secrets options: disableNameSuffixHash: true diff --git a/momentum-structure/momentum-root/{application}/_base/release.yaml b/momentum-structure/momentum-root/{application}/_base/release.yaml index 3479dbf..69fc77b 100644 --- a/momentum-structure/momentum-root/{application}/_base/release.yaml +++ b/momentum-structure/momentum-root/{application}/_base/release.yaml @@ -3,10 +3,10 @@ kind: HelmRelease metadata: name: '{application}' spec: - interval: 10m + interval: '{application-interval}' chart: spec: - chart: '{application-chart}' + version: '{application-chart-version}' sourceRef: kind: HelmRepository name: '{application}-charts' diff --git a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml index f04edeb..bdd24f4 100644 --- a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/kustomization.yaml @@ -11,7 +11,7 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - secrets.yaml + - values.yaml=secrets.yaml name: deploy-secrets options: disableNameSuffixHash: true diff --git a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml index 82b2fa4..ebb5326 100644 --- a/momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml +++ b/momentum-structure/momentum-root/{application}/_deploy/{deployment}/release.yaml @@ -2,3 +2,8 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: '{application}' +spec: + interval: '{application-interval}' + chart: + spec: + version: '{application-chart-version}' diff --git a/momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml index 7f59bfd..d3f9e47 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/_base/kustomization.yaml @@ -1,13 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../_base/release.yaml +- ../../_base/ configMapGenerator: -- files: - - ../../_base/values.yaml - name: base-values - options: - disableNameSuffixHash: true - files: - values.yaml name: '{stage}-values' @@ -15,14 +10,14 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - ../../_base/secrets.yaml - name: base-secrets - options: - disableNameSuffixHash: true -- files: - - secrets.yaml + - values.yaml=secrets.yaml name: '{stage}-secrets' options: disableNameSuffixHash: true patches: - path: release.yaml +labels: +- includeSelectors: true + pairs: + gitops.natron.io/application: '{application}' + gitops.natron.io/stage: '{stage}' diff --git a/momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml index 560942e..86badad 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/_base/release.yaml @@ -3,6 +3,10 @@ kind: HelmRelease metadata: name: '{application}' spec: + interval: '{application-interval}' + chart: + spec: + version: '{application-chart-version}' valuesFrom: - kind: ConfigMap name: base-values diff --git a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml index 9646f77..5908e49 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/kustomization.yaml @@ -11,7 +11,7 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - secrets.yaml + - values.yaml=secrets.yaml name: deploy-secrets options: disableNameSuffixHash: true diff --git a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml index 82b2fa4..ebb5326 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/_deploy/{deployment}/release.yaml @@ -2,3 +2,8 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: '{application}' +spec: + interval: '{application-interval}' + chart: + spec: + version: '{application-chart-version}' diff --git a/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml b/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml index a1b749b..3ac73b6 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{deployment}.yaml @@ -6,7 +6,7 @@ metadata: spec: targetNamespace: '{deployment}-{stage}' interval: 5m0s - path: ./_deploy/{deployment}/ + path: ./momentum-root/{application}/{stage}/_deploy/{deployment}/ prune: true sourceRef: kind: GitRepository diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml index 8087c2a..9cf1767 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/kustomization.yaml @@ -1,18 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../../_base/release.yaml +- ../../../_base/ configMapGenerator: -- files: - - ../../../_base/values.yaml - name: base-values - options: - disableNameSuffixHash: true -- files: - - ../../_base/values.yaml - name: '{stage}-values' - options: - disableNameSuffixHash: true - files: - values.yaml name: '{stage}-{stage}-values' @@ -20,17 +10,7 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - ../../../_base/secrets.yaml - name: base-secrets - options: - disableNameSuffixHash: true -- files: - - ../../_base/secrets.yaml - name: '{stage}-secrets' - options: - disableNameSuffixHash: true -- files: - - secrets.yaml + - values.yaml=secrets.yaml name: '{stage}-{stage}-secrets' options: disableNameSuffixHash: true diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml index dcda8a7..9f374f2 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_base/release.yaml @@ -3,6 +3,10 @@ kind: HelmRelease metadata: name: '{application}' spec: + interval: '{application-interval}' + chart: + spec: + version: '{application-chart-version}' valuesFrom: - kind: ConfigMap name: base-values diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml index 9f93013..177a543 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/kustomization.yaml @@ -11,7 +11,7 @@ configMapGenerator: disableNameSuffixHash: true secretGenerator: - files: - - secrets.yaml + - values.yaml=secrets.yaml name: deploy-secrets options: disableNameSuffixHash: true diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml index 82b2fa4..ebb5326 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/release.yaml @@ -2,3 +2,8 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: '{application}' +spec: + interval: '{application-interval}' + chart: + spec: + version: '{application-chart-version}' diff --git a/momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml b/momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml index 07e0950..46edcd3 100644 --- a/momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml +++ b/momentum-structure/momentum-root/{application}/{stage}/{stage}/{deployment}.yaml @@ -1,10 +1,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: '{deployment}-{stage}-{stage}' # next stage would be '{deployment}-{stage}--{stage}-{next_stage}' + name: '{deployment}-{stage}-{stage}' # next stage would be '{deployment}-{stage}-{stage}-{next_stage}' + namespace: flux-system spec: + targetNamespace: '{deployment}-{stage}-{stage}' interval: 5m0s - path: ./_deploy/{deployment}/ + path: ./momentum-root/{application}/{stage}/{stage}/_deploy/{deployment}/ prune: true sourceRef: kind: GitRepository diff --git a/momentum-structure/test.yaml b/momentum-structure/test.yaml deleted file mode 100644 index d6e7145..0000000 --- a/momentum-structure/test.yaml +++ /dev/null @@ -1,123 +0,0 @@ -apiVersion: v1 -data: - values.yaml: 'base-key: base-value' -kind: ConfigMap -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: base-values - namespace: '{deployment}-{stage}-{stage}' ---- -apiVersion: v1 -data: - values.yaml: 'deploy-key: deploy-value' -kind: ConfigMap -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: deploy-values - namespace: '{deployment}-{stage}-{stage}' ---- -apiVersion: v1 -data: - values.yaml: 'stage-base-key: stage-base-value' -kind: ConfigMap -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: '{stage}-values' - namespace: '{deployment}-{stage}-{stage}' ---- -apiVersion: v1 -data: - values.yaml: 'stage-base-key: stage-base-value' -kind: ConfigMap -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: '{stage}-{stage}-values' - namespace: '{deployment}-{stage}-{stage}' ---- -apiVersion: v1 -data: - secrets.yaml: YmFzZS1zZWNyZXRrZXk6IGJhc2Utc2VjcmV0dmFsdWU= -kind: Secret -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: base-secrets - namespace: '{deployment}-{stage}-{stage}' -type: Opaque ---- -apiVersion: v1 -data: - secrets.yaml: ZGVwbG95LXNlY3JldGtleTogZGVwbG95LXNlY3JldHZhbHVl -kind: Secret -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: deploy-secrets - namespace: '{deployment}-{stage}-{stage}' -type: Opaque ---- -apiVersion: v1 -data: - secrets.yaml: c3RhZ2UtYmFzZS1zZWNyZXRrZXk6IHN0YWdlLWJhc2Utc2VjcmV0dmFsdWU= -kind: Secret -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: '{stage}-secrets' - namespace: '{deployment}-{stage}-{stage}' -type: Opaque ---- -apiVersion: v1 -data: - secrets.yaml: c3RhZ2UtYmFzZS1zZWNyZXRrZXk6IHN0YWdlLWJhc2Utc2VjcmV0dmFsdWU= -kind: Secret -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: '{stage}-{stage}-secrets' - namespace: '{deployment}-{stage}-{stage}' -type: Opaque ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - labels: - gitops.natron.io/stage: '{stage}-{stage}' - name: '{application}' - namespace: '{deployment}-{stage}-{stage}' -spec: - chart: - spec: - chart: '{application-chart}' - sourceRef: - kind: HelmRepository - name: '{application}-charts' - namespace: '{application}' - install: - remediation: - remediateLastFailure: true - interval: 10m - upgrade: - remediation: - remediateLastFailure: true - valuesFrom: - - kind: ConfigMap - name: base-values - - kind: Secret - name: base-secrets - - kind: ConfigMap - name: '{stage}-values' - - kind: Secret - name: '{stage}-secrets' - - kind: ConfigMap - name: '{stage}-{stage}-values' - - kind: Secret - name: '{stage}-{stage}-secrets' - - kind: ConfigMap - name: deploy-values - - kind: Secret - name: deploy-secrets From 13e7660dbd91d88a68831ea3a52beb0d0a07d33c Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Thu, 20 Jul 2023 10:12:54 +0200 Subject: [PATCH 3/3] docs: enhance readme Signed-off-by: Jan Lauber --- momentum-structure/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/momentum-structure/README.md b/momentum-structure/README.md index dcbb7ee..1283329 100644 --- a/momentum-structure/README.md +++ b/momentum-structure/README.md @@ -8,13 +8,13 @@ The structure is as follows (generated with `tree -a -I`): ```bash . -└── {root} - ├── kustomization.yaml - └── {application} # An application e.g. my-app (level 1) +└── momentum-root # This is the root of the repository + ├── kustomization.yaml # This is the root kustomization file + └── {application} ├── _base │ ├── kustomization.yaml │ ├── ns.yaml - │ ├── release.yaml + │ ├── release.yaml # This is the helm release for base │ ├── secrets.yaml │ └── values.yaml ├── _deploy @@ -24,13 +24,13 @@ The structure is as follows (generated with `tree -a -I`): │ ├── secrets.yaml │ └── values.yaml ├── _template - │ ├── secrets.yaml # The helmrelease keys for secrets templated with go template - │ └── values.yaml # The helmrelease values templated with go template + │ ├── secrets.yaml + │ └── values.yaml ├── kustomization.yaml - ├── ns.yaml # The namespace of the application (to store the helmrepository stuff) - ├── repository.yaml # The helm repository of the application - ├── {deployment}.yaml # A deployment of the application, which is a flux kustomization - └── {stage} # A stage of the application e.g. cluster-test, cluster-prod (level 2) + ├── ns.yaml + ├── repository.yaml + ├── {deployment}.yaml + └── {stage} ├── _base │ ├── kustomization.yaml │ ├── release.yaml @@ -47,7 +47,7 @@ The structure is as follows (generated with `tree -a -I`): │ └── values.yaml ├── kustomization.yaml ├── {deployment}.yaml - └── {stage} # A stage of the application e.g. test,prod (level 3) + └── {stage} ├── _base │ ├── kustomization.yaml │ ├── release.yaml