Skip to content

Commit 9da9506

Browse files
authored
Add imagePullSecrets to helm chart (#430)
* Add imagePullSecrets to helm chart * Updated Helm readme * Increment Chart version
1 parent 10d2749 commit 9da9506

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

deployments/helm-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: nginx-ingress
2-
version: 0.1.5
2+
version: 0.2.0
33
appVersion: edge
44
description: NGINX Ingress Controller
55
sources:

deployments/helm-chart/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ Parameter | Description | Default
7979
`controller.service.annotations` | The annotations of the Ingress controller service. | { }
8080
`controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`. | None
8181
`controller.service.externalIPs` | The list of external IPs for the Ingress controller service. | []
82-
`controller.serviceAccountName` | The serviceAccountName of the Ingress controller pods. Used for RBAC. | nginx-ingress
82+
`controller.serviceAccount.name` | The name of the service account of the Ingress controller pods. Used for RBAC. | nginx-ingress
83+
`controller.serviceAccount.imagePullSecrets` | The names of the secrets containing docker registry credentials. | []
8384
`controller.ingressClass` | A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation `"kubernetes.io/ingress.class"` equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the "-use-ingress-class-only" flag. | nginx
8485
`controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
8586
`controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""

deployments/helm-chart/templates/controller-daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
prometheus.io/port: "{{ .Values.prometheus.port }}"
2323
{{- end }}
2424
spec:
25-
serviceAccountName: {{ .Values.controller.serviceAccountName }}
25+
serviceAccountName: {{ .Values.controller.serviceAccount.name }}
2626
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
2727
{{- if .Values.controller.nodeSelector }}
2828
nodeSelector:

deployments/helm-chart/templates/controller-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
prometheus.io/port: "{{ .Values.prometheus.port }}"
2424
{{- end }}
2525
spec:
26-
serviceAccountName: {{ .Values.controller.serviceAccountName }}
26+
serviceAccountName: {{ .Values.controller.serviceAccount.name }}
2727
hostNetwork: {{ .Values.controller.hostNetwork }}
2828
containers:
2929
- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"

deployments/helm-chart/templates/controller-serviceaccount.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ .Values.controller.serviceAccountName }}
5+
name: {{ .Values.controller.serviceAccount.name }}
66
labels:
77
app: {{ .Values.controller.name | trunc 63 }}
88
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
99
heritage: {{ .Release.Service }}
1010
release: {{ .Release.Name }}
11+
{{- if .Values.controller.serviceAccount.imagePullSecrets }}
12+
imagePullSecrets:
13+
{{ toYaml .Values.controller.serviceAccount.imagePullSecrets }}
14+
{{- end }}
1115
{{- end }}

deployments/helm-chart/templates/rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ metadata:
7777
release: {{ .Release.Name }}
7878
subjects:
7979
- kind: ServiceAccount
80-
name: {{ .Values.controller.serviceAccountName }}
80+
name: {{ .Values.controller.serviceAccount.name }}
8181
namespace: {{ .Release.Namespace }}
8282
roleRef:
8383
kind: ClusterRole

deployments/helm-chart/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ controller:
3434
annotations: {}
3535
loadBalancerIP: ""
3636
externalIPs: []
37-
serviceAccountName: nginx-ingress
37+
serviceAccount:
38+
name: nginx-ingress
39+
imagePullSecrets: []
40+
# - name: secret_name
3841
reportIngressStatus:
3942
enable: true
4043
externalService: nginx-ingress

0 commit comments

Comments
 (0)