kustomize-controller
kustomize-controller copied to clipboard
Error when using buildMetadata managedByLabel setting
V1.1.1
When creating a namespace (although other assets may also fail) with managedByLabel is set on I get the following error on dry run
Namespace/sf-web-sandbox dry-run failed, reason: Invalid: Namespace "sf-web-sandbox" is invalid: metadata.labels: Invalid value: "kustomize-(devel)": a valid label must be an empty string or consist of alphanumeric characters
What seems to be happening is that when kustomize in the controller with this flagis being run the semver it is returning kustomize-(devel) rather than a version, which then makes the output yaml invalid
Link to managedByLabel code
https://github.com/kubernetes-sigs/kustomize/blob/master/api/krusty/kustomizer.go#L101
Link to Provenance code (used to get semver)
https://github.com/kubernetes-sigs/kustomize/blob/master/api/provenance/provenance.go#L18
Previously we were using v0.35.1 and did not encounter this error