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 3504ca1c0..1b23e0d94 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 @@ -11,6 +11,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: webhook name: example-opentelemetry-operator-mutation webhooks: @@ -96,6 +97,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: webhook name: example-opentelemetry-operator-validation webhooks: diff --git a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml index 032b29af4..458f77728 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: webhook name: example-opentelemetry-operator-serving-cert namespace: default @@ -34,6 +35,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: webhook name: example-opentelemetry-operator-selfsigned-issuer namespace: default diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml index 78d4cc97e..e62571cee 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-manager rules: @@ -258,6 +259,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-metrics rules: @@ -276,6 +278,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-proxy rules: diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml index c512eda25..8af3375a9 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-manager roleRef: @@ -30,6 +31,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-proxy roleRef: diff --git a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml index a9fb4b190..fcec47c73 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator namespace: default diff --git a/charts/opentelemetry-operator/examples/default/rendered/role.yaml b/charts/opentelemetry-operator/examples/default/rendered/role.yaml index 35ee4ffc8..64072bc58 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/role.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-leader-election namespace: default diff --git a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml index 20afa0522..2f9458f5c 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-leader-election namespace: default diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index bd00b7dda..004f19797 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -9,6 +9,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator namespace: default @@ -36,6 +37,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager name: example-opentelemetry-operator-webhook namespace: default diff --git a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml index 5d577fcb5..1a15a516a 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml @@ -11,4 +11,5 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager 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 caeb3a333..870bed87e 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 @@ -11,6 +11,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: webhook annotations: "helm.sh/hook": test 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 fe4f0bc47..bae7f1b10 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 @@ -11,6 +11,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager annotations: "helm.sh/hook": test @@ -48,6 +49,7 @@ metadata: app.kubernetes.io/version: "0.94.0" app.kubernetes.io/managed-by: Helm app.kubernetes.io/instance: example + app.kubernetes.io/component: controller-manager annotations: "helm.sh/hook": test diff --git a/charts/opentelemetry-operator/templates/_helpers.tpl b/charts/opentelemetry-operator/templates/_helpers.tpl index 8e84476cf..f78b0d8b3 100644 --- a/charts/opentelemetry-operator/templates/_helpers.tpl +++ b/charts/opentelemetry-operator/templates/_helpers.tpl @@ -41,6 +41,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} +{{ include "opentelemetry-operator.additionalLabels" . }} {{- end }} {{/* @@ -73,6 +74,12 @@ Create the name of the service account to use {{- end }} {{- end }} +{{- define "opentelemetry-operator.additionalLabels" -}} +{{- if .Values.additionalLabels }} +{{- tpl (.Values.additionalLabels | toYaml) . }} +{{- end }} +{{- end }} + {{/* Create an ordered name of the MutatingWebhookConfiguration */}} diff --git a/charts/opentelemetry-operator/values.schema.json b/charts/opentelemetry-operator/values.schema.json index 4473ad6ac..2d063d0a4 100644 --- a/charts/opentelemetry-operator/values.schema.json +++ b/charts/opentelemetry-operator/values.schema.json @@ -21,7 +21,8 @@ "hostNetwork", "priorityClassName", "securityContext", - "testFramework" + "testFramework", + "additionalLabels" ], "properties": { "replicaCount": { @@ -1660,6 +1661,14 @@ "tag": "latest" } }] + }, + "additionalLabels": { + "type": "object", + "default": {}, + "title": "The additionalLabels Schema", + "required": [], + "properties": {}, + "examples": [{}] } }, "examples": [{ diff --git a/charts/opentelemetry-operator/values.yaml b/charts/opentelemetry-operator/values.yaml index 3ee173d08..37066c117 100644 --- a/charts/opentelemetry-operator/values.yaml +++ b/charts/opentelemetry-operator/values.yaml @@ -11,6 +11,9 @@ nameOverride: "" ## Reference one or more secrets to be used when pulling images from authenticated repositories. imagePullSecrets: [] +# Common labels to add to all otel-collector resources. Evaluated as a template. +additionalLabels: {} + ## Pod Disruption Budget configuration ## pdb: