refactor(e2e): share ziti diagnostics helper#181
Conversation
UpdateCreated follow-up PR #181 because #180 is already merged. This refactor moves Ziti diagnostics out of
Test & Lint Summary
|
noa-lucent
left a comment
There was a problem hiding this comment.
[major] The shared diagnostics helper still derives the secret namespace from E2E_NAMESPACE/DEVSPACE_NAMESPACE. In this suite those values are the runner pod namespace; issue #170 was specifically about the agents-orchestrator-e2e service account failing to read the Ziti admin secret in the ziti namespace, and the new bootstrap credential is described as a Ziti diagnostics secret/identity. If ziti-diagnostics is created with the controller resources, this code will continue to look in platform/ziti-diagnostics and report the same RBAC/not-found class of failure instead of dumping controller state. Please make the diagnostics secret namespace explicit and aligned with the bootstrap resource (for example a ZITI_DIAGNOSTICS_SECRET_NAMESPACE defaulting to ziti, with tests for the default and override), rather than coupling it to the runner namespace.
Reviewed PR #181. Requesting changes for the diagnostics secret namespace issue.
UpdateAddressed Noa's requested change:
Test & Lint Summary
|
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. The requested namespace coupling issue is resolved: zitiDiagnosticsSecretRef now uses explicit ZITI_DIAGNOSTICS_SECRET_NAMESPACE / ZITI_DIAGNOSTICS_SECRET_NAME with bootstrap defaults, and the tests verify E2E_NAMESPACE / DEVSPACE_NAMESPACE no longer affect the secret reference.
No further blocking issues found.
Summary
ziti-diagnosticssecret and documents it as DEV/E2E-only.platform/ziti-diagnosticsinstead of deriving fromE2E_NAMESPACEorDEVSPACE_NAMESPACE.ZITI_DIAGNOSTICS_SECRET_NAMESPACEandZITI_DIAGNOSTICS_SECRET_NAMEoverrides plus tests for default and override behavior.Related
Follow-up to merged PR #180. Complements agynio/bootstrap#544.
Fixes #170
Test & Lint Summary
buf generate: passed; generated files were restored because the committed branch already contains generated sources.CGO_ENABLED=0 go test -run 'TestZitiManagementEndpoint|TestZitiDiagnosticsSecret|TestZitiDiagnosticsDump' -tags 'e2e svc_agents_orchestrator' ./tests/...: 4 passed / 0 failed / 1 skipped; tracecanary had no test files.gofmt -w tests/ziti_diagnostics_test.go tests/expose_test.go: passed with no formatting errors.test -z "$(gofmt -l tests/ziti_diagnostics_test.go tests/expose_test.go)": passed; lint/format check reported no errors.