diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index 57fecb2afd3fe40801873c4779ede0176c4d18a5..3f8903588c401ffe5cbb7870977c608b07f0e64b 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -42,7 +42,7 @@ spec: template: metadata: labels: - component: ozg-operator + {{- include "app.matchLabels" . | indent 8 }} spec: containers: - name: ozg-operator diff --git a/src/test/helm/deployment_matchlabels_test.yaml b/src/test/helm/deployment_matchlabels_test.yaml index d078f9c92765f4593de14b1be3a1638256cf4b98..feeaa0e271253271a7e31e0313ed4ba53b7c8715 100644 --- a/src/test/helm/deployment_matchlabels_test.yaml +++ b/src/test/helm/deployment_matchlabels_test.yaml @@ -40,4 +40,11 @@ tests: value: ozg-operator - equal: path: spec.selector.matchLabels.[app.kubernetes.io/namespace] + value: sh-helm-test + + - equal: + path: spec.template.metadata.labels.[app.kubernetes.io/name] + value: ozg-operator + - equal: + path: spec.template.metadata.labels.[app.kubernetes.io/namespace] value: sh-helm-test \ No newline at end of file