From 4b05f6c7672e1d887c5b5fe903004cd9fc52021c Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 13 Jun 2023 12:38:10 +0200 Subject: [PATCH] move matchlabels deployment.yaml --- src/main/helm/templates/deployment.yaml | 2 +- src/test/helm/deployment_matchlabels_test.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index 57fecb2a..3f890358 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 d078f9c9..feeaa0e2 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 -- GitLab