From 1566dbf24adb08065eb73b0a7e3c0cf6875bfdd6 Mon Sep 17 00:00:00 2001 From: Terje Sannum Date: Thu, 24 May 2018 15:17:29 +0200 Subject: [PATCH 1/3] configurable component name --- charts/redisoperator/templates/deployment.yaml | 8 ++++---- charts/redisoperator/templates/service.yaml | 4 ++-- charts/redisoperator/values.yaml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/charts/redisoperator/templates/deployment.yaml b/charts/redisoperator/templates/deployment.yaml index 200623a50..5c9f923f8 100644 --- a/charts/redisoperator/templates/deployment.yaml +++ b/charts/redisoperator/templates/deployment.yaml @@ -3,25 +3,25 @@ kind: Deployment metadata: name: {{ include "name" . | quote }} labels: - component: app + component: "{{ .Values.redisoperator.name }}" {{ include "helm-labels" . | indent 4 }} spec: replicas: 1 selector: matchLabels: - component: app + component: "{{ .Values.redisoperator.name }}" {{ include "common-labels" . | indent 6 }} template: metadata: labels: - component: app + component: "{{ .Values.redisoperator.name }}" {{ include "common-labels" . | indent 8 }} spec: {{- if .Values.rbac.install }} serviceAccountName: {{ include "name" . | quote }} {{- end }} containers: - - name: app + - name: "{{ .Values.redisoperator.name }}" image: {{ include "image" . | quote }} imagePullPolicy: {{ .Values.pullPolicy }} resources: diff --git a/charts/redisoperator/templates/service.yaml b/charts/redisoperator/templates/service.yaml index 0ee0ca9f9..9b49d3cfe 100644 --- a/charts/redisoperator/templates/service.yaml +++ b/charts/redisoperator/templates/service.yaml @@ -3,11 +3,11 @@ kind: Service metadata: name: {{ include "name" . | quote }} labels: - component: app + component: "{{ .Values.redisoperator.name }}" {{ include "common-labels" . | indent 4 }} spec: selector: - component: app + component: "{{ .Values.redisoperator.name }}" {{ include "common-labels" . | indent 4 }} ports: - name: metrics diff --git a/charts/redisoperator/values.yaml b/charts/redisoperator/values.yaml index 5d873621d..52da55f31 100644 --- a/charts/redisoperator/values.yaml +++ b/charts/redisoperator/values.yaml @@ -14,3 +14,5 @@ rbac: install: false apiVersion: v1beta1 imagePullSecrets: [] +redisoperator: + name: redisoperator From 9f1226b6f35674efd8b41361b18c0e66247f9cb7 Mon Sep 17 00:00:00 2001 From: Terje Sannum Date: Thu, 24 May 2018 15:27:47 +0200 Subject: [PATCH 2/3] bump chart version --- charts/redisoperator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redisoperator/Chart.yaml b/charts/redisoperator/Chart.yaml index 5a6350180..0c4e456a1 100644 --- a/charts/redisoperator/Chart.yaml +++ b/charts/redisoperator/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: A Helm chart for the Spotahome Redis Operator name: redisoperator -version: 2.0.0 +version: 2.1.0 From d1e770e6ccbebca435238906483126bfc257baa5 Mon Sep 17 00:00:00 2001 From: Terje Sannum Date: Fri, 29 Jun 2018 12:39:31 +0200 Subject: [PATCH 3/3] revert changing labels, made container name configurable --- charts/redisoperator/templates/deployment.yaml | 8 ++++---- charts/redisoperator/templates/service.yaml | 4 ++-- charts/redisoperator/values.yaml | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/charts/redisoperator/templates/deployment.yaml b/charts/redisoperator/templates/deployment.yaml index 5c9f923f8..0ef33eef3 100644 --- a/charts/redisoperator/templates/deployment.yaml +++ b/charts/redisoperator/templates/deployment.yaml @@ -3,25 +3,25 @@ kind: Deployment metadata: name: {{ include "name" . | quote }} labels: - component: "{{ .Values.redisoperator.name }}" + component: app {{ include "helm-labels" . | indent 4 }} spec: replicas: 1 selector: matchLabels: - component: "{{ .Values.redisoperator.name }}" + component: app {{ include "common-labels" . | indent 6 }} template: metadata: labels: - component: "{{ .Values.redisoperator.name }}" + component: app {{ include "common-labels" . | indent 8 }} spec: {{- if .Values.rbac.install }} serviceAccountName: {{ include "name" . | quote }} {{- end }} containers: - - name: "{{ .Values.redisoperator.name }}" + - name: "{{ .Values.containerName }}" image: {{ include "image" . | quote }} imagePullPolicy: {{ .Values.pullPolicy }} resources: diff --git a/charts/redisoperator/templates/service.yaml b/charts/redisoperator/templates/service.yaml index 9b49d3cfe..0ee0ca9f9 100644 --- a/charts/redisoperator/templates/service.yaml +++ b/charts/redisoperator/templates/service.yaml @@ -3,11 +3,11 @@ kind: Service metadata: name: {{ include "name" . | quote }} labels: - component: "{{ .Values.redisoperator.name }}" + component: app {{ include "common-labels" . | indent 4 }} spec: selector: - component: "{{ .Values.redisoperator.name }}" + component: app {{ include "common-labels" . | indent 4 }} ports: - name: metrics diff --git a/charts/redisoperator/values.yaml b/charts/redisoperator/values.yaml index 52da55f31..49a6f9061 100644 --- a/charts/redisoperator/values.yaml +++ b/charts/redisoperator/values.yaml @@ -3,6 +3,7 @@ image: quay.io/spotahome/redis-operator tag: latest pullPolicy: Always team: devops +containerName: redisoperator resources: requests: cpu: 10m @@ -14,5 +15,3 @@ rbac: install: false apiVersion: v1beta1 imagePullSecrets: [] -redisoperator: - name: redisoperator