Skip to content

Commit 8fc2b89

Browse files
Merge pull request #183 from RS-PYTHON/update-cloudnative-pg-1-27-0
Update to cloudnative-pg 1.27.0 / postgresql 17.5
2 parents 58f3657 + a20277b commit 8fc2b89

File tree

23 files changed

+213
-66
lines changed

23 files changed

+213
-66
lines changed

.github/workflows/test-deployment.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ jobs:
4949
conda create -y -n rspy python=3.11
5050
5151
# Install Ansible, Terraform, Openstackclient
52-
conda run -n rspy conda install -y -c conda-forge ansible terraform python-openstackclient passlib boto3 kubernetes-helm kubernetes-client python-kubernetes
52+
conda run -n rspy conda install -y -c conda-forge "ansible<12" terraform python-openstackclient passlib boto3 kubernetes-helm kubernetes-client python-kubernetes
53+
54+
conda run -n rspy ansible-galaxy collection install openstack.cloud amazon.aws kubernetes.core community.general
5355
54-
conda run -n rspy ansible-galaxy collection install openstack.cloud amazon.aws kubernetes.core
5556
ln -s /usr/share/miniconda/envs/rspy/bin/kubectl /usr/local/bin/kubectl
5657
shell: bash
5758
- name: Start minikube
@@ -81,7 +82,15 @@ jobs:
8182
run: |
8283
sed -i 's!debug: false!debug: true!g' roles/app-installer/tasks/install_app.yaml
8384
sed -i 's!cinder.csi.openstack.org!k8s.io/minikube-hostpath!g' apps/00-storage-class/sc-retain.yaml
84-
sed -i 's!instances: 3!instances: 2!g' apps/01-cloudnative-pg/cluster.yaml
85+
sed -i 's!instances: 3!instances: 1!g' apps/03-cloudnative-pg/cluster.yaml
8586
sed -i -e 's!https://iam.{{ platform_domain_name }}!http://keycloak-service.iam.svc.cluster.local:8080!g' -e 's!insecure_oidc_skip_issuer_verification="false"!insecure_oidc_skip_issuer_verification="true"!g' apps/oauth2-proxy/values.yaml
87+
88+
# Minio for cloudnative pg
89+
sed -i -e 's!{{ s3.access_key }}!access_key!' -e 's!{{ s3.secret_key }}!secret_key!' apps/03-cloudnative-pg/secrets.yaml
90+
sed -i -e 's!{{ postgresql.bucket }}!bucket!' -e 's!{{ s3.endpoint }}!http://minio.minio.svc.cluster.local:9000!' apps/03-cloudnative-pg/objectstore.yaml
91+
helm repo add minio https://charts.min.io/
92+
helm repo update minio
93+
helm install minio minio/minio --namespace minio --set mode=standalone --set persistence.enabled=false --set resources.requests.memory=1Gi --set rootUser=access_key --set rootPassword=secret_key --set buckets[0].name=bucket --create-namespace --wait
94+
8695
conda run -n rspy --no-capture-output env PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=1 ansible-playbook apps.yaml -i inventory/mycluster/hosts.yaml
8796
shell: bash

NOTICE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ Below are all the FOSS (Free and open-source software) used and their respective
4343

