UNCLASSIFIED - NO CUI

Fix Kiali Grafana credential passthrough paths

Summary

Fix Kiali credential wiring for the separately deployed Grafana package. Discovered while working on #3501 (closed) item 11; the related documentation remains in !8512 (merged).

Issue

Reproduced on master at f9219960:

  • packages.grafana.values.upstream.adminUser configures Grafana, but the Kiali values template reads the old flat values.adminUser path and leaves Kiali using admin.
  • packages.grafana.values.upstream.admin.existingSecret enters the Kiali password-copy branch, which dereferences the old flat values.admin.existingSecret path and fails umbrella rendering with a nil-pointer error.
  • The Kiali username lookup also reads the old flat existingSecret/userKey settings.

Default Grafana credentials are unaffected. A custom username breaks Kiali-to-Grafana authentication; the existing-Secret case can prevent umbrella installation or reconciliation when both packages are enabled.

Solution

  • Read adminUser and admin existingSecret/userKey consistently beneath packages.grafana.values.upstream.
  • Look up the source Secret in monitoring using the corrected path, retaining the existing grafana-auth password copy in kiali and its secret:grafana-auth:password reference.
  • Quote copied credentials so YAML-like strings such as true and false stay strings.
  • Add four mocked-Secret regression tests covering defaults, inline credentials, existing Secrets with default keys, and custom keys.

Validation

  • Pipeline 5842213 passed for commit 4d19a07deff06f63e108eadc82df2160a61f8e29.
  • CI Helm unit tests: 706 passed, 116 suites passed.
  • Clean install and upgrade: passed.
  • Dynamic pipeline 5842217: OCI clean install and sidecar clean install both passed.
  • MR validation, generated package artifacts, secret scan, docs check and link check: passed.
  • Local Helm lint, the 23 focused Kiali/Grafana tests, and git diff --check passed. The local full suite encountered eight pre-existing negative-schema errors under the local Helm/plugin combination; the authoritative CI full suite passed all 706 tests.
  • Mocked Secrets cover custom credentials and Secret keys; live credential rotation was not exercised.

Upgrade Notices

Kiali now uses the same Grafana admin credential configuration as the Grafana chart, under packages.grafana.values.upstream. Move any matching flat credential overrides into that scope. An existing credential Secret must be present in the monitoring namespace and readable during umbrella rendering. Reconcile the umbrella after rotating the Secret to refresh the copied Kiali password.

Code owner review

@jeffv @chris.oconnell @andrewshoell @chris1 — please review the Kiali values and credential Secret fixes and their regression tests.

Edited by Daniel Dides

Merge request reports

Loading
Loading