feat(helm): support extra volumes/mounts; add external API key mount-path validation#772
feat(helm): support extra volumes/mounts; add external API key mount-path validation#772JoeDerby wants to merge 16 commits into
Conversation
Commented out the validation rules for apiKey and existingSecretName in the schema.
Removed anyOf and oneOf constraints for apiKey and existingSecretName.
|
Hey @JoeDerby, thanks for putting this together — we really appreciate the contribution, and especially that you put put real thought into the validation and test coverage! Supporting external credential flows is something we want to Design considerationsThe core issue is that the PR introduces a very generic mechanism ( The other thing I want to be careful about is that Can
|
|
Thanks for the feedback @evan-cz . We're using AWS Secrets Manager with Secrets Store CSI Driver. existingSecretName can work for us, and we don't have a policy constraint that prohibits Kubernetes Secret objects. The reason we want to take the direct CSI-mounted file path was that secretObjects sync still requires a pod mounting the CSI volume before the Kubernetes Secret exists. As the Secrets Store CSI docs note, "The secrets will only sync once you start a pod mounting the secrets" (https://secrets-store-csi-driver.sigs.k8s.io/topics/sync-as-kubernetes-secret.html). The synced secret lifecycle is also coupled to consuming pods. In our case, existingSecretName would still require another pod/process to materialize and maintain that Secret when using CSI secretObjects sync, which is what we were trying to avoid. Given that a pod volume mount is still required to trigger secretObjects sync, the direct CSI-mount approach felt cleaner. I also agree that the current generic extraVolumes and extraVolumeMounts wiring is too broad. We can split this so API-key-related mounts are scoped only to components that require them, rather than using a global mount mechanism. |
Why?
This PR adds first-class support for attaching custom extraVolumes and extraVolumeMounts to CloudZero workloads, while preserving safe API key configuration validation.
It enables external file-based credential flows (for example CSI-driven mounts) without introducing a new feature toggle, and keeps default chart behaviour intact for existing users.
What
Added new chart values:
Wired those values into all relevant workloads:
agent-deploy
agent-daemonset
aggregator-deploy
config-loader-job
webhook-deploy
backfill-job
Added reusable Helm helpers for extra volumes/mounts rendering.
Updated docs in helm/README.md and value schema definitions.
Strengthened schema validation:
Added render-time validation guard:
Added/updated Helm unit tests for:
Users need to mount additional volumes (including but not limited to CSI-backed sources) across CloudZero components without changing default secret behaviour.
At the same time, we need to avoid silent credential misconfigurations. This PR balances flexibility with clear guardrails.
Backward Compatibility
How Tested
All Helm unit tests suite passed.
Deployed from Fork to test agent is working.
Scenarios explicitly verified: