Skip to content

Commit

Permalink
rm labels helper that does duplicate work
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcrouse committed Mar 20, 2024
1 parent 9b36f83 commit 20b4a47
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
17 changes: 0 additions & 17 deletions charts/kube-otel-stack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,6 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "opentelemetry-collector.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "opentelemetry-opamp-bridge.labels" -}}
helm.sh/chart: {{ include "opentelemetry-collector.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Create the name of the clusterRole to use for the opampbridge
Expand Down
3 changes: 1 addition & 2 deletions charts/kube-otel-stack/templates/bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
apiVersion: opentelemetry.io/v1alpha1
kind: OpAMPBridge
metadata:
name: {{ include "opentelemetry-opamp-bridge.fullname" . }}
name: {{ include "opentelemetry-opamp-bridge.fullname" $ }}
labels:
{{- include "kube-otel-stack.labels" $ | indent 4 }}
{{- include "opentelemetry-opamp-bridge.labels" $ | indent 4 }}
{{- with $.Values.opAMPBridge.labels }}
{{- range $key, $value := . }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
Expand Down

0 comments on commit 20b4a47

Please sign in to comment.