Skip to content

Support multiple DocumentDB operator instances in the same k8s cluster (blocked on CNPG webhook-name configurability) #396

Open

Description

@WentingWu666666

Summary

Today the DocumentDB operator cannot be deployed multiple times in the same Kubernetes cluster (e.g., one instance per namespace for multi-tenant scenarios). This is primarily blocked by an upstream limitation in CloudNative-PG (CNPG), which we ship as a Helm subchart. This issue tracks the work to lift that limitation once the upstream fix is available, and to audit our own webhook configurations for the same problem.

Context

The DocumentDB operator depends on CNPG as a Helm subchart. CNPG creates cluster-scoped MutatingWebhookConfiguration and ValidatingWebhookConfiguration resources with hardcoded names. When multiple operator instances are deployed in the same cluster, these resources collide and prevent a per-namespace deployment pattern.

Upstream fix

  • CNPG PR cloudnative-pg/cloudnative-pg#10420 "feat: make webhook configuration names configurable" by @maxlengdell.
    • Adds an ENABLE_WEBHOOK_NAMESPACE_SUFFIX config that suffixes the webhook name with the operator''s namespace.
    • Settable via env var or operator ConfigMap/Secret (mirrors the existing OPERATOR_NAMESPACE / WATCH_NAMESPACE pattern).
    • Closes CNPG issue #10405.
  • Status as of this issue: opened 2026-04-07, still OPEN, last updated 2026-04-16 (~2 months without merge).

Plan

Primary path (preferred)

Once CNPG #10420 merges and a CNPG release ships with ENABLE_WEBHOOK_NAMESPACE_SUFFIX:

  1. Bump our CNPG subchart dependency to the release containing the fix.
  2. Surface a values knob in our Helm chart so users can enable the namespace-suffixed webhook names.
  3. Apply analogous handling on the DocumentDB operator side if our own webhooks have the same cluster-scoped naming-collision problem (see acceptance criteria).

Fallback path

If CNPG #10420 stalls for an extended period (e.g., another 2+ months with no merge), evaluate either:

  • (a) carrying a patched CNPG fork as our subchart, or
  • (b) shipping our own CNPG build that embeds the patch,

until upstream merges.

Acceptance Criteria

  • Subscribe to / watch CNPG #10420; reassess fork-vs-wait decision quarterly.
  • When CNPG ships the fix: bump the CNPG subchart, expose a values knob in our Helm chart, and add an e2e test that deploys two operator instances in two namespaces against the same cluster.
  • Audit our own webhook configurations (specifically the ValidatingWebhookConfiguration added in 0.3.0 for DocumentDB CR validation) for the same cluster-scoped naming-collision problem and fix on our side analogously.
  • Document the multi-operator deployment pattern in docs/operator-public-documentation/preview/.

Additional Context

Activity

  1. added
    enhancement
    on Jun 4, 2026
  2. changed the title [-]Support multiple DocumentDB operator instances in the same cluster (blocked on CNPG webhook-name configurability)[/-] [+]Support multiple DocumentDB operator instances in the same k8s cluster (blocked on CNPG webhook-name configurability)[/+] on Jun 4, 2026
  3. documentdb-triage-tool commented on Jun 19, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  4. maxlengdell commented on Jun 19, 2026

    @maxlengdell

    The PR was merged this week and planned for 1.30. 😊

  5. added
    go
    on Jun 20, 2026
  6. documentdb-triage-tool commented on Jun 20, 2026

    @documentdb-triage-tool

    🤖 Auto-triaged by documentdb-triage-tool.

    Applied: go
    Project fields suggested: Component controllers · Priority P2 · Effort L · Status In Progress
    Confidence: 0.75 (llm)

    Reasoning

    LLM: Multi-tenant/multi-instance operator deployment is an important feature blocked on an upstream dependency fix, touching Helm subchart config, webhook manifests, and e2e tests across multiple components.

    If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

  7. documentdb-triage-tool commented on Jul 4, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  8. documentdb-triage-tool commented on Jul 19, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  9. documentdb-triage-tool commented on Aug 2, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  10. documentdb-triage-tool commented on Aug 17, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  11. documentdb-triage-tool commented on Aug 31, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  12. documentdb-triage-tool commented on Sep 15, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  13. documentdb-triage-tool commented on Sep 29, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  14. documentdb-triage-tool commented on Oct 13, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  15. documentdb-triage-tool commented on Oct 28, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

  16. documentdb-triage-tool commented on Nov 11, 2026

    @documentdb-triage-tool

    👋 @WentingWu666666 — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementgo

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions