revert(postgres-operator): revert update to v1.27.3 - #2353
Conversation
📝 WalkthroughWalkthroughThis PR downgrades the CloudNative PostgreSQL Helm chart from version 0.26.1 to 0.23.0 and app version from 1.27.1 to 1.25.0. It removes optional deployment features including topology spread constraints, update strategy configuration, and startup probes, while adjusting namespace references to use the Helm release namespace and removing RBAC rules and webhook entries for specific resources. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request reverts the CloudNativePG operator to version 0.23.0, removing several resources, update strategies, and probes. Feedback highlights the need to pin the Helm chart version in the Makefile to ensure consistency and identifies typos in the documentation. Additionally, it is recommended to use the cloudnative-pg.namespace helper instead of .Release.Namespace in various templates to preserve the namespaceOverride functionality.
| helm repo add cnpg https://cloudnative-pg.github.io/charts | ||
| helm repo update cnpg | ||
| helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.26.1 | ||
| helm pull cnpg/cloudnative-pg --untar --untardir charts |
There was a problem hiding this comment.
| | Key | Type | Default | Description | | ||
| |-----|------|---------|-------------| | ||
| | additionalArgs | list | `[]` | Additional arguments to be added to the operator's args list. | | ||
| | additionalArgs | list | `[]` | Additinal arguments to be added to the operator's args list. | |
There was a problem hiding this comment.
| maxConcurrentReconciles: 10 | ||
|
|
||
| # -- Additional arguments to be added to the operator's args list. | ||
| # -- Additinal arguments to be added to the operator's args list. |
| {{- if not .Values.config.clusterWide }} | ||
| - name: WATCH_NAMESPACE | ||
| value: "{{ include "cloudnative-pg.namespace" . }}" | ||
| value: "{{ .Release.Namespace }}" |
There was a problem hiding this comment.
| - kind: ServiceAccount | ||
| name: {{ include "cloudnative-pg.serviceAccountName" . }} | ||
| namespace: {{ include "cloudnative-pg.namespace" . }} | ||
| namespace: {{ .Release.Namespace }} |
| - kind: ServiceAccount | ||
| name: {{ include "cloudnative-pg.serviceAccountName" . }} | ||
| namespace: {{ include "cloudnative-pg.namespace" . }} | ||
| namespace: {{ .Release.Namespace }} |
| @@ -1,5 +1,5 @@ | |||
|
|
|||
| CloudNativePG operator should be installed in namespace "{{ include "cloudnative-pg.namespace" . }}". | |||
| CloudNativePG operator should be installed in namespace "{{ .Release.Namespace }}". | |||
| name: cluster-example | ||
| {{if not .Values.config.clusterWide -}} | ||
| namespace: {{ include "cloudnative-pg.namespace" . }} | ||
| namespace: {{ .Release.Namespace }} |
| service: | ||
| name: {{ .Values.service.name }} | ||
| namespace: {{ include "cloudnative-pg.namespace" . }} | ||
| namespace: {{ .Release.Namespace }} |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/system/postgres-operator/Makefile (1)
6-11: Missing version pin makesmake updatenon-reproducible.The
helm pullcommand lacks the--versionflag. Runningmake updatewill fetch the latest chart version from the repository instead of the intended 0.23.0, breaking reproducibility and potentially causing unintended upgrades.The standard pattern in
hack/package.mk(lines 32-35) includes version pinning:helm pull $(REPO_NAME)/$(CHART_NAME) --untar --untardir charts --version "$(CHART_VERSION)"Proposed fix to pin the chart version
update: rm -rf charts helm repo add cnpg https://cloudnative-pg.github.io/charts helm repo update cnpg - helm pull cnpg/cloudnative-pg --untar --untardir charts + helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.23.0 rm -rf charts/cloudnative-pg/charts🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/system/postgres-operator/Makefile` around lines 6 - 11, The update target currently runs "helm pull cnpg/cloudnative-pg --untar --untardir charts" without pinning a chart version; change that helm pull invocation in the update target to include a fixed version (either --version "0.23.0" or use a CHART_VERSION variable like --version "$(CHART_VERSION)") so the Makefile's update target is reproducible and matches the pattern used in hack/package.mk; update the line in the update recipe where helm pull is invoked.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/system/postgres-operator/charts/cloudnative-pg/README.md`:
- Line 29: Replace the misspelled description "Additinal" with "Additional" for
the chart value named additionalArgs in the README (and the same typo in
values.yaml) so both documentation entries read "Additional arguments to be
added to the operator's args list."; update the README.md table cell and the
corresponding values.yaml comment/description for additionalArgs to ensure
consistency with upstream.
In
`@packages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yaml`:
- Around line 154-155: The file
packages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yaml
contains extra trailing blank lines at the end of the file; open that template
(deployment.yaml) and remove the superfluous blank lines so the file ends
immediately after the last non-empty line, then save to eliminate the
static-analysis warning.
---
Nitpick comments:
In `@packages/system/postgres-operator/Makefile`:
- Around line 6-11: The update target currently runs "helm pull
cnpg/cloudnative-pg --untar --untardir charts" without pinning a chart version;
change that helm pull invocation in the update target to include a fixed version
(either --version "0.23.0" or use a CHART_VERSION variable like --version
"$(CHART_VERSION)") so the Makefile's update target is reproducible and matches
the pattern used in hack/package.mk; update the line in the update recipe where
helm pull is invoked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6bf79fe5-00b3-47fa-88fe-7a3039c20af2
📒 Files selected for processing (17)
packages/system/postgres-operator/Makefilepackages/system/postgres-operator/charts/cloudnative-pg/Chart.yamlpackages/system/postgres-operator/charts/cloudnative-pg/README.mdpackages/system/postgres-operator/charts/cloudnative-pg/templates/NOTES.txtpackages/system/postgres-operator/charts/cloudnative-pg/templates/_helpers.tplpackages/system/postgres-operator/charts/cloudnative-pg/templates/config.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/crds/crds.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/monitoring-configmap.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/mutatingwebhookconfiguration.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/podmonitor.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/rbac.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/service.yamlpackages/system/postgres-operator/charts/cloudnative-pg/templates/validatingwebhookconfiguration.yamlpackages/system/postgres-operator/charts/cloudnative-pg/values.schema.jsonpackages/system/postgres-operator/charts/cloudnative-pg/values.yamlpackages/system/postgres-operator/values.yaml
💤 Files with no reviewable changes (3)
- packages/system/postgres-operator/values.yaml
- packages/system/postgres-operator/charts/cloudnative-pg/templates/_helpers.tpl
- packages/system/postgres-operator/charts/cloudnative-pg/values.schema.json
| | Key | Type | Default | Description | | ||
| |-----|------|---------|-------------| | ||
| | additionalArgs | list | `[]` | Additional arguments to be added to the operator's args list. | | ||
| | additionalArgs | list | `[]` | Additinal arguments to be added to the operator's args list. | |
There was a problem hiding this comment.
Typo: "Additinal" should be "Additional".
Same typo as in values.yaml. This is inherited from the upstream chart version 0.23.0.
🧰 Tools
🪛 LanguageTool
[grammar] ~29-~29: Ensure spelling is correct
Context: ...-----| | additionalArgs | list | [] | Additinal arguments to be added to the operator's...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/system/postgres-operator/charts/cloudnative-pg/README.md` at line
29, Replace the misspelled description "Additinal" with "Additional" for the
chart value named additionalArgs in the README (and the same typo in
values.yaml) so both documentation entries read "Additional arguments to be
added to the operator's args list."; update the README.md table cell and the
corresponding values.yaml comment/description for additionalArgs to ensure
consistency with upstream.
|
|
||
|
|
There was a problem hiding this comment.
Remove extra trailing blank lines.
Static analysis flagged too many blank lines at the end of the file.
🧹 Proposed fix
- name: webhook-certificates
secret:
defaultMode: 420
optional: true
secretName: cnpg-webhook-cert
-
-📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: webhook-certificates | |
| secret: | |
| defaultMode: 420 | |
| optional: true | |
| secretName: cnpg-webhook-cert |
🧰 Tools
🪛 YAMLlint (1.38.0)
[warning] 155-155: too many blank lines (2 > 0)
(empty-lines)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@packages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yaml`
around lines 154 - 155, The file
packages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yaml
contains extra trailing blank lines at the end of the file; open that template
(deployment.yaml) and remove the superfluous blank lines so the file ends
immediately after the last non-empty line, then save to eliminate the
static-analysis warning.
What this PR does
Reverts #2226
Release note
Summary by CodeRabbit
Revert
Bug Fixes
Chores