Skip to content

Commit

Permalink
Merge branch 'main' into jtyr-otelop-env
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr authored Dec 12, 2024
2 parents a217637 + 9d82de4 commit 485ae01
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions charts/opentelemetry-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,20 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create Operator version.
*/}}
{{- define "opentelemetry-operator.appVersion" -}}
{{ default .Chart.AppVersion .Values.manager.image.tag }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "opentelemetry-operator.labels" -}}
helm.sh/chart: {{ include "opentelemetry-operator.chart" . }}
{{ include "opentelemetry-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/version: {{ include "opentelemetry-operator.appVersion" . | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.additionalLabels }}
Expand Down Expand Up @@ -150,7 +155,7 @@ Return the name of the cert-manager.io/inject-ca-from annotation for webhooks an
The image to use for opentelemetry-operator.
*/}}
{{- define "opentelemetry-operator.image" -}}
{{- printf "%s:%s" .Values.manager.image.repository (default .Chart.AppVersion .Values.manager.image.tag) }}
{{- printf "%s:%s" .Values.manager.image.repository (include "opentelemetry-operator.appVersion" .) }}
{{- end }}
{{- define "opentelemetry-operator.featureGatesMap" -}}
Expand Down

0 comments on commit 485ae01

Please sign in to comment.