Skip to content

Commit 1777081

Browse files
authored
Merge pull request #3958 from SAdams601/main
[rollout-operator] allow the image registry to be set
2 parents 0b2c5a7 + 37f154a commit 1777081

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

charts/rollout-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: rollout-operator
33
description: "Grafana rollout-operator"
44
type: application
5-
version: 0.35.1
5+
version: 0.36.0
66
appVersion: v0.31.1
77
home: https://github.com/grafana/rollout-operator
88
kubeVersion: ^1.10.0-0

charts/rollout-operator/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Helm chart for deploying [Grafana rollout-operator](https://github.com/grafana/r
44

55
# rollout-operator
66

7-
![Version: 0.35.1](https://img.shields.io/badge/Version-0.35.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.31.1](https://img.shields.io/badge/AppVersion-v0.31.1-informational?style=flat-square)
7+
![Version: 0.36.0](https://img.shields.io/badge/Version-0.36.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.31.1](https://img.shields.io/badge/AppVersion-v0.31.1-informational?style=flat-square)
88

99
Grafana rollout-operator
1010

@@ -55,6 +55,7 @@ Manually applying these CRDs is only required if upgrading from a chart <= v0.32
5555
| global.commonLabels | object | `{}` | Common labels for all object directly managed by this chart. |
5656
| hostAliases | list | `[]` | hostAliases to add |
5757
| image.pullPolicy | string | `"IfNotPresent"` | |
58+
| image.registry | string | `""` | |
5859
| image.repository | string | `"grafana/rollout-operator"` | |
5960
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
6061
| imagePullSecrets | list | `[]` | |

charts/rollout-operator/templates/_helpers.tpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,15 @@ Create the name of the service account to use
8080
{{- end -}}
8181
{{ join "," $list }}
8282
{{- end -}}
83+
84+
{{/*
85+
Create the image name
86+
*/}}
87+
{{- define "rollout-operator.imageName" -}}
88+
{{- $imageTag := (.Values.image.tag | default .Chart.AppVersion) }}
89+
{{- if .Values.image.registry }}
90+
{{- (printf "%s/%s:%s" .Values.image.registry .Values.image.repository $imageTag) }}
91+
{{- else }}
92+
{{- (printf "%s:%s" .Values.image.repository $imageTag) }}
93+
{{- end -}}
94+
{{- end -}}

charts/rollout-operator/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
- name: rollout-operator
4848
securityContext:
4949
{{- toYaml .Values.securityContext | nindent 12 }}
50-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
50+
image: {{ include "rollout-operator.imageName" . }}
5151
imagePullPolicy: {{ .Values.image.pullPolicy }}
5252
args:
5353
- -kubernetes.namespace={{ .Release.Namespace }}

charts/rollout-operator/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ revisionHistoryLimit: 10
1212

1313
image:
1414
repository: grafana/rollout-operator
15+
registry: ""
1516
pullPolicy: IfNotPresent
1617
# -- Overrides the image tag whose default is the chart appVersion.
1718
tag: ""

0 commit comments

Comments
 (0)