...
Package kustomization
import "edge-infra.dev/test/f2/x/ktest/kustomization"
- Overview
- Index
package kustomization provides a set of helpers useful when applying
manifests to a k8s cluster during L2 integration tests
func ProcessManifests(uid string, manifests []byte, namespace string) ([]*unstructured.Unstructured, error)
ProcessManifests applies a set of mutations to the supplied manifests which
allows the manifests to be safely deployed to a shared test cluster by using
the unique test id and namespace isolation. This includes:
- mutating the namespace to test specific namespace
- mutating ClusterRole and ClusterRoleBinding names to include the test uid
- replacing the string `$(TEST_NAMESPACE)` from any config map or env var with the unique test namespace
- removing priority class from deployments
See test/f2/examples/embed/kustomization/kustomization_test.go
for example usage.