4444
- PostgreSQL
4545
- Helm chart:
46-
- Version: 0.20.1
47-
- Licence: [Apache License 2.0](https://github.com/cloudnative-pg/charts/blob/cloudnative-pg-v0.20.1/LICENSE)
48-
- Source: <https://github.com/cloudnative-pg/charts/tree/cloudnative-pg-v0.20.1>
46+
- Version: 0.26.0
47+
- Licence: [Apache License 2.0](https://github.com/cloudnative-pg/charts/blob/cloudnative-pg-v0.26.0/LICENSE)
48+
- Source: <https://github.com/cloudnative-pg/charts/tree/cloudnative-pg-v0.26.0>
4949
- Copyright: Copyright The CloudNativePG authors. [Authors and Contributors](https://github.com/cloudnative-pg/charts/graphs/contributors)
5050
- Container image(s)
51-
- ghcr.io/cloudnative-pg/cloudnative-pg:1.22.1
52-
- License: [Apache License 2.0](https://github.com/cloudnative-pg/cloudnative-pg/blob/v1.22.1/LICENSE)
53-
- ghcr.io/cloudnative-pg/postgresql:16.1
51+
- ghcr.io/cloudnative-pg/cloudnative-pg:1.27.0
52+
- License: [Apache License 2.0](https://github.com/cloudnative-pg/cloudnative-pg/blob/v1.27.0/LICENSE)
53+
- ghcr.io/cloudnative-pg/postgresql:17.5
5454
- License: [Apache License 2.0](https://github.com/cloudnative-pg/postgres-containers/blob/main/LICENSE)
5555

5656
- Loki

apps/00-crds-cloudnative-pg/kustomization.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@
1414

1515

1616
resources:
17-
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.22.1/config/crd/bases/postgresql.cnpg.io_clusters.yaml
18-
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.22.1/config/crd/bases/postgresql.cnpg.io_backups.yaml
19-
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.22.1/config/crd/bases/postgresql.cnpg.io_poolers.yaml
20-
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.22.1/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml
17+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_clusters.yaml
18+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_backups.yaml
19+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_scheduledbackups.yaml
20+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_poolers.yaml
21+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_imagecatalogs.yaml
22+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_clusterimagecatalogs.yaml
23+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_databases.yaml
24+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_publications.yaml
25+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_subscriptions.yaml
26+
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v1.27.0/config/crd/bases/postgresql.cnpg.io_failoverquorums.yaml
27+
- https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/tags/v0.6.0/config/crd/bases/barmancloud.cnpg.io_objectstores.yaml
2128
apiVersion: kustomize.config.k8s.io/v1beta1
2229
kind: Kustomization
2330
labels:

apps/01-cert-manager/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ cainjector:
4141
- key: "node-role.kubernetes.io/infra"
4242
operator: Exists
4343

44-
4544
affinity:
4645
nodeAffinity:
4746
requiredDuringSchedulingIgnoredDuringExecution:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2024 CS Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
namespace: database
16+
17+
apiVersion: kustomize.config.k8s.io/v1beta1
18+
kind: Kustomization
19+
labels:
20+
- includeSelectors: true
21+
includeTemplates: true
22+
pairs:
23+
app.kubernetes.io/instance: '{{ app_name }}'
24+
wait-for-deployment: Ready
25+
resources:
26+
- https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.6.0/manifest.yaml

apps/01-cloudnative-pg/cluster.yaml renamed to apps/03-cloudnative-pg/cluster.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,11 @@ spec:
2424

2525
enableSuperuserAccess: true
2626

27-
backup:
28-
barmanObjectStore:
29-
destinationPath: s3://{{ postgresql.bucket }}/postgresql-cluster/
30-
endpointURL: {{ s3.endpoint }}
31-
s3Credentials:
32-
accessKeyId:
33-
key: AK
34-
name: psql-backup-obs
35-
secretAccessKey:
36-
key: SK
37-
name: psql-backup-obs
38-
retentionPolicy: "10d"
27+
plugins:
28+
- name: barman-cloud.cloudnative-pg.io
29+
isWALArchiver: true
30+
parameters:
31+
barmanObjectName: ovh-gra
3932

4033
postgresql:
4134
parameters:

apps/01-cloudnative-pg/kustomization.yaml renamed to apps/03-cloudnative-pg/kustomization.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
1615
namespace: database
1716

1817
helmCharts:
@@ -21,13 +20,16 @@ helmCharts:
2120
releaseName: '{{ app_name }}'
2221
repo: https://cloudnative-pg.io/charts/
2322
valuesFile: values.yaml
24-
version: 0.20.1
23+
version: 0.26.0
2524

2625
resources:
2726
- cluster.yaml
2827
- configmap-create-database.yaml
29-
- secrets.yaml
28+
- objectstore.yaml
3029
- scheduled-backup.yaml
30+
- secrets.yaml
31+
- servicemonitor.yaml
32+
3133
apiVersion: kustomize.config.k8s.io/v1beta1
3234
kind: Kustomization
3335
labels:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2024 CS Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: barmancloud.cnpg.io/v1
16+
kind: ObjectStore
17+
metadata:
18+
name: ovh-gra
19+
spec:
20+
configuration:
21+
destinationPath: s3://{{ postgresql.bucket }}/postgresql-cluster/
22+
endpointURL: {{ s3.endpoint }}
23+
s3Credentials:
24+
accessKeyId:
25+
key: AK
26+
name: psql-backup-obs
27+
secretAccessKey:
28+
key: SK
29+
name: psql-backup-obs
30+
retentionPolicy: "10d"

apps/01-cloudnative-pg/scheduled-backup.yaml renamed to apps/03-cloudnative-pg/scheduled-backup.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ apiVersion: postgresql.cnpg.io/v1
1616
kind: ScheduledBackup
1717
metadata:
1818
name: backup-postgresql-cluster
19+
labels:
20+
wait-for-deployment: Ready
1921
spec:
22+
immediate: true
2023
schedule: "0 0 11 * * *"
2124
backupOwnerReference: self
2225
cluster:
2326
name: postgresql-cluster
27+
method: plugin
28+
pluginConfiguration:
29+
name: barman-cloud.cloudnative-pg.io

0 commit comments

Comments
 (0)