From dec4cff7ed0a6d662d7b5f4568855ace355abbe8 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sat, 27 Jan 2024 13:27:05 -0600 Subject: [PATCH] Adding crunchy-postgres-operator. --- .../crunchy-postgres-operator/ks.yaml | 19 ++++++++++++++ .../operator/helmrelease.yaml | 25 +++++++++++++++++++ .../operator/kustomization.yaml | 7 ++++++ kubernetes/apps/database/kustomization.yaml | 9 +++++++ kubernetes/apps/database/namespace.yaml | 7 ++++++ 5 files changed, 67 insertions(+) create mode 100644 kubernetes/apps/database/crunchy-postgres-operator/ks.yaml create mode 100644 kubernetes/apps/database/crunchy-postgres-operator/operator/helmrelease.yaml create mode 100644 kubernetes/apps/database/crunchy-postgres-operator/operator/kustomization.yaml create mode 100644 kubernetes/apps/database/kustomization.yaml create mode 100644 kubernetes/apps/database/namespace.yaml diff --git a/kubernetes/apps/database/crunchy-postgres-operator/ks.yaml b/kubernetes/apps/database/crunchy-postgres-operator/ks.yaml new file mode 100644 index 00000000..c5030ece --- /dev/null +++ b/kubernetes/apps/database/crunchy-postgres-operator/ks.yaml @@ -0,0 +1,19 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &appname crunchy-postgres-operator + namespace: flux-system +spec: + targetNamespace: database + commonMetadata: + labels: + app.kubernetes.io/name: *appname + interval: 10m + path: "./kubernetes/apps/database/crunchy-postgres-operator/operator" + prune: true + sourceRef: + kind: GitRepository + name: homelab + wait: true diff --git a/kubernetes/apps/database/crunchy-postgres-operator/operator/helmrelease.yaml b/kubernetes/apps/database/crunchy-postgres-operator/operator/helmrelease.yaml new file mode 100644 index 00000000..5d0d3aa8 --- /dev/null +++ b/kubernetes/apps/database/crunchy-postgres-operator/operator/helmrelease.yaml @@ -0,0 +1,25 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json +apiVersion: helm.toolkit.fluxcd.io/v2beta2 +kind: HelmRelease +metadata: + name: crunchy-postgres-operator +spec: + interval: 30m + chart: + spec: + chart: pgo + version: 5.5.0 + sourceRef: + kind: HelmRepository + name: crunchydata + namespace: flux-system + interval: 5m + install: + crds: CreateReplace + upgrade: + crds: CreateReplace + values: + install: + clusterLabels: + app.kubernetes.io/name: pgo diff --git a/kubernetes/apps/database/crunchy-postgres-operator/operator/kustomization.yaml b/kubernetes/apps/database/crunchy-postgres-operator/operator/kustomization.yaml new file mode 100644 index 00000000..5b7d6d5d --- /dev/null +++ b/kubernetes/apps/database/crunchy-postgres-operator/operator/kustomization.yaml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml + - ./networkpolicy.yaml diff --git a/kubernetes/apps/database/kustomization.yaml b/kubernetes/apps/database/kustomization.yaml new file mode 100644 index 00000000..cee4ba66 --- /dev/null +++ b/kubernetes/apps/database/kustomization.yaml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Pre Flux-Kustomizations + - ./namespace.yaml + # Flux-Kustomizations + - ./crunchy-postgres-operator/ks.yaml diff --git a/kubernetes/apps/database/namespace.yaml b/kubernetes/apps/database/namespace.yaml new file mode 100644 index 00000000..5cad2860 --- /dev/null +++ b/kubernetes/apps/database/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: database + labels: + kustomize.toolkit.fluxcd.io/prune: disabled