From 7d23d6d63c15a64ba58593f83e27fac7f1d29017 Mon Sep 17 00:00:00 2001 From: kizuna-lek Date: Thu, 10 Oct 2024 11:18:01 +0800 Subject: [PATCH] feat: upgrade official-postgresql to 0.9 api and rename to vanilla-postgresql in release 0.9 --- .../release-addons-cluster-chart.yml | 2 +- .github/workflows/release-chart.yml | 2 +- .../templates/NOTES.txt | 2 - .../templates/cluster.yaml | 13 - .../.helmignore | 0 .../vanilla-postgresql-cluster/Chart.lock | 6 + .../Chart.yaml | 11 +- .../charts/kblib-0.1.0.tgz | Bin 0 -> 3311 bytes .../templates/NOTES.txt | 2 + .../templates/_helpers.tpl | 2 +- .../templates/cluster.yaml | 13 + .../templates/rbac.yaml | 0 .../templates/validate.yaml | 0 .../values.schema.json | 2 +- .../values.yaml | 4 +- .../templates/_helpers.tpl | 79 ----- .../templates/clusterdefinition.yaml | 196 ------------ .../templates/clusterversion.yaml | 51 ---- .../templates/scripts.yaml | 8 - .../.helmignore | 0 .../Chart.yaml | 7 +- .../config/pg12-config-constraint.cue | 0 .../config/pg12-config.tpl | 0 .../config/pg14-config-constraint.cue | 0 .../config/pg14-config.tpl | 0 .../vanilla-postgresql/templates/_helpers.tpl | 286 ++++++++++++++++++ .../templates/clusterdefinition.yaml | 17 ++ .../vanilla-postgresql/templates/cmpd-12.yaml | 29 ++ .../vanilla-postgresql/templates/cmpd-14.yaml | 29 ++ addons/vanilla-postgresql/templates/cmpv.yaml | 27 ++ .../templates/configconstraint-12.yaml | 4 +- .../templates/configconstraint-14.yaml | 4 +- .../templates/configmap-12.yaml | 4 +- .../templates/configmap-14.yaml | 4 +- .../vanilla-postgresql/templates/scripts.yaml | 8 + .../values.yaml | 51 ++-- examples/official-postgresql/README.md | 30 +- examples/official-postgresql/cluster.yaml | 10 +- .../official-postgresql/horizontalscale.yaml | 4 +- examples/official-postgresql/restart.yaml | 4 +- examples/official-postgresql/start.yaml | 4 +- examples/official-postgresql/stop.yaml | 4 +- .../official-postgresql/verticalscale.yaml | 4 +- .../official-postgresql/volumeexpand.yaml | 4 +- 44 files changed, 497 insertions(+), 430 deletions(-) delete mode 100644 addons-cluster/official-postgresql-cluster/templates/NOTES.txt delete mode 100644 addons-cluster/official-postgresql-cluster/templates/cluster.yaml rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/.helmignore (100%) create mode 100644 addons-cluster/vanilla-postgresql-cluster/Chart.lock rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/Chart.yaml (70%) create mode 100644 addons-cluster/vanilla-postgresql-cluster/charts/kblib-0.1.0.tgz create mode 100644 addons-cluster/vanilla-postgresql-cluster/templates/NOTES.txt rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/templates/_helpers.tpl (79%) create mode 100644 addons-cluster/vanilla-postgresql-cluster/templates/cluster.yaml rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/templates/rbac.yaml (100%) rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/templates/validate.yaml (100%) rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/values.schema.json (97%) rename addons-cluster/{official-postgresql-cluster => vanilla-postgresql-cluster}/values.yaml (87%) delete mode 100644 addons/official-postgresql/templates/_helpers.tpl delete mode 100644 addons/official-postgresql/templates/clusterdefinition.yaml delete mode 100644 addons/official-postgresql/templates/clusterversion.yaml delete mode 100644 addons/official-postgresql/templates/scripts.yaml rename addons/{official-postgresql => vanilla-postgresql}/.helmignore (100%) rename addons/{official-postgresql => vanilla-postgresql}/Chart.yaml (67%) rename addons/{official-postgresql => vanilla-postgresql}/config/pg12-config-constraint.cue (100%) rename addons/{official-postgresql => vanilla-postgresql}/config/pg12-config.tpl (100%) rename addons/{official-postgresql => vanilla-postgresql}/config/pg14-config-constraint.cue (100%) rename addons/{official-postgresql => vanilla-postgresql}/config/pg14-config.tpl (100%) create mode 100644 addons/vanilla-postgresql/templates/_helpers.tpl create mode 100644 addons/vanilla-postgresql/templates/clusterdefinition.yaml create mode 100644 addons/vanilla-postgresql/templates/cmpd-12.yaml create mode 100644 addons/vanilla-postgresql/templates/cmpd-14.yaml create mode 100644 addons/vanilla-postgresql/templates/cmpv.yaml rename addons/{official-postgresql => vanilla-postgresql}/templates/configconstraint-12.yaml (80%) rename addons/{official-postgresql => vanilla-postgresql}/templates/configconstraint-14.yaml (80%) rename addons/{official-postgresql => vanilla-postgresql}/templates/configmap-12.yaml (85%) rename addons/{official-postgresql => vanilla-postgresql}/templates/configmap-14.yaml (85%) create mode 100644 addons/vanilla-postgresql/templates/scripts.yaml rename addons/{official-postgresql => vanilla-postgresql}/values.yaml (57%) diff --git a/.github/workflows/release-addons-cluster-chart.yml b/.github/workflows/release-addons-cluster-chart.yml index 4a6b2851d..50044f246 100644 --- a/.github/workflows/release-addons-cluster-chart.yml +++ b/.github/workflows/release-addons-cluster-chart.yml @@ -36,7 +36,7 @@ on: - nebula-cluster - neon-cluster - oceanbase-ce-cluster - - official-postgresql-cluster + - vanilla-postgresql-cluster - opengauss-cluster - openldap-cluster - opensearch-cluster diff --git a/.github/workflows/release-chart.yml b/.github/workflows/release-chart.yml index 6be553f5c..0865c06c2 100644 --- a/.github/workflows/release-chart.yml +++ b/.github/workflows/release-chart.yml @@ -35,7 +35,7 @@ on: - nebula - neon - oceanbase-ce - - official-postgresql + - vanilla-postgresql - opengauss - openldap - opensearch diff --git a/addons-cluster/official-postgresql-cluster/templates/NOTES.txt b/addons-cluster/official-postgresql-cluster/templates/NOTES.txt deleted file mode 100644 index 2b76c0505..000000000 --- a/addons-cluster/official-postgresql-cluster/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -1. By default, the helm chart will create an Official PostgreSQL cluster with the same version as the Chart appVersion. -2. If you need to create a different version, you need to specify the version through clusterVersionOverride value. diff --git a/addons-cluster/official-postgresql-cluster/templates/cluster.yaml b/addons-cluster/official-postgresql-cluster/templates/cluster.yaml deleted file mode 100644 index e4b45617e..000000000 --- a/addons-cluster/official-postgresql-cluster/templates/cluster.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- include "kblib.clusterCommon" . }} - clusterDefinitionRef: official-postgresql - componentSpecs: - - name: postgresql - componentDefRef: postgresql - {{- include "kblib.componentMonitor" . | indent 6 }} - {{- include "official-postgresql-cluster.replicaCount" . | indent 6 }} - serviceAccountName: {{ include "kblib.serviceAccountName" . }} - switchPolicy: - type: Noop - {{- include "kblib.componentResources" . | indent 6 }} - {{- include "kblib.componentStorages" . | indent 6 }} - {{- include "kblib.componentServices" . | indent 6 }} \ No newline at end of file diff --git a/addons-cluster/official-postgresql-cluster/.helmignore b/addons-cluster/vanilla-postgresql-cluster/.helmignore similarity index 100% rename from addons-cluster/official-postgresql-cluster/.helmignore rename to addons-cluster/vanilla-postgresql-cluster/.helmignore diff --git a/addons-cluster/vanilla-postgresql-cluster/Chart.lock b/addons-cluster/vanilla-postgresql-cluster/Chart.lock new file mode 100644 index 000000000..40e5e8722 --- /dev/null +++ b/addons-cluster/vanilla-postgresql-cluster/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: kblib + repository: file://../kblib + version: 0.1.0 +digest: sha256:6894d645e270bae072e3334549187801abc343630044c9da70e7a22e2ebfc55b +generated: "2024-10-10T11:06:36.796796+08:00" diff --git a/addons-cluster/official-postgresql-cluster/Chart.yaml b/addons-cluster/vanilla-postgresql-cluster/Chart.yaml similarity index 70% rename from addons-cluster/official-postgresql-cluster/Chart.yaml rename to addons-cluster/vanilla-postgresql-cluster/Chart.yaml index 64750047f..060c596d3 100644 --- a/addons-cluster/official-postgresql-cluster/Chart.yaml +++ b/addons-cluster/vanilla-postgresql-cluster/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -name: official-postgresql-cluster +name: vanilla-postgresql-cluster type: application version: 0.9.0 -description: A Official PostgreSQL cluster definition Helm chart for Kubernetes +description: A Vanilla PostgreSQL cluster Helm chart for Kubernetes dependencies: - name: kblib @@ -21,8 +21,9 @@ keywords: - database - sql - cluster + - vanilla -home: https://github.com/apecloud/kubeblocks/tree/main/deploy/apecloud-postgresql-cluster +home: https://github.com/apecloud/kubeblocks/tree/main/deploy/vanilla-postgresql-cluster icon: https://kubeblocks.io/img/logo.png maintainers: @@ -31,9 +32,9 @@ maintainers: sources: - https://github.com/apecloud/kubeblocks/ - - https://github.com/apecloud/kubeblocks/tree/main/deploy/apecloud-postgresql + - https://github.com/apecloud/kubeblocks/tree/main/deploy/vanilla-postgresql annotations: - kubeblocks.io/clusterVersions: "14.8.0,12.15.0" + kubeblocks.io/clusterVersions: "14.7.0,12.15.0" kubeblocks.io/multiCV: "true" category: Database \ No newline at end of file diff --git a/addons-cluster/vanilla-postgresql-cluster/charts/kblib-0.1.0.tgz b/addons-cluster/vanilla-postgresql-cluster/charts/kblib-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..642e4f658c4a368dbccb744e21ff3b3dd0b117d7 GIT binary patch literal 3311 zcmVDc zVQyr3R8em|NM&qo0PH+#a}zm`e4by?H-@T&izl{mk~>#z-G#uh)Gm(#j{QLGE%Hp; z)>@VZN#kHb?zdm*G4{M1hme@vJ*x_0OWm!O)asWcPlt>S56>n<>S#e`?A{%ePN&m3 z?)UBAPN!4-+v%S4?{)hpo$hhJ*E>17*Xj0p$H(`ea~I51OQtlD_d4I*S9NfIlR{GZ z9;Kp!4`AL4NSZFccA{?72@+JXq^Y)5r|>HsN+K8VGqM@PMr>dtB>a*M@i7zeR7C+N zGaP^wtUxbP8~}4j!MsfRM~{71?%i|ye@aG;PhW+0?I_gyS|55MJZvStiwBSt4 zW`ctg0lS%FmMM+WZEqC>trq-eN+g-VOmM1&qqPx z)6c1p8sz}A%&yS}t!4mEkfAQ2kvXBvQ1(czR^Y2Bqk54ea*>qL zMkC6pUc3|u{z`_(l)-GZ;JF48$Czpb1ZE_KbE+r63qzXpkyZ19&ZQgi>NsUL;O0gMP!r4G_; z$Y{(K8>m}Z<*18Y)KMGg%OQ!MawBcYim<5!iArQLM&;IRh!9IO6J%%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