Skip to content

feat: Add Arc + Fleet hybrid setup for DocumentDB portal visibility - #267

Merged
hossain-rayhan merged 8 commits into
documentdb:mainfrom
hossain-rayhan:rayhan/azure-arc
Jul 28, 2026
Merged

hossain-rayhan merged 8 commits into
documentdb:mainfrom
hossain-rayhan:rayhan/azure-arc

Conversation

@hossain-rayhan

@hossain-rayhan hossain-rayhan commented Feb 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a new deployment guide for setting up DocumentDB across hybrid environments (AKS + on-premises) using Azure Fleet Manager. This enables Azure Portal visibility for all DocumentDB installations without requiring Azure extension registration.

Motivation

Customers need to track DocumentDB Kubernetes operator installations across diverse environments (cloud and on-prem) for billing and management purposes. This solution provides immediate portal visibility while the full Azure Arc extension integration is being developed.

What's Included

New: documentdb-playground/arc-hybrid-setup-with-fleet/

arc-hybrid-setup-with-fleet/
├── README.md                      # Complete step-by-step guide (9 phases)
├── documentdb-instance.yaml       # Sample DocumentDB CR
└── scripts/
    ├── bash/                      # For WSL/Linux
    │   ├── README.md              # Script usage guide
    │   ├── setup-fleet-hub.sh     # Creates Fleet + AKS + cert-manager
    │   ├── setup-arc-member.sh    # Creates Kind, Arc-enables, joins Fleet
    │   ├── deploy-documentdb-fleet.sh  # Deploys operator + instances
    │   ├── verify-portal.sh       # Verifies setup in Azure
    │   └── cleanup.sh             # Removes all resources
    └── powershell/                # For Windows (if az login fails in WSL)
        ├── README.md              # Script usage guide
        ├── setup-fleet-hub.ps1    # Creates Fleet + AKS
        └── setup-arc-member.ps1   # Arc-enables Kind + joins Fleet

Architecture

Azure Fleet Manager (hubless)
├── AKS Member (native portal visibility)
└── Arc Member (Kind/on-prem with token-based portal access)
    └── DocumentDB Operator + Instance on both

Key Features

  • No extension registration required - uses vanilla Helm deployment
  • Dual-environment workflow - handles corporate Conditional Access Policy restrictions
  • Complete portal visibility - Fleet, AKS, and Arc portals all show deployments
  • Automated scripts - Full bash and PowerShell automation for both workflows

Testing

Manually validated end-to-end:

  • Fleet hub creation
  • AKS cluster creation and Fleet join
  • Kind cluster Arc-enable and Fleet join
  • DocumentDB operator deployment on both clusters
  • DocumentDB instance deployment on both clusters
  • Portal visibility confirmed (AKS + Arc + Fleet)

Copilot AI review requested due to automatic review settings February 23, 2026 23:21

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

Pull request overview

Introduces initial scaffolding for deploying the DocumentDB Kubernetes Operator via Azure AKS/Arc Extensions, including a draft extension manifest, Arc-specific Helm values, local testing script, and supporting documentation/design plan.

Changes:

  • Added Azure Arc extension manifest (extension.yaml) and Arc override values (values-arc.yaml) for Helm-based deployment.
  • Added a Kind-based local test script to simulate Arc extension install flows.
  • Added extension README plus a detailed Azure Arc integration design/rollout plan.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
operator/arc-extension/values-arc.yaml Adds Arc-oriented Helm values overrides for extension deployments
operator/arc-extension/test-arc-extension.sh Adds local Kind + Arc testing harness for installation/verification/cleanup
operator/arc-extension/extension.yaml Adds draft Azure extension manifest and release train definitions
operator/arc-extension/README.md Adds end-user installation/configuration/troubleshooting guide
docs/designs/azure-arc/azure-arc-integration-plan.md Adds detailed two-phase Arc integration + billing plan

Comment thread operator/arc-extension/README.md Resolved
Comment thread operator/arc-extension/README.md Resolved
Comment thread operator/arc-extension/values-arc.yaml Resolved
Comment thread operator/arc-extension/README.md Resolved
Comment thread operator/arc-extension/values-arc.yaml Resolved
Comment thread operator/arc-extension/extension.yaml Resolved
Comment thread operator/arc-extension/values-arc.yaml Resolved
Comment thread operator/arc-extension/README.md Resolved
Comment thread operator/arc-extension/values-arc.yaml Resolved
Rayhan Hossain added 3 commits March 2, 2026 10:37
@hossain-rayhan hossain-rayhan changed the title Initial plan for azure arc integration feat: Add Arc + Fleet hybrid setup for DocumentDB portal visibility Mar 2, 2026
@documentdb-triage-tool documentdb-triage-tool Bot added documentation Improvements or additions to documentation ecosystem enhancement New feature or request labels Apr 29, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: ecosystem, documentation, enhancement
Project fields suggested: Component playground · Priority P2 · Effort XL · Status Needs Review
Confidence: 0.82 (mixed)

Reasoning

