kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

Invalid leader election ID is generated

Open yaa110 opened this issue 1 year ago • 8 comments
trafficstars

What broke? What's expected?

generated LeaderElectionID ends with a period (.) which raises the following error:

E0219 20:35:10.387636       1 leaderelection.go:336] error initially creating leader election record: Lease.coordination.k8s.io "be3caa60." is invalid: metadata.name: Invalid value: "be3caa60.": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Reproducing this issue

No response

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"3.13.0", KubernetesVendor:"1.27.1", GitCommit:"c8a7cc58eeb56586c019cf8845dad37286d077ff", BuildDate:"2023-11-02T20:43:44Z", GoOs:"linux", GoArch:"amd64"}

PROJECT version

3

Plugin versions

- go.kubebuilder.io/v4

Other versions

go version go1.22.0 linux/amd64 kubectl Client Version: v1.29.2

Extra Labels

No response

yaa110 avatar Feb 19 '24 20:02 yaa110