From 613bbffde2ac5e4805631e0ae2c270645632865a Mon Sep 17 00:00:00 2001 From: Shubham Bajpai Date: Tue, 2 Feb 2021 18:23:13 +0530 Subject: [PATCH] fix(charts): make the cvc operator service labels consistent with operator (#239) Signed-off-by: shubham --- deploy/helm/charts/Chart.yaml | 2 +- deploy/helm/charts/templates/_helpers.tpl | 16 ++++++++++++++++ .../charts/templates/cvc-operator-service.yaml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/deploy/helm/charts/Chart.yaml b/deploy/helm/charts/Chart.yaml index 9d48c561..0459bc46 100644 --- a/deploy/helm/charts/Chart.yaml +++ b/deploy/helm/charts/Chart.yaml @@ -4,7 +4,7 @@ description: CStor-Operator helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.5.1 +version: 2.5.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 2.5.0 diff --git a/deploy/helm/charts/templates/_helpers.tpl b/deploy/helm/charts/templates/_helpers.tpl index 2366146e..0fc779f6 100644 --- a/deploy/helm/charts/templates/_helpers.tpl +++ b/deploy/helm/charts/templates/_helpers.tpl @@ -118,6 +118,13 @@ Create component labels cstor cvc operator openebs.io/component-name: {{ .Values.cvcOperator.componentName | quote }} {{- end -}} +{{/* +Create component labels cstor cvc operator service +*/}} +{{- define "cstor.cvcOperatorService.componentLabels" -}} +openebs.io/component-name: {{ printf "%s-svc" .Values.cvcOperator.componentName | quote }} +{{- end -}} + {{/* Create labels for cstor cvc operator @@ -128,6 +135,15 @@ Create labels for cstor cvc operator {{ include "cstor.cvcOperator.componentLabels" . }} {{- end -}} +{{/* +Create labels for cstor cvc operator service +*/}} +{{- define "cstor.cvcOperatorService.labels" -}} +{{ include "cstor.common.metaLabels" . }} +{{ include "cstor.cvcOperator.matchLabels" . }} +{{ include "cstor.cvcOperatorService.componentLabels" . }} +{{- end -}} + {{/* Create match labels for cstor csi node operator */}} diff --git a/deploy/helm/charts/templates/cvc-operator-service.yaml b/deploy/helm/charts/templates/cvc-operator-service.yaml index 8c679d85..2962838e 100644 --- a/deploy/helm/charts/templates/cvc-operator-service.yaml +++ b/deploy/helm/charts/templates/cvc-operator-service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: name: {{ template "cstor.fullname" . }}-cvc-operator-svc labels: - {{- include "cstor.cvcOperator.labels" . | nindent 4 }} + {{- include "cstor.cvcOperatorService.labels" . | nindent 4 }} spec: ports: - name: api