Skip to content

feat: add per-namespace webhook support using namespaceSelector and WEBHOOK_PREFIX#887

Open
dipensompurasr wants to merge 1 commit into
cloudnative-pg:mainfrom
dipensompurasr:dev/886
Open

feat: add per-namespace webhook support using namespaceSelector and WEBHOOK_PREFIX#887
dipensompurasr wants to merge 1 commit into
cloudnative-pg:mainfrom
dipensompurasr:dev/886

Conversation

@dipensompurasr
Copy link
Copy Markdown

Summary

  • set WEBHOOK_PREFIX to <namespace>- in the operator Deployment when config.clusterWide=false
  • use namespace-prefixed mutating/validating webhook configuration names in namespace-scoped mode
  • add namespaceSelector on webhook entries to limit admission to the release namespace
  • keep cluster-wide chart behavior unchanged when config.clusterWide=true
  • add chart template tests validating namespace-scoped and cluster-wide rendering

Related to cloudnative-pg/cloudnative-pg#10792

Closes #886

Test plan

  • charts/cloudnative-pg/test/webhook-prefix_test.sh
  • helm lint charts/cloudnative-pg

Made with Cursor

…EBHOOK_PREFIX

Configure namespace-scoped operator installs to set WEBHOOK_PREFIX, use prefixed webhook configuration names, and scope webhook entries with namespaceSelector. Add chart template tests for cluster-wide and namespace-scoped rendering.

Related to cloudnative-pg/cloudnative-pg#10792

Closes cloudnative-pg#886

Signed-off-by: Dipen Sompura <dipen.sompura@steeprockinc.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add per-namespace webhook support using namespaceSelector and WEBHOOK_PREFIX

1 participant