From c7418c8739fa23d47269d4e8ae7b4dfb0d9a8597 Mon Sep 17 00:00:00 2001 From: paulfantom Date: Sat, 30 Nov 2024 11:48:09 +0100 Subject: [PATCH] deploy changedetection --- apps/changedetection/kustomization.yaml | 13 +++++++++ apps/changedetection/kustomizeconfig.yaml | 8 ++++++ apps/changedetection/namespace.yaml | 4 +++ apps/changedetection/release.yaml | 32 +++++++++++++++++++++ apps/changedetection/repository.yaml | 7 +++++ apps/changedetection/values.yaml | 35 +++++++++++++++++++++++ base/flux-apps/changedetection.yaml | 12 ++++++++ 7 files changed, 111 insertions(+) create mode 100644 apps/changedetection/kustomization.yaml create mode 100644 apps/changedetection/kustomizeconfig.yaml create mode 100644 apps/changedetection/namespace.yaml create mode 100644 apps/changedetection/release.yaml create mode 100644 apps/changedetection/repository.yaml create mode 100644 apps/changedetection/values.yaml create mode 100644 base/flux-apps/changedetection.yaml diff --git a/apps/changedetection/kustomization.yaml b/apps/changedetection/kustomization.yaml new file mode 100644 index 000000000..1b49ddb0c --- /dev/null +++ b/apps/changedetection/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: changedetection +resources: + - repository.yaml + - namespace.yaml + - release.yaml +configMapGenerator: + - name: values + files: + - values.yaml=values.yaml +configurations: + - kustomizeconfig.yaml diff --git a/apps/changedetection/kustomizeconfig.yaml b/apps/changedetection/kustomizeconfig.yaml new file mode 100644 index 000000000..cf934c6cb --- /dev/null +++ b/apps/changedetection/kustomizeconfig.yaml @@ -0,0 +1,8 @@ +# Kustomize config for enabling HelmRelease values from +# ConfigMaps and Secrets generated by Kustomize +nameReference: +- kind: ConfigMap + version: v1 + fieldSpecs: + - path: spec/valuesFrom/name + kind: HelmRelease diff --git a/apps/changedetection/namespace.yaml b/apps/changedetection/namespace.yaml new file mode 100644 index 000000000..5463e8f07 --- /dev/null +++ b/apps/changedetection/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: changedetection diff --git a/apps/changedetection/release.yaml b/apps/changedetection/release.yaml new file mode 100644 index 000000000..dc06a5123 --- /dev/null +++ b/apps/changedetection/release.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: changedetection +spec: + chart: + spec: + chart: changedetection + version: "0.6.1" + sourceRef: + kind: HelmRepository + name: alekc-charts + namespace: changedetection + interval: 5m + valuesFile: values.yaml + interval: 5m + timeout: 2m + install: + timeout: 10m + disableWait: false + crds: CreateReplace + createNamespace: true + remediation: + retries: 3 + upgrade: + timeout: 10m + disableWait: false + crds: CreateReplace + valuesFrom: + - kind: ConfigMap + name: values diff --git a/apps/changedetection/repository.yaml b/apps/changedetection/repository.yaml new file mode 100644 index 000000000..f808cc4f6 --- /dev/null +++ b/apps/changedetection/repository.yaml @@ -0,0 +1,7 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: alekc-charts +spec: + interval: 5m + url: https://charts.alekc.dev diff --git a/apps/changedetection/values.yaml b/apps/changedetection/values.yaml new file mode 100644 index 000000000..8c703e15f --- /dev/null +++ b/apps/changedetection/values.yaml @@ -0,0 +1,35 @@ +# Reference documentation: https://gitlab.com/alexander-chernov/helm/changedetection + +ingress: + enabled: true + className: private + annotations: + cert-manager.io/cluster-issuer: letsencrypt-dns01 + reloader.homer/group: Ankh Cloud + reloader.homer/logo: https://user-images.githubusercontent.com/275001/231676626-7d768df9-be4c-4187-a573-aba640b826d3.svg + reloader.homer/name: Change Detection + reloader.homer/subtitle: Website change detection + reloader.homer/tag: local + labels: + reloader.homer/enabled: "true" + hosts: + - host: change.ankhmorpork.thaum.xyz + paths: + - path: / + pathType: ImplementationSpecific + tls: + - secretName: change-ankhmorpork-thaum-xyz-tls + hosts: + - change.ankhmorpork.thaum.xyz + +resources: + # limits: + # cpu: 100m + # memory: 128Mi + requests: + cpu: 100m + memory: 128Mi + +persistence: + storageClass: "longhorn-r2" + size: 1Gi diff --git a/base/flux-apps/changedetection.yaml b/base/flux-apps/changedetection.yaml new file mode 100644 index 000000000..37b365957 --- /dev/null +++ b/base/flux-apps/changedetection.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: changedetection + namespace: flux-apps +spec: + interval: 15m0s + path: ./apps/changedetection + prune: true + sourceRef: + kind: GitRepository + name: ankhmorpork