-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Labels
Team:Elastic-Agent-Control-PlaneLabel for the Agent Control Plane teamLabel for the Agent Control Plane team
Description
Helm lets us generate whatever we want, as long as it's valid yaml. In order to check whether our manifests contain valid Kubernetes resources, we'd need to actually apply them to a running API Server, which is annoying to do if we want to run this kind of test for a lot of different values files.
However, we can instead simply load the manifests into the right struct in a standard Go test. This can be made fully dynamic as long as we register all the necessary schemas, and with packages like terratest, even rendering the manifests can be done within the Go test. Here's a working example of this idea: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/30d3c3ffb1d5d8bd87e76cf4285777c20a1bfdb4/tests/helm/common_test.go#L24.
Metadata
Metadata
Assignees
Labels
Team:Elastic-Agent-Control-PlaneLabel for the Agent Control Plane teamLabel for the Agent Control Plane team