Skip to content

Commit 6c81314

Browse files
authored
feat(ingress-controller): add imagePullSecrets support with global fallback (#916)
1 parent 9d5ad2a commit 6c81314

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

charts/apisix-ingress-controller/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ The same for container level, you need to set:
134134
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
135135
| deployment.image.repository | string | `"apache/apisix-ingress-controller"` | |
136136
| deployment.image.tag | string | `"2.0.1"` | |
137+
| deployment.imagePullSecrets | list | `[]` | |
137138
| deployment.nodeSelector | object | `{}` | |
138139
| deployment.podAnnotations | object | `{}` | |
139140
| deployment.podSecurityContext | object | `{"fsGroup":2000}` | Set security context for the pod fsGroup: 2000 ensures containers can share Unix socket files via a common group. |

charts/apisix-ingress-controller/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ spec:
4242
labels:
4343
{{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 8 }}
4444
spec:
45+
{{- $imagePullSecrets := .Values.deployment.imagePullSecrets | default ((.Values.global).imagePullSecrets | default list) }}
46+
{{- with $imagePullSecrets }}
47+
imagePullSecrets:
48+
{{- range $imagePullSecrets }}
49+
- name: {{ . }}
50+
{{- end }}
51+
{{- end }}
4552
containers:
4653
- env:
4754
- name: POD_NAMESPACE

charts/apisix-ingress-controller/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ deployment:
5252
nodeSelector: {}
5353
tolerations: []
5454
affinity: {}
55+
imagePullSecrets: []
5556

5657
# -- Set security context for the pod
5758
# fsGroup: 2000 ensures containers can share Unix socket files via a common group.

0 commit comments

Comments
 (0)