Skip to content

(tunnel_ca) allow tunnel ca to be generated externally - #5252

Open
asincu wants to merge 1 commit into
tigera:masterfrom
asincu:annotate_tunnel_ca
Open

(tunnel_ca) allow tunnel ca to be generated externally#5252
asincu wants to merge 1 commit into
tigera:masterfrom
asincu:annotate_tunnel_ca

Conversation

@asincu

@asincu asincu commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The tunnel CA doubles as voltron's tunnel server certificate, so its DNS SAN is the SNI managed clusters dial. In Calico Cloud that CA is generated by TDS and delivered as a sealed secret, carrying the cluster's fully qualified name instead of the SAN the operator would default to.

Add the calicocloud.io/external-tunnel-ca annotation, read from the Tenant in multi-tenant mode and the ManagementCluster otherwise. When set, the operator waits for the tunnel secret rather than self-signing one and consumes it without writing it back. Single-tenant installs still copy it into tigera-manager, where voltron mounts it from.

Description

Release Note

TBD

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

The tunnel CA doubles as voltron's tunnel server certificate, so its DNS
SAN is the SNI managed clusters dial. In Calico Cloud that CA is generated
by TDS and delivered as a sealed secret, carrying the cluster's fully
qualified name instead of the SAN the operator would default to.

Add the calicocloud.io/external-tunnel-ca annotation, read from the Tenant
in multi-tenant mode and the ManagementCluster otherwise. When set, the
operator waits for the tunnel secret rather than self-signing one and
consumes it without writing it back. Single-tenant installs still copy it
into tigera-manager, where voltron mounts it from.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

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

Adds support for consuming a Voltron tunnel CA that is provisioned externally (instead of self-signed by the operator), keyed off a calicocloud.io/external-tunnel-ca annotation on the appropriate resource (Tenant for multi-tenant; ManagementCluster for single-tenant). This ensures Calico Cloud deployments can provide a tunnel certificate with the correct DNS SAN (managed cluster SNI) without the operator racing to create a defaulted cert.

Changes:

  • Introduces ExternalTunnelCAAnnotation and externallyManagedTunnelCA() helper to determine when the tunnel CA should be treated as externally owned.
  • Updates manager reconciliation logic to (a) wait for the tunnel secret when external management is enabled, and (b) avoid writing back / taking ownership of externally delivered secrets while still copying into the install namespace where required.
  • Adds unit/integration-style controller tests covering single-tenant and multi-tenant externally managed tunnel CA behavior and annotation parsing variants.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/controller/manager/manager_controller.go Adds the external-tunnel-CA annotation gate; updates tunnel secret creation/copy behavior to avoid ownership conflicts and to wait for externally delivered secrets.
pkg/controller/manager/manager_controller_test.go Adds test coverage for externally managed tunnel CA scenarios in both tenancy modes and for annotation parsing behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +122 to +124
logc.Error(err, "Ignoring unparseable annotation value, the operator will sign the tunnel CA itself",
"annotation", ExternalTunnelCAAnnotation, "value", value,
"kind", kind, "name", holder.GetName())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants