From 0a05dbeb22963982429f69b496706598ce937b40 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 29 Jun 2022 22:33:54 +0100 Subject: [PATCH] Create per-app kustomizations --- basic/apps/stackspout/dev/gitea-release.yaml | 2 +- .../dev/gitea-values-configmap.yaml | 2 +- basic/apps/stackspout/do/vikunja-release.yaml | 2 +- .../production/apps-kustomization.yaml | 13 ------- .../production/gitea-kustomization.yaml | 35 +++++++++++++++++++ .../production/vikunja-kustomization.yaml | 35 +++++++++++++++++++ basic/infrastructure/sources/gitea.yaml | 2 +- .../{vikunja.yaml => k8s-at-home.yaml} | 3 +- 8 files changed, 76 insertions(+), 18 deletions(-) delete mode 100644 basic/clusters/production/apps-kustomization.yaml create mode 100644 basic/clusters/production/gitea-kustomization.yaml create mode 100644 basic/clusters/production/vikunja-kustomization.yaml rename basic/infrastructure/sources/{vikunja.yaml => k8s-at-home.yaml} (80%) diff --git a/basic/apps/stackspout/dev/gitea-release.yaml b/basic/apps/stackspout/dev/gitea-release.yaml index f33c054..81536c0 100644 --- a/basic/apps/stackspout/dev/gitea-release.yaml +++ b/basic/apps/stackspout/dev/gitea-release.yaml @@ -12,7 +12,7 @@ spec: sourceRef: kind: HelmRepository name: gitea - namespace: stackspout + namespace: flux-system interval: 10m valuesFrom: - kind: ConfigMap diff --git a/basic/apps/stackspout/dev/gitea-values-configmap.yaml b/basic/apps/stackspout/dev/gitea-values-configmap.yaml index 1b19d6b..6cdab71 100644 --- a/basic/apps/stackspout/dev/gitea-values-configmap.yaml +++ b/basic/apps/stackspout/dev/gitea-values-configmap.yaml @@ -23,7 +23,7 @@ data: oauth: - name: Stackspin provider: 'openidConnect' - key: gitea + key: "${client_id}" secret: "${client_secret}" customAuthUrl: "https://sso.ftt.gmbh" #autoDiscoverUrl: 'https://gitea.example.com/.well-known/openid-configuration' diff --git a/basic/apps/stackspout/do/vikunja-release.yaml b/basic/apps/stackspout/do/vikunja-release.yaml index 98bc0a2..f79facf 100644 --- a/basic/apps/stackspout/do/vikunja-release.yaml +++ b/basic/apps/stackspout/do/vikunja-release.yaml @@ -12,7 +12,7 @@ spec: sourceRef: kind: HelmRepository name: k8s-at-home - namespace: stackspout + namespace: flux-system interval: 10m valuesFrom: - kind: ConfigMap diff --git a/basic/clusters/production/apps-kustomization.yaml b/basic/clusters/production/apps-kustomization.yaml deleted file mode 100644 index b2c9afc..0000000 --- a/basic/clusters/production/apps-kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 -kind: Kustomization -metadata: - name: apps - namespace: stackspout -spec: - interval: 10m - sourceRef: - kind: GitRepository - name: stackspout - path: ./basic/apps - prune: true - validation: client diff --git a/basic/clusters/production/gitea-kustomization.yaml b/basic/clusters/production/gitea-kustomization.yaml new file mode 100644 index 0000000..6cee05d --- /dev/null +++ b/basic/clusters/production/gitea-kustomization.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: gitea + namespace: stackspout +spec: + interval: 10m + timeout: 30m + dependsOn: + - name: single-sign-on + sourceRef: + kind: GitRepository + name: stackspout + path: ./basic/apps/gitea + prune: true + # TODO what does this mean? + #validation: client + healthChecks: + - apiVersion: helm.toolkit.fluxcd.io/v2beta1 + kind: HelmRelease + name: gitea + namespace: stackspout + - apiVersion: apps/v1 + kind: Deployment + name: gitea + namespace: stackspout + postBuild: + substituteFrom: + #- kind: Secret + # name: stackspin-gitea-variables + - kind: Secret + name: stackspin-gitea-oauth-variables + - kind: Secret + name: stackspin-cluster-variables diff --git a/basic/clusters/production/vikunja-kustomization.yaml b/basic/clusters/production/vikunja-kustomization.yaml new file mode 100644 index 0000000..17eb03f --- /dev/null +++ b/basic/clusters/production/vikunja-kustomization.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: vikunja + namespace: stackspout +spec: + interval: 10m + timeout: 30m + dependsOn: + - name: single-sign-on + sourceRef: + kind: GitRepository + name: stackspout + path: ./basic/apps/vikunja + prune: true + # TODO what does this mean? + #validation: client + healthChecks: + - apiVersion: helm.toolkit.fluxcd.io/v2beta1 + kind: HelmRelease + name: vikunja + namespace: stackspout + - apiVersion: apps/v1 + kind: Deployment + name: vikunja + namespace: stackspout + postBuild: + substituteFrom: + #- kind: Secret + # name: stackspin-vikunja-variables + - kind: Secret + name: stackspin-vikunja-oauth-variables + - kind: Secret + name: stackspin-cluster-variables diff --git a/basic/infrastructure/sources/gitea.yaml b/basic/infrastructure/sources/gitea.yaml index 8ccfa59..bde72ba 100644 --- a/basic/infrastructure/sources/gitea.yaml +++ b/basic/infrastructure/sources/gitea.yaml @@ -2,7 +2,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: HelmRepository metadata: name: gitea - namespace: stackspout + namespace: flux-system spec: interval: 10m url: https://dl.gitea.io/charts/ diff --git a/basic/infrastructure/sources/vikunja.yaml b/basic/infrastructure/sources/k8s-at-home.yaml similarity index 80% rename from basic/infrastructure/sources/vikunja.yaml rename to basic/infrastructure/sources/k8s-at-home.yaml index 8c1f01b..e7f578e 100644 --- a/basic/infrastructure/sources/vikunja.yaml +++ b/basic/infrastructure/sources/k8s-at-home.yaml @@ -1,8 +1,9 @@ +# For Vikunja apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: HelmRepository metadata: name: k8s-at-home - namespace: stackspout + namespace: flux-system spec: interval: 10m url: https://k8s-at-home.com/charts/