From 9edbdb83da564107ce408aeee71948185d69440c Mon Sep 17 00:00:00 2001 From: Mic Szillat Date: Sat, 24 Feb 2024 17:23:42 +0100 Subject: [PATCH] :recycle: Refactor Flux kustomizations for apps Move apps from the central Flux kustomization to dedicated resources. --- clusters/k3s1/apps.yaml | 37 ++++++++++++++++++++++++ clusters/k3s1/dendrite-helm-release.yaml | 21 -------------- clusters/k3s1/kustomization.yaml | 1 - environments/prod/kustomization.yaml | 1 - 4 files changed, 37 insertions(+), 23 deletions(-) delete mode 100644 clusters/k3s1/dendrite-helm-release.yaml diff --git a/clusters/k3s1/apps.yaml b/clusters/k3s1/apps.yaml index 5aaff15..b5c9bd1 100644 --- a/clusters/k3s1/apps.yaml +++ b/clusters/k3s1/apps.yaml @@ -13,3 +13,40 @@ spec: name: flux-system path: ./base/metallb prune: false +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: dendrite + namespace: flux-system +spec: + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./base/dendrite + prune: false + patches: + - patch: |- + apiVersion: helm.toolkit.fluxcd.io/v2beta2 + kind: HelmRelease + metadata: + name: dendrite + namespace: dendrite + spec: + values: + dendrite_config: + global: + server_name: freifunk-duesseldorf.de + well_known_server_name: dendrite.ffddorf.net + well_known_client_name: dendrite.ffddorf.net + ingress: + enabled: true + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + hostName: dendrite.ffddorf.net + tls: + - hosts: [ dendrite.ffddorf.net ] + secretName: dendrite-tls diff --git a/clusters/k3s1/dendrite-helm-release.yaml b/clusters/k3s1/dendrite-helm-release.yaml deleted file mode 100644 index 267b5f0..0000000 --- a/clusters/k3s1/dendrite-helm-release.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: helm.toolkit.fluxcd.io/v2beta2 -kind: HelmRelease -metadata: - name: dendrite - namespace: dendrite -spec: - values: - dendrite_config: - global: - server_name: freifunk-duesseldorf.de - well_known_server_name: dendrite.ffddorf.net - well_known_client_name: dendrite.ffddorf.net - ingress: - enabled: true - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - hostName: dendrite.ffddorf.net - tls: - - hosts: [ dendrite.ffddorf.net ] - secretName: dendrite-tls - diff --git a/clusters/k3s1/kustomization.yaml b/clusters/k3s1/kustomization.yaml index 4f4a41e..add9e18 100644 --- a/clusters/k3s1/kustomization.yaml +++ b/clusters/k3s1/kustomization.yaml @@ -6,5 +6,4 @@ resources: - traefik-config.yaml - apps.yaml patchesStrategicMerge: -- dendrite-helm-release.yaml - grafana-helm-release.yaml diff --git a/environments/prod/kustomization.yaml b/environments/prod/kustomization.yaml index 5f8ad14..d9890c7 100644 --- a/environments/prod/kustomization.yaml +++ b/environments/prod/kustomization.yaml @@ -3,7 +3,6 @@ kind: Kustomization resources: - ../../base/cert-manager - ../../base/cryptpad -- ../../base/dendrite - ../../base/external-dns - ../../base/grafana - ../../base/prometheus