From 658fd51d3aafa06a6221267d40969d6559914f00 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 21 Jan 2025 18:36:38 +0100 Subject: [PATCH] feat(cert-manager): update config for GatewayAPI --- cert-manager/config/values.cert-manager.yaml | 6 ++- cnpg/hack/migrate.yaml | 42 ++++++++++++++++++++ postgres-operator/app.yaml | 16 ++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 cnpg/hack/migrate.yaml create mode 100644 postgres-operator/app.yaml diff --git a/cert-manager/config/values.cert-manager.yaml b/cert-manager/config/values.cert-manager.yaml index 340f6ab..6a46905 100644 --- a/cert-manager/config/values.cert-manager.yaml +++ b/cert-manager/config/values.cert-manager.yaml @@ -1,2 +1,4 @@ -extraArgs: - - --feature-gates=ExperimentalGatewayAPISupport=true \ No newline at end of file +config: + kind: ControllerConfiguration + apiVersion: "controller.config.cert-manager.io/v1alpha1" + enableGatewayAPI: true diff --git a/cnpg/hack/migrate.yaml b/cnpg/hack/migrate.yaml new file mode 100644 index 0000000..752c20d --- /dev/null +++ b/cnpg/hack/migrate.yaml @@ -0,0 +1,42 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: pgpass-migration +type: Opaque +stringData: + .pgpass: | + default-cluster-primary.postgres.svc:5432:umami:postgres:(g>_lO9v|?(B.4xiYt0}/+m) + app-cluster-pooler-rw.postgres.svc:5432:umami:umami-ciWvqZ:aDvAwEWR7HZz8Ab +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: migrate + namespace: postgres +spec: + template: + spec: + containers: + - name: postgres + image: postgres:16-alpine + command: + - /bin/ash + - -c + - pg_dump --create --clean --no-owner --no-privileges -h default-cluster-primary.postgres.svc -U postgres "${DB_NAME}" | psql -h app-cluster-pooler-rw.postgres.svc -U "${TARGET_USER}" "${DB_NAME}" + env: + - name: DB_NAME + value: umami + - name: TARGET_USER + value: umami-ciWvqZ + volumeMounts: + - name: pgpass + readOnly: true + mountPath: /root/ + restartPolicy: Never + volumes: + - name: pgpass + secret: + defaultMode: 0700 + secretName: pgpass-migration + backoffLimit: 4 \ No newline at end of file diff --git a/postgres-operator/app.yaml b/postgres-operator/app.yaml new file mode 100644 index 0000000..b8ae3a6 --- /dev/null +++ b/postgres-operator/app.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: postgres-operator + namespace: argo-system +spec: + destination: + server: https://kubernetes.default.svc + project: infrastructure + source: + path: postgres-operator + repoURL: https://code.icb4dc0.de/infrastructure/apps.git + targetRevision: HEAD + syncPolicy: + syncOptions: + - ServerSideApply=true