Skip to content

revert(postgres-operator): revert update to v1.27.3 - #2353

Closed
IvanHunters wants to merge 1 commit into
mainfrom
revert/postgres-operator-v1.27.3
Closed

revert(postgres-operator): revert update to v1.27.3#2353
IvanHunters wants to merge 1 commit into
mainfrom
revert/postgres-operator-v1.27.3

Conversation

@IvanHunters

@IvanHunters IvanHunters commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Reverts #2226

Release note

[postgres-operator] Revert update to v1.27.3

Summary by CodeRabbit

  • Revert

    • Downgraded CloudNativePG chart to v0.23.0 and app version to v1.25.0
  • Bug Fixes

    • Fixed namespace reference handling in templates
  • Chores

    • Removed configuration options: topologySpreadConstraints, updateStrategy, webhook.startupProbe
    • Removed database webhook configurations and pg_extensions monitoring query
    • Updated copyright headers and license identifiers

This reverts commit c689367, reversing
changes made to 7ab6283.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Chart Metadata
Makefile, Chart.yaml, packages/system/postgres-operator/values.yaml
Version downgrade from 0.26.1 to 0.23.0 (chart) and 1.27.1 to 1.25.0 (app). Removed helm pull version pinning and explicit image tag override.
Header & License Updates
config.yaml, monitoring-configmap.yaml, podmonitor.yaml, service.yaml, and others
Updated copyright headers to "Copyright The CloudNativePG Contributors" and removed SPDX-License-Identifier comments across multiple template files.
Namespace Reference Changes
NOTES.txt, deployment.yaml, rbac.yaml, mutatingwebhookconfiguration.yaml, validatingwebhookconfiguration.yaml
Replaced cloudnative-pg.namespace helper with .Release.Namespace for WATCH_NAMESPACE env var, RBAC subject bindings, and webhook service namespace configurations.
RBAC Rules Removal
_helpers.tpl, rbac.yaml
Removed RBAC permissions for failoverquorums resource (create/delete/get/list/watch) and status rules. Removed -view and -edit ClusterRole rules for clusters/status, failoverquorums, imagecatalogs, and clusterimagecatalogs.
Webhook Entries Removal
mutatingwebhookconfiguration.yaml, validatingwebhookconfiguration.yaml
Removed mdatabase.cnpg.io mutating webhook and vdatabase.cnpg.io validating webhook entries targeting database resources.
Deployment Configuration Removal
deployment.yaml, values.yaml, values.schema.json
Removed conditional spec.strategy rendering, startupProbe configuration, and topologySpreadConstraints from deployment. Removed corresponding default values and schema definitions.
Chart Documentation & Monitoring
README.md, values.yaml
Updated version badges, corrected "Additinal" to "Additional" spelling. Removed documentation for topologySpreadConstraints, updateStrategy, and webhook.startupProbe. Removed pg_extensions monitoring query definition.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A downgrade hops through the chart so neat,
Removing webhooks and probes—what a treat!
Namespaces shift to release with grace,
RBAC rules cleared from their place,
Simpler configs, a fresh start complete! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective: reverting the postgres-operator update to v1.27.3. It is specific, concise, and directly aligns with all changes in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert/postgres-operator-v1.27.3

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@IvanHunters
IvanHunters marked this pull request as ready for review April 7, 2026 18:22
@dosubot dosubot Bot added the size/L This PR changes 100-499 lines, ignoring generated files label Apr 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Removing the version constraint will cause helm pull to fetch the latest version of the chart. To ensure the repository stays on the intended version after this revert, it should be pinned to 0.23.0.

	helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.23.0

| 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. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a typo in the description: "Additinal" should be "Additional".

Suggested change
| additionalArgs | list | `[]` | Additinal arguments to be added to the operator's args list. |
| additionalArgs | list | [] | Additional arguments to be added to the operator's args list. |

maxConcurrentReconciles: 10

# -- Additional arguments to be added to the operator's args list.
# -- Additinal arguments to be added to the operator's args list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a typo in the comment: "Additinal" should be "Additional".

# -- Additional 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 }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Reverting to .Release.Namespace ignores the namespaceOverride capability provided by the cloudnative-pg.namespace helper, which is still defined in the chart. This creates an inconsistency with other parts of the templates.

          value: "{{ include \"cloudnative-pg.namespace\" . }}"

- kind: ServiceAccount
name: {{ include "cloudnative-pg.serviceAccountName" . }}
namespace: {{ include "cloudnative-pg.namespace" . }}
namespace: {{ .Release.Namespace }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using .Release.Namespace directly is inconsistent with other parts of the chart (e.g., line 22) and ignores the namespaceOverride value.

  namespace: {{ include \"cloudnative-pg.namespace\" . }}

- kind: ServiceAccount
name: {{ include "cloudnative-pg.serviceAccountName" . }}
namespace: {{ include "cloudnative-pg.namespace" . }}
namespace: {{ .Release.Namespace }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using .Release.Namespace directly is inconsistent with other parts of the chart and ignores the namespaceOverride value.

  namespace: {{ include \"cloudnative-pg.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 }}".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Reverting to .Release.Namespace ignores the namespaceOverride capability.

CloudNativePG operator should be installed in namespace "{{ include \"cloudnative-pg.namespace\" . }}".

name: cluster-example
{{if not .Values.config.clusterWide -}}
namespace: {{ include "cloudnative-pg.namespace" . }}
namespace: {{ .Release.Namespace }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Reverting to .Release.Namespace ignores the namespaceOverride capability.

  namespace: {{ include \"cloudnative-pg.namespace\" . }}

service:
name: {{ .Values.service.name }}
namespace: {{ include "cloudnative-pg.namespace" . }}
namespace: {{ .Release.Namespace }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use the cloudnative-pg.namespace helper to support namespaceOverride and maintain consistency.

      namespace: {{ include \"cloudnative-pg.namespace\" . }}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/system/postgres-operator/Makefile (1)

6-11: Missing version pin makes make update non-reproducible.

The helm pull command lacks the --version flag. Running make update will 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

📥 Commits

Reviewing files that changed from the base of the PR and between 38624b7 and a436731.

📒 Files selected for processing (17)
  • packages/system/postgres-operator/Makefile
  • packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/README.md
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/NOTES.txt
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/_helpers.tpl
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/config.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/crds/crds.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/deployment.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/monitoring-configmap.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/mutatingwebhookconfiguration.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/podmonitor.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/rbac.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/service.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/validatingwebhookconfiguration.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/values.schema.json
  • packages/system/postgres-operator/charts/cloudnative-pg/values.yaml
  • packages/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. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +154 to +155


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
- 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.

@IvanHunters IvanHunters closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant