You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
This came up as an error in the net-contour controller that looks like this:
{"severity":"ERROR","timestamp":"2022-12-08T19:13:48.437648502Z","logger":"net-contour-controller","caller":"controller/controller.go:566","message":"Reconcile error","commit":"041f9e3","knative.dev/controller":"knative.dev.net-contour.pkg.reconciler.contour.Reconciler","knative.dev/kind":"networking.internal.knative.dev.Ingress","knative.dev/traceid":"ec12c38a-f1ac-4581-aae5-2350b60211a2","knative.dev/key":"cody/foo-java","duration":"18.23483ms","error":"HTTPProxy.projectcontour.io \"foo-java-contour-5f549ae3e6f584a5f33d069a0650c0d8foo-java.cody.\" is invalid: metadata.name: Invalid value: \"foo-java-contour-5f549ae3e6f584a5f33d069a0650c0d8foo-java.cody.\": 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])?)*')","stacktrace":"knative.dev/pkg/controller.(*Impl).handleErr\n\tknative.dev/pkg@v0.0.0-20221011175852-714b7630a836/controller/controller.go:566\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/pkg@v0.0.0-20221011175852-714b7630a836/controller/controller.go:543\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/pkg@v0.0.0-20221011175852-714b7630a836/controller/controller.go:491"}
Expected Behavior
When I use ChildName to create a truncated resource name, I expect the name produced to be a valid resource name in kubernetes.
Actual Behavior
The function will produce an invalid resource name ending with
.Steps to Reproduce the Problem
I've set up a go playground example with my input that cause the problem: https://go.dev/play/p/HB42UPAWp7h
Additional Info
This came up as an error in the net-contour controller that looks like this:
net-contour uses ChildName here: https://github.com/knative-sandbox/net-contour/blob/main/pkg/reconciler/contour/resources/httpproxy.go#L275
The text was updated successfully, but these errors were encountered: