diff --git a/charts/redis-operator/templates/operator-deployment.yaml b/charts/redis-operator/templates/operator-deployment.yaml index a3530ec..349e4e1 100644 --- a/charts/redis-operator/templates/operator-deployment.yaml +++ b/charts/redis-operator/templates/operator-deployment.yaml @@ -30,22 +30,15 @@ spec: spec: containers: - name: "{{ .Values.redisOperator.name }}" - {{- if not .Values.redisOperator.imagePrefix }} - image: "{{ .Values.redisOperator.imageName }}:{{ .Values.redisOperator.imageTag }}" - {{ else }} - image: "{{ .Values.redisOperator.imagePrefix }}/{{ .Values.redisOperator.imageName }}:{{ .Values.redisOperator.imageTag }}" - {{ end }} + image: "{{ default "docker.io" (default .Values.localRegistry .Values.global.imageRegistry) }}/{{ .Values.redisOperator.imageName }}:{{ .Values.redisOperator.imageTag }}" imagePullPolicy: {{ .Values.redisOperator.imagePullPolicy }} env: {{- if .Values.redisPasswordEncrypt }} - name: REDIS_PASSWORD_ENCRYPT value: "{{ .Values.redisPasswordEncrypt }}" {{- end }} - -{{- if .Values.localRegistry }} - name: LOCAL_REGISTRY - value: {{ .Values.localRegistry }} -{{- end }} + value: {{ default "docker.io" (default .Values.localRegistry .Values.global.imageRegistry) }} {{- if .Values.namespaceOverride }} - name: NAMESPACE_OVERRIDE value: {{ .Values.namespaceOverride }} diff --git a/charts/redis-operator/values.yaml b/charts/redis-operator/values.yaml index 5dc4ee7..4ac8128 100644 --- a/charts/redis-operator/values.yaml +++ b/charts/redis-operator/values.yaml @@ -1,4 +1,7 @@ --- +global: + imageRegistry: "" + redisOperator: name: redis-operator imageName: radondb/redis-operator