From 9d82de4fea0acca53fac4539f6efb7c2fbec720e Mon Sep 17 00:00:00 2001 From: Diego Sierra Date: Thu, 12 Dec 2024 18:04:49 +0100 Subject: [PATCH] fix(opentelemetry-operator): set version label with image tag if provided (#1461) * Create app version helper * Fix description * Bump version --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- charts/opentelemetry-operator/Chart.yaml | 2 +- .../operator-webhook-with-cert-manager.yaml | 4 ++-- .../examples/default/rendered/certmanager.yaml | 4 ++-- .../examples/default/rendered/clusterrole.yaml | 6 +++--- .../default/rendered/clusterrolebinding.yaml | 4 ++-- .../examples/default/rendered/deployment.yaml | 2 +- .../examples/default/rendered/role.yaml | 2 +- .../examples/default/rendered/rolebinding.yaml | 2 +- .../examples/default/rendered/service.yaml | 4 ++-- .../examples/default/rendered/serviceaccount.yaml | 2 +- .../rendered/tests/test-certmanager-connection.yaml | 2 +- .../rendered/tests/test-service-connection.yaml | 4 ++-- .../operator-webhook-with-cert-manager.yaml | 4 ++-- .../feature-gates/rendered/certmanager.yaml | 4 ++-- .../feature-gates/rendered/clusterrole.yaml | 6 +++--- .../feature-gates/rendered/clusterrolebinding.yaml | 4 ++-- .../examples/feature-gates/rendered/deployment.yaml | 2 +- .../examples/feature-gates/rendered/role.yaml | 2 +- .../feature-gates/rendered/rolebinding.yaml | 2 +- .../examples/feature-gates/rendered/service.yaml | 4 ++-- .../feature-gates/rendered/serviceaccount.yaml | 2 +- .../rendered/tests/test-certmanager-connection.yaml | 2 +- .../rendered/tests/test-service-connection.yaml | 4 ++-- .../opentelemetry-operator/templates/_helpers.tpl | 13 +++++++++---- 24 files changed, 46 insertions(+), 41 deletions(-) diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index 8beabb67a..fd4bb8c17 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.75.0 +version: 0.75.1 description: OpenTelemetry Operator Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml index b3ae775aa..4f54c4385 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -90,7 +90,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml index 801084853..06654247e 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml index a063938a5..8b548a37b 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -222,7 +222,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -240,7 +240,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml index d0e3ede1f..b841530c2 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml index b22ff9cea..82586a031 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/role.yaml b/charts/opentelemetry-operator/examples/default/rendered/role.yaml index 0a64fe86e..b705f6022 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml index 6c1728f64..63acb7fa2 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index 61e1d4b5c..dfe7e4794 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -31,7 +31,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml index c303f5047..b7fb151f3 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: opentelemetry-operator namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml index 63efbff62..1d7be3d44 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-cert-manager" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml index fbfa84e2b..1705ef177 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-metrics" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -43,7 +43,7 @@ metadata: name: "example-opentelemetry-operator-webhook" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml index b3ae775aa..4f54c4385 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -90,7 +90,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/certmanager.yaml index 801084853..06654247e 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/certmanager.yaml @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml index 481e3b909..b322f9397 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -256,7 +256,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -274,7 +274,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrolebinding.yaml index d0e3ede1f..b841530c2 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/deployment.yaml index 34acd6834..147ec3af4 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/deployment.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/role.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/role.yaml index 0a64fe86e..b705f6022 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/rolebinding.yaml index 6c1728f64..63acb7fa2 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/rolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/service.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/service.yaml index 61e1d4b5c..dfe7e4794 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -31,7 +31,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/serviceaccount.yaml index c303f5047..b7fb151f3 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: opentelemetry-operator namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-certmanager-connection.yaml index 63efbff62..1d7be3d44 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-certmanager-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-cert-manager" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-service-connection.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-service-connection.yaml index fbfa84e2b..1705ef177 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/tests/test-service-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-metrics" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm @@ -43,7 +43,7 @@ metadata: name: "example-opentelemetry-operator-webhook" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.75.0 + helm.sh/chart: opentelemetry-operator-0.75.1 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.114.1" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/templates/_helpers.tpl b/charts/opentelemetry-operator/templates/_helpers.tpl index 4d5cba0fd..9d2aeba7e 100644 --- a/charts/opentelemetry-operator/templates/_helpers.tpl +++ b/charts/opentelemetry-operator/templates/_helpers.tpl @@ -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 }} @@ -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" -}}