Repository navigation
e2e: monitoring OIDC has no Chainsaw coverage (port the removed BATS pair) #4051
Copy link
Copy link
Closed
Labels
area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)Issues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)area/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtCategorizes issue or PR as related to cleanup of code, process, or technical debttriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Description
Activity
- addedtriage/needs-triageIndicates an issue needs triage by a maintainerIndicates an issue needs triage by a maintainer
on Sep 3, 2026 - addedkind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtCategorizes issue or PR as related to cleanup of code, process, or technical debttriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked onarea/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)and removedtriage/needs-triageIndicates an issue needs triage by a maintainerIndicates an issue needs triage by a maintainer
on Sep 3, 2026 - added a commit that references this issue
on Sep 3, 2026 - addedarea/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)Issues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)
on Sep 23, 2026 - added a commit that references this issue
on Oct 5, 2026
Metadata
Metadata
Labels
area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)Issues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)area/testingIssues or PRs related to testing (e2e, bats, unit tests)Issues or PRs related to testing (e2e, bats, unit tests)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtCategorizes issue or PR as related to cleanup of code, process, or technical debttriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
hack/e2e-chainsaw/has no monitoring OIDC coverage, in either shape.The two BATS suites that carried it,
hack/e2e-apps/monitoring-oidc-system.batsandhack/e2e-apps/monitoring-oidc-customconfig.bats, were executed by nothing and are removed in#3520, which takes the decision #3638 and #3786 asked for. This issue keeps the other half of that
decision on the board: the port is still wanted, as an ordinary feature request rather than as an
executable file nothing runs.
What the removed pair asserted on a live cluster, and what a port would need to reproduce:
monitoring-oidc-system.bats): thatspec.oidc.*is admitted on the MonitoringCR and accepted by cozystack-api; that the HelmRelease renders the OIDC templates; and that the
resulting
KeycloakClient, audienceKeycloakClientScope, persistent client-secret Secret,Grafana CR and users-reconcile Job carry the expected shape. Authorization is asserted through the
users-Job reconciling
spec.oidc.usersinto Grafana orgs, not through chart-ownedKeycloakRealmGroups orrole_attribute_path(see the design note indocs/oidc-grafana.md).monitoring-oidc-customconfig.bats): the BYO issuer path, including thenegative assertions that no chart-owned Keycloak object is created.
Neither drove a browser login through Keycloak; that was deferred, same posture as the tenant
kube-apiserver suites, and a port need not take it on.
Two things to know before writing it:
the exit code of
kubectl api-resources, which is 0 for an absent API group. Probe the output(
--output=namepiped to an anchoredgrep), and keep a failed discovery call distinct from anempty list: a test has no reason to conflate them.
skipthose suites called does not exist inhack/cozytest.sh(cozytest.sh implements no skip: a skipping test hard-fails at exit 127 #3827). Chainsaw has its ownskip semantics, so this only matters if the port lands in BATS after all.
Existing coverage nearby:
packages/system/monitoring/tests/oidc_test.yamlcovers the render side asHelm unit tests, so a Chainsaw port is about admission and reconciliation on a real cluster, not
about template output. #3785 tracks a separate gap in the same area (mode swap from inline to
secretRef).