Documentation
¶
Overview ¶
Package policies derives stable filenames for Kubernetes policy manifests shipped through the Nuon sandbox Terraform module.
The sandbox module's `kubectl_manifest.vendor_policies` resource uses `for_each = fileset(...)`, so the filename is the Terraform state key. Anchoring the filename to the manifest's kind/namespace/name keeps the Terraform address bound to actual K8s object identity instead of the position of the policy in the source list.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LegacyKeyPattern = regexp.MustCompile(`^\d+\.yaml$`)
LegacyKeyPattern matches the historic positional filenames (`0.yaml`, `12.yaml`) emitted before content-derived keys existed. The runner uses it to detect installs that still need a one-time `terraform state mv` migration.
Functions ¶
func IsLegacyKey ¶
IsLegacyKey reports whether key matches the historic positional form.
func ManifestKey ¶
ManifestKey returns the deterministic key for an already-parsed manifest.
func ManifestKeyFromYAML ¶
ManifestKeyFromYAML parses a single Kubernetes manifest YAML document and returns a deterministic filename-style key derived from the manifest's kind, namespace (when present), and metadata.name.
Types ¶
This section is empty.