UNCLASSIFIED - NO CUI

Fix metrics-server pull secrets in custom namespaces

Package Changes

When metrics-server uses a custom namespace and Istio CNI or ambient mode is enabled, Big Bang currently omits its private-registry image pull secret. Istio CNI only creates that secret in kube-system, leaving metrics-server unable to pull private images in its target namespace.

Apply the namespace-aware ownership check proposed in #3531 (closed) using the current packages configuration. Skip the metrics-server secret only when its target is kube-system and Istio CNI renders the shared secret there. Preserve the existing enablement, automatic metrics API detection, and registry-credentials checks.

Add 14 regression tests covering the default and custom namespaces, explicit CNI, global ambient, ztunnel, automatic and disabled metrics-server modes, missing credentials, and offline mode.

For Issue

Closes #3531 (closed)

Validation

  • helm lint ./chart
  • helm unittest chart -f 'unittests/packages/metrics-server/*_test.yaml': 20 tests passed.
  • helm unittest chart -f 'unittests/**/*_test.yaml': 117 suites and 717 tests passed with an isolated temporary package cache and network access for existing package-rendering tests.
  • bats tests/bats/values-overlays/values-overlays.bats: 2 tests passed.
  • Full-chart render matrix: 16 combinations of CNI/ambient/ztunnel/off, default/custom namespace, and online/offline mode. Each target namespace has exactly one registry secret; no duplicate registry secrets are rendered.
  • Both ambient and sidecar integration overlays render successfully with Kubernetes 1.35 capabilities.

Upgrade Notices

N/A

Edited by Christopher O'Connell

Merge request reports

Loading
Loading