-
Notifications
You must be signed in to change notification settings - Fork 151
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
Fix secret name conflicts #873
Conversation
{{ $name := (include "splunk-otel-collector.name" .) -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
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.
{{ $name := (include "splunk-otel-collector.name" .) -}} | |
{{- if contains $name .Release.Name -}} | |
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | |
{{- else -}} | |
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | |
{{- end -}} | |
{{ default (include "splunk-otel-collector.fullname" .) .Values.secret.name }} |
I think you can just replace directly with the helper function, and can also remove the if/else before this. splunk-otel-collector.fullname
already evaluates the same conditions with the addition of also respecting the fullNameOverride
variable which is missing here.
9b9099a
to
23a53c1
Compare
23a53c1
to
fa9abd6
Compare
@jinja2 I took a look and it turns out I over-complicated the changes. Please have a look at my latest changes, they're quite simple than before and easy to understand. |
@VihasMakwana please run |
@dmitryax I think we are good to merge. |
Fixes #439.