mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 08:07:55 +08:00
[bitnami/nginx-ingress-controller] Add global imagePullSecrets to overwrite any other existing one
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: nginx-ingress-controller
|
||||
version: 3.2.3
|
||||
version: 3.3.0
|
||||
appVersion: 0.23.0
|
||||
description: Chart for the nginx Ingress controller
|
||||
keywords:
|
||||
|
||||
@@ -49,6 +49,7 @@ The following tables lists the configurable parameters of the nginx-ingress-cont
|
||||
Parameter | Description | Default
|
||||
--- | --- | ---
|
||||
`global.imageRegistry` | Global Docker image registry | `nil`
|
||||
`global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods)
|
||||
`name` | name of the controller component | `controller`
|
||||
`image.registry` | name of the container image registry | `docker.io`
|
||||
`image.repository` | controller container image repository | `bitnami/nginx-ingress-controller`
|
||||
|
||||
@@ -87,3 +87,39 @@ Create chart name and version as used by the chart label.
|
||||
{{- define "nginx-ingress-controller.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "nginx-ingress-controller.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range
|
||||
.Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -36,10 +36,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "nginx-ingress-controller.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||
{{- end }}
|
||||
|
||||
@@ -36,10 +36,7 @@ spec:
|
||||
{{- end }}
|
||||
spec:
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "nginx-ingress-controller.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||
{{- end }}
|
||||
@@ -79,7 +76,7 @@ spec:
|
||||
- --{{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
|
||||
@@ -30,10 +30,7 @@ spec:
|
||||
{{ toYaml .Values.defaultBackend.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "nginx-ingress-controller.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.defaultBackend.priorityClassName }}
|
||||
priorityClassName: "{{ .Values.defaultBackend.priorityClassName }}"
|
||||
{{- end }}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
## Global Docker image registry
|
||||
## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagepullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami NGINX Ingress controller image version
|
||||
## ref: https://hub.docker.com/r/bitnami/nginx-ingress-controller/tags/
|
||||
@@ -17,6 +20,13 @@ image:
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
config:
|
||||
use-geoip: "false"
|
||||
use-geoip2: "true"
|
||||
@@ -380,11 +390,6 @@ serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
|
||||
## Optional array of imagePullSecrets containing private registry credentials
|
||||
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets: []
|
||||
# - name: secretName
|
||||
|
||||
# TCP service key:value pairs
|
||||
# Ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tcp
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user