linkerd2
linkerd2 copied to clipboard
Missing Golang type for enableHTTPRoutes
What is the issue?
https://github.com/linkerd/linkerd2/blob/main/pkg/charts/linkerd2/values.go is missing the types for enableHTTPRoutes introduced into 2.14.x release. Rendering the chart causes linkerd policy pods to fail since the CRD for HTTPRoutes is not applied. This is a result of the value enableHTTPRoutes not being casted to linkerd2.Values since its not defined.
How can it be reproduced?
Attempt to render the helm charts using golang.
Logs, error output, etc
{"timestamp":"2024-01-03T12:31:06.488000Z","level":"INFO","fields":{"message":"stream failed","error":"failed to perform initial object list: ApiError: \"404 page not found\\n\": Failed to parse error data (ErrorResponse { status: \"404 Not Found\", message: \"\\\"404 page not found\\\\n\\\"\", reason: \"Failed to parse error data\", code: 404 })"},"target":"kubert::errors","spans":[{"name":"httproutes.gateway.networking.k8s.io"}]}
output of linkerd check -o short
N/A
Environment
Linkerd version: 2.14.x
Possible solution
Add the new value enableHTTPRoutes to Values struct in https://github.com/linkerd/linkerd2/blob/main/pkg/charts/linkerd2/values.go
Additional context
No response
Would you like to work on fixing this bug?
yes
That struct is for the linkerd-control-plane chart. The CRDs are rendered via the linkerd-crds chart, which can be done via helm or through the CLI: linkerd install --crds | kubectl apply -f -.
That struct is for the
linkerd-control-planechart. The CRDs are rendered via thelinkerd-crdschart, which can be done via helm or through the CLI:linkerd install --crds | kubectl apply -f -.
The function NewValues() returns the merged values.yaml for both the linkerd-control-plane chart and linkerd-crds chart. When the helm chart is rendered (golang) with the new values, the HTTPRoute CRD will not be applied since enableHTTPRoutes is not present.
Ok I see. Are you relying on this function for custom work? Feel free to submit a PR with the fix and we'll take a look at it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.