Skip to content

Commit

Permalink
fix: simplify things
Browse files Browse the repository at this point in the history
  • Loading branch information
Vihas Splunk committed Aug 8, 2023
1 parent 6a7fc93 commit 23a53c1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions helm-charts/splunk-otel-collector/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,13 @@ Whether profiling data is enabled (applicable to Splunk Observability only).
Define name for the Splunk Secret
*/}}
{{- define "splunk-otel-collector.secret" -}}
{{- if .Values.secret.name -}}
{{- if .Values.agent.controlPlaneMetrics.etcd.secret.name -}}
{{- printf "%s" .Values.secret.name -}}
{{- else -}}
{{ $name := (include "splunk-otel-collector.name" .) -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Define name for the etcd Secret
Expand All @@ -165,14 +161,10 @@ Define name for the etcd Secret
{{- if .Values.agent.controlPlaneMetrics.etcd.secret.name -}}
{{- printf "%s" .Values.agent.controlPlaneMetrics.etcd.secret.name -}}
{{- else -}}
{{ $name := (include "splunk-otel-collector.name" .) -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s-etcd" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use
Expand Down

0 comments on commit 23a53c1

Please sign in to comment.