component from path globs (playground, docs); effort from diff stats (2695+0 LOC, 11 files); LLM: Adds a new hybrid Arc + Fleet deployment guide and scripts to the playground component, enabling Azure Portal visibility for DocumentDB across hybrid environments without requiring full Arc extension integration.

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.

@hossain-rayhan

Copy link
Copy Markdown
Collaborator Author

The POC is completed. Don't want to merge it in our public repo yet. Keeping as a draft PR.

@hossain-rayhan
hossain-rayhan marked this pull request as draft June 8, 2026 23:05
@hossain-rayhan
hossain-rayhan marked this pull request as ready for review July 24, 2026 17:02

### Phase 5: Install cert-manager on Kind (WSL)

```bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

kind is an arc pack - can we sue that instead?

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the Arc + Fleet hybrid playground. Nice defensive pattern on the Arc cert-manager path (prefer microsoft.certmanagement extension, fall back to upstream manifest, wait for readiness). A few items below — one functional bug in the inline DocumentDB manifest, a cert-manager version/source consistency note, a missing precheck, and a docs gap for the cert-manager Arc pack in the manual flow.

Comment on lines +139 to +143
spec:
instances: 3
documentdbVersion: "8"
storage:
size: 10Gi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔴 This inline DocumentDB manifest uses a stale schema and will be rejected by the current CRD.

  • spec.instances doesn't exist — the CRD requires nodeCount and instancesPerNode (both required).
  • documentdbVersion is mis-cased (documentDBVersion) and "8" isn't a valid value — it expects a semver like "0.110.0" (or omit it to use the operator default).
  • spec.storage.size doesn't exist — it's spec.resource.storage.pvcSize.

Interestingly this PR's own documentdb-instance.yaml already uses the correct shape; this heredoc just wasn't updated to match. Suggested:

Suggested change
spec:
instances: 3
documentdbVersion: "8"
storage:
size: 10Gi
spec:
nodeCount: 1
instancesPerNode: 3
documentDbCredentialSecret: documentdb-credentials
resource:
storage:
pvcSize: 10Gi

(adjust the credential secret / topology to taste — the key point is it must validate against the current CRD).

--wait --timeout 5m
else
log "Installing DocumentDB operator on $MEMBER..."
helm install documentdb-operator oci://ghcr.io/documentdb/documentdb-helm-chart \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 The operator Helm chart depends on cert-manager CRDs, but this script assumes cert-manager is already present (installed by setup-fleet-hub.sh / setup-arc-member.sh). Run standalone or out of order, this helm install ... --wait can hang or fail with confusing errors. A quick precheck (e.g. kubectl get deploy -n cert-manager cert-manager >/dev/null 2>&1 || warn/exit) would fail fast with a clear message.

Comment on lines +161 to +162
--release-train stable \
--auto-upgrade-minor-version true \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 cert-manager version/source drift across the fleet. The Arc member installs via the microsoft.certmanagement extension on the stable release-train with --auto-upgrade-minor-version true, while the AKS hub (setup-fleet-hub.sh) pins the upstream manifest v1.17.2. So members can end up on different cert-manager versions, and both trail the version this repo documents as tested (AGENTS.md compatibility matrix: cert-manager 1.19.2). For a demo this is tolerable, but consider aligning the pinned manifest version across hub + member (and bumping toward 1.19.x), and noting that the Arc-extension path floats independently.


### Phase 5: Install cert-manager on Kind (WSL)

If you used the manual steps in Phase 4, install cert-manager explicitly:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

📝 Docs gap: the manual flow only documents installing cert-manager from the upstream manifest, but the helper scripts prefer the Azure Arc cert-manager pack (microsoft.certmanagement). Please add the manual Arc-pack instructions here (and/or a short subsection under Phase 4/5) so users following the manual path can use the extension too — e.g.:

# Preferred: install cert-manager via the Azure Arc extension (the "cert-manager pack")
az k8s-extension create \
  --name cert-manager \
  --extension-type microsoft.certmanagement \
  --scope cluster \
  --cluster-type connectedClusters \
  --cluster-name "$ARC_CLUSTER" \
  --resource-group "$RESOURCE_GROUP" \
  --release-train stable \
  --auto-upgrade-minor-version true

# Verify the extension type is offered for this connected cluster first:
az k8s-extension extension-types list-by-cluster \
  --cluster-type connectedClusters --cluster-name "$ARC_CLUSTER" \
  --resource-group "$RESOURCE_GROUP" --query "[].extensionType" -o tsv

Worth calling out explicitly: (a) it's Arc-member-only (the AKS hub still uses the upstream manifest), (b) the fallback to the upstream manifest when the extension type isn't offered, and (c) the known Helm-ownership conflict if cert-manager was already installed from raw manifests (already in the troubleshooting table — link to it here).

--wait --timeout 5m
else
log "Installing DocumentDB operator on $MEMBER..."
helm install documentdb-operator oci://ghcr.io/documentdb/documentdb-helm-chart \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I needed to do s/documentdb-helm-chart/documentdb-operator to get this working

Signed-off-by: Rayhan Hossain <[email protected]>
@hossain-rayhan
hossain-rayhan merged commit 6e9cf4c into documentdb:main Jul 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ecosystem enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants