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.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
We dynamically generate namespaces which can sometimes be around 63 chars which is the max for a k8s namespace.
However, the consul helm chart appends a data- when creating the volume mount for the stateful set leading to cases where the volume name can be greater than 63 chars.
Warning FailedCreate 2m21s (x20 over 40m) statefulset-controller create Pod consul-server-0 in StatefulSet consul-server failed error: Pod "consul-server-0" is invalid: [spec.volumes[0].name: Invalid value: "data-long-namespace-name-fails-to-create-consul-server-statefulset": must be no more than 63 characters,
I think we could safely truncate. Removing data- at this stage would delete everyone's PVCs on upgrade so that won't work. But if we truncate then presumably no one could have PVCs with the longer name so that should be safe.
I think we could safely truncate. Removing data- at this stage would delete everyone's PVCs on upgrade so that won't work. But if we truncate then presumably no one could have PVCs with the longer name so that should be safe.
Community Note
Overview of the Issue
We dynamically generate namespaces which can sometimes be around 63 chars which is the max for a k8s namespace.
However, the consul helm chart appends a
data-
when creating the volume mount for the stateful set leading to cases where the volume name can be greater than 63 chars.Reproduction Steps
Deploy consul helm chart via terraform
Logs
Expected behavior
Truncate the volume name to 63 chars. Instead of using
data-{{ .Release.Namespace }}
.https://github.com/hashicorp/consul-k8s/blob/main/charts/consul/templates/server-statefulset.yaml#L260
Or remove the
data-
prefix to avoid needing to truncate.The text was updated successfully, but these errors were encountered: