Upgrading PGO 5.1.2

以前Crunchy Postgres Operator 5.1.0をインストールしたが、PGO(The Postgres Operator from Crunchy Data)5.1.2がリリースされたのでアップグレードしてみる。


PGOアップグレード

5.1.2の各種サンプル設定ファイルを作業環境に複製。

git clone https://github.com/CrunchyData/postgres-operator-examples.git
mv postgres-operator-examples v512
cd v512

CRDsの差分チェック

kubectl diff -f helm/install/crds | less

CRDsをアップグレード

kubectl apply --server-side --force-conflicts -f helm/install/crds

PGOをアップグレード

helm upgrade pgo5 -n pgo5 helm/install

成功すると下記のように表示される。

Release "pgo5" has been upgraded. Happy Helming!
NAME: pgo5
LAST DEPLOYED: Tue Jul 19 14:45:03 2022
NAMESPACE: pgo5
STATUS: deployed
REVISION: 4
TEST SUITE: None
NOTES:
Thank you for deploying PGO v5.1.2!

PostgreSQLクラスターのアップグレード

Clusterマニフェスト(kustomize/hipha/postgres.yaml)のイメージ値を更新する。

git diff
diff --git a/pgo5/kustomize/hipha/postgres.yaml b/pgo5/kustomize/hipha/postgres.yaml
index 048bea6..8030c44 100644
--- a/pgo5/kustomize/hipha/postgres.yaml
+++ b/pgo5/kustomize/hipha/postgres.yaml
@@ -3,7 +3,7 @@ kind: PostgresCluster
 metadata:
   name: hipha
 spec:
-  image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.2-1
+  image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.4-0
   postgresVersion: 14
   instances:
     - name: hipha1
@@ -27,7 +27,7 @@ spec:

   proxy:
     pgBouncer:
-      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.16-2
+      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.16-4
       replicas: 2
       affinity:
         podAntiAffinity:
@@ -42,7 +42,7 @@ spec:

   backups:
     pgbackrest:
-      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.38-0
+      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.38-2
       configuration:
       - secret:
           name: pgo-s3-creds

マニフェストを適用。

 kubectl apply -k kustomize/hipha

ローリングアップグレードされる。14.4にアップグレードされていることを確認。

PGPASSWORD=$(kubectl get secrets -n pgo5 hipha-pguser-postgres -o go-template='{{.data.password | base64decode}}') psql -h localhost -U postgres
psql (14.4)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=# select version();
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
(1 row)

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です