From e56fa61b1aabd1c86aa1400f737c62dcd5e4d4e5 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Sat, 26 Oct 2024 15:39:47 +0200 Subject: [PATCH] add cloudnative-pg --- .../base/cloudnative-pg-application.yaml | 20 +++++++++++++++++++ argocd-applications/kustomization.yaml | 1 + cloudnative-pg/cluster-example.yaml | 15 ++++++++++++++ cloudnative-pg/kustomization.yaml | 9 +++++++++ .../pgnative-cluster-image-catalog.yaml | 18 +++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 argocd-applications/base/cloudnative-pg-application.yaml create mode 100644 cloudnative-pg/cluster-example.yaml create mode 100644 cloudnative-pg/kustomization.yaml create mode 100644 cloudnative-pg/pgnative-cluster-image-catalog.yaml diff --git a/argocd-applications/base/cloudnative-pg-application.yaml b/argocd-applications/base/cloudnative-pg-application.yaml new file mode 100644 index 0000000..41a2216 --- /dev/null +++ b/argocd-applications/base/cloudnative-pg-application.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-app-cloudnative-pg + namespace: argocd +spec: + destination: + name: '' + namespace: default + server: https://kubernetes.default.svc + source: + path: cloudnative-pg + repoURL: https://git.mziesel.nl/mans/argocd-test + targetRevision: HEAD + sources: [] + project: default + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/argocd-applications/kustomization.yaml b/argocd-applications/kustomization.yaml index 05d5ef5..500571b 100644 --- a/argocd-applications/kustomization.yaml +++ b/argocd-applications/kustomization.yaml @@ -14,3 +14,4 @@ resources: - ./base/redlib-application.yaml - ./base/librespeed-application.yaml - ./base/nfs-subdir-external-provisioner-application.yaml +- ./base/cloudnative-pg-application.yaml diff --git a/cloudnative-pg/cluster-example.yaml b/cloudnative-pg/cluster-example.yaml new file mode 100644 index 0000000..5a59ebd --- /dev/null +++ b/cloudnative-pg/cluster-example.yaml @@ -0,0 +1,15 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: cluster-example +spec: + instances: 3 + imageCatalogRef: + apiGroup: postgresql.cnpg.io + kind: ImageCatalog + name: postgresql + major: 17 + + storage: + size: 10Gi + # storageClass: nfs-client diff --git a/cloudnative-pg/kustomization.yaml b/cloudnative-pg/kustomization.yaml new file mode 100644 index 0000000..0f951ba --- /dev/null +++ b/cloudnative-pg/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: cnpg-system + +resources: + - https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.24/releases/cnpg-1.24.1.yaml + - ./pgnative-cluster-image-catalog.yaml + # - ./cluster-example.yaml diff --git a/cloudnative-pg/pgnative-cluster-image-catalog.yaml b/cloudnative-pg/pgnative-cluster-image-catalog.yaml new file mode 100644 index 0000000..539d473 --- /dev/null +++ b/cloudnative-pg/pgnative-cluster-image-catalog.yaml @@ -0,0 +1,18 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: ClusterImageCatalog +metadata: + name: postgresql +spec: + images: + - major: 12 + image: ghcr.io/cloudnative-pg/postgresql:12.20-46-bookworm@sha256:c98f0894d27852de8f2e933bf680e0daee4c58b684b85aae37d8cdd5381ee681 + - major: 13 + image: ghcr.io/cloudnative-pg/postgresql:13.16-46-bookworm@sha256:b878d0396e6a7fc218c1625e9e62128194e9a1ddf2fb15c66118b29609ac06fa + - major: 14 + image: ghcr.io/cloudnative-pg/postgresql:14.13-46-bookworm@sha256:a67167caba7df8c35f767bcaa255f0a42076fadb5c4ba2ad52e181d47df17e29 + - major: 15 + image: ghcr.io/cloudnative-pg/postgresql:15.8-46-bookworm@sha256:a799ecb6c98b182c60046d8838fc5070b77aee9c343e5cf25b401f30bada2311 + - major: 16 + image: ghcr.io/cloudnative-pg/postgresql:16.4-46-bookworm@sha256:aeca82e0143aa7694459f2a7d7f1c826f1ab3657cb4a9d9bfbbb0095bab68829 + - major: 17 + image: ghcr.io/cloudnative-pg/postgresql:17.0-24-bookworm@sha256:88360d84e9af20ade3dfc1924d7455fa9ec0f8ed1941dc107cfac1e024c40279