-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(values) add fullnameOverride #635
Conversation
a9f04f2
to
346323e
Compare
@@ -14,7 +14,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this | |||
|
|||
{{- define "kong.fullname" -}} | |||
{{- $name := default .Chart.Name .Values.nameOverride -}} | |||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | |||
{{- default (printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-") .Values.fullnameOverride -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment on this though: we might want to consider failing on templates rendering when .Values.fullnameOverride
is longer than 63 characters since that might cause problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll fail to apply resources. I figured we shouldn't truncate the "use exactly what I provide, no additional formatting" one since the remediation there should be that you choose a new, acceptable name of your own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I understood but my proposal was not to truncate the full override but to fail
and "return an error" (to the extent possible with helm).
What this PR does / why we need it:
Adds a full name override.
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer:
Compare:
nameOverride
was originally entirely undocumented; it and this are now in the readme but I've left them out of values still.Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
main
branch.