Skip to content

EV-6336: feat(istio): waypoint pull secret support for private registries#4483

Merged
electricjesus merged 5 commits intomasterfrom
worktree-graceful-wobbling-squirrel
Apr 14, 2026
Merged

EV-6336: feat(istio): waypoint pull secret support for private registries#4483
electricjesus merged 5 commits intomasterfrom
worktree-graceful-wobbling-squirrel

Conversation

@electricjesus
Copy link
Copy Markdown
Member

@electricjesus electricjesus commented Feb 27, 2026

Description

Jira: EV-6336

When users create an Istio waypoint Gateway (gatewayClassName: istio-waypoint) in their namespace, istiod automatically creates a waypoint Deployment there. On clusters with private registries (like AKS with gcr.io/unique-caldron-775), the waypoint pod fails with ImagePullBackOff because the pull secret only exists in the operator namespace and istiod doesn't inject imagePullSecrets into waypoint pod specs.

This PR fixes the issue with two changes:

Part 1: Pass imagePullSecrets to istiod via Helm values

  • Adds ImagePullSecrets field to GlobalConfig in the Istio render package
  • Populates global.imagePullSecrets in istiod Helm values from Installation pull secrets
  • This makes istiod inject imagePullSecrets references into waypoint pod specs it creates

Part 2: New waypoint sub-controller

  • Watches for istio-waypoint Gateway resources across all namespaces
  • Copies pull Secret objects from the operator namespace to waypoint namespaces so the references resolve
  • Tracks copied secrets with operator.tigera.io/istio-waypoint-pull-secret label for cleanup
  • Cleans up stale secrets when gateways are removed or Istio CR is deleted

Both parts are no-ops when no pull secrets are configured (omitempty / early return).

Testing:

  • Unit tests for Helm values serialization (render package)
  • 8 controller tests covering: no secrets, single/multiple gateways, same/different namespaces, gateway deletion cleanup, non-matching gatewayClassName, Istio CR deletion, and missing Installation
  • All existing istio controller and render tests continue to pass

Components affected: pkg/render/istio, pkg/controller/istio, internal/controller

Release Note

Istio waypoint Gateways now work on clusters with private registries. The operator passes imagePullSecrets to istiod via Helm values and copies pull secrets to namespaces containing waypoint Gateways.

For PR author

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

@electricjesus electricjesus requested a review from a team as a code owner February 27, 2026 11:17
@marvin-tigera marvin-tigera added this to the v1.42.0 milestone Feb 27, 2026
@electricjesus electricjesus changed the title feat(istio): waypoint pull secret support for private registries EV-6336: feat(istio): waypoint pull secret support for private registries Feb 27, 2026
Comment thread pkg/controller/istio/waypoint/waypoint_secrets_controller.go
Comment thread pkg/controller/istio/waypoint/waypoint_controller.go Outdated
Comment thread pkg/controller/istio/waypoint/waypoint_controller.go Outdated
Comment thread pkg/controller/istio/istio_controller.go
@danudey danudey modified the milestones: v1.42.0, v1.43.0 Mar 20, 2026
Copy link
Copy Markdown
Member

@caseydavenport caseydavenport left a comment

Choose a reason for hiding this comment

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

Couple of minor comments, but overall looking good.

Comment thread pkg/controller/istio/waypoint/waypoint_controller.go Outdated
Comment thread pkg/controller/istio/waypoint/waypoint_secrets_controller_test.go
Comment thread pkg/controller/istio/waypoint/waypoint_secrets_controller.go
Add ImagePullSecrets field to GlobalConfig and populate it from
Installation pull secrets when rendering istiod Helm values. This
makes istiod inject imagePullSecrets references into waypoint pod
specs it creates, enabling image pulls from private registries.
Add a new controller that watches for istio-waypoint Gateway resources
and copies pull secrets from the operator namespace to waypoint
namespaces. This ensures waypoint pods can pull images from private
registries. Secrets are tracked with a label for cleanup when gateways
are removed or the Istio CR is deleted.
…et cleanup

Replace manual cleanupAllSecrets/cleanupStaleSecrets methods with a
single NewPassthrough(toCreate, toDelete) call. This follows the
existing codebase pattern for managing object lifecycle through the
component handler.

The explicit len(pullSecrets)==0 early return is removed — the mainline
reconcile logic now handles this naturally: when no secrets are needed,
toCreate is empty and all existing labeled secrets flow into toDelete.

Also expand the WaypointPullSecretLabel comment to explain why labels
are used instead of owner references (cross-namespace cleanup needs).
Staleness check previously keyed on namespace only, so renaming a pull
secret (e.g. secret-a → secret-b) left the old copy behind. Switch to
NamespacedName keys built from the desired set. Also skip copying to
the operator namespace to avoid overwriting source secrets, and rename
controller files per review feedback.
@electricjesus electricjesus force-pushed the worktree-graceful-wobbling-squirrel branch from 71abc7a to 6959b27 Compare April 14, 2026 14:34
@electricjesus electricjesus merged commit c2807a9 into master Apr 14, 2026
6 checks passed
@caseydavenport caseydavenport deleted the worktree-graceful-wobbling-squirrel branch April 16, 2026 02:05
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.

4 participants