Merge pull request #50 from rancher/update-nginx

Upgrade ingress-nginx to 0.35
pull/55/head
Erik Wilson 2021-02-24 14:41:46 -07:00 committed by GitHub
commit f1dc481c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 103 deletions

View File

@ -1,2 +1,2 @@
url: https://charts.helm.sh/stable/packages/nginx-ingress-1.36.3.tgz url: https://github.com/kubernetes/ingress-nginx/releases/download/ingress-nginx-3.3.0/ingress-nginx-3.3.0.tgz
packageVersion: 00 packageVersion: 00

View File

@ -1,33 +1,27 @@
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/Chart.yaml packages/rke2-ingress-nginx/charts/Chart.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/Chart.yaml packages/rke2-ingress-nginx/charts/Chart.yaml
--- packages/rke2-ingress-nginx/charts-original/Chart.yaml --- packages/rke2-ingress-nginx/charts-original/Chart.yaml
+++ packages/rke2-ingress-nginx/charts/Chart.yaml +++ packages/rke2-ingress-nginx/charts/Chart.yaml
@@ -12,7 +12,7 @@ @@ -10,7 +10,7 @@
kubeVersion: '>=1.16.0-0'
maintainers:
- name: ChiefAlexander - name: ChiefAlexander
- email: Trevor.G.Wood@gmail.com -name: ingress-nginx
name: taharah
-name: nginx-ingress
+name: rke2-ingress-nginx +name: rke2-ingress-nginx
sources: sources:
- https://github.com/kubernetes/ingress-nginx - https://github.com/kubernetes/ingress-nginx
version: 1.36.3 version: 3.3.0
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl packages/rke2-ingress-nginx/charts/templates/_helpers.tpl diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl packages/rke2-ingress-nginx/charts/templates/_helpers.tpl
--- packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl --- packages/rke2-ingress-nginx/charts-original/templates/_helpers.tpl
+++ packages/rke2-ingress-nginx/charts/templates/_helpers.tpl +++ packages/rke2-ingress-nginx/charts/templates/_helpers.tpl
@@ -55,6 +55,7 @@ @@ -118,7 +118,15 @@
Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` Check the ingress controller version tag is at most three versions behind the last release
*/}} */}}
+ {{- define "isControllerTagValid" -}}
{{- define "nginx-ingress.controller.publishServicePath" -}} -{{- if not (semverCompare ">=0.27.0-0" .Values.controller.image.tag) -}}
{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "nginx-ingress.controller.fullname" .) -}} +{{- if not (semverCompare ">=0.27.0-0" (trimPrefix "nginx-" .Values.controller.image.tag)) -}}
{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }} {{- fail "Controller container image tag should be 0.27.0 or higher" -}}
@@ -122,4 +123,12 @@ {{- end -}}
{{- else -}}
{{- print "extensions/v1beta1" -}}
{{- end -}} {{- end -}}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
+ +
+{{- define "system_default_registry" -}} +{{- define "system_default_registry" -}}
+{{- if .Values.global.systemDefaultRegistry -}} +{{- if .Values.global.systemDefaultRegistry -}}
@ -39,117 +33,78 @@ diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/tem
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml
--- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml --- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-createSecret.yaml
+++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-createSecret.yaml
@@ -36,7 +36,7 @@ @@ -33,7 +33,7 @@
{{- end }}
containers: containers:
- name: create - name: create
- image: {{ .Values.controller.admissionWebhooks.patch.image.repository }}:{{ .Values.controller.admissionWebhooks.patch.image.tag }} {{- with .Values.controller.admissionWebhooks.patch.image }}
+ image: {{ template "system_default_registry" . }}{{ .Values.controller.admissionWebhooks.patch.image.repository }}:{{ .Values.controller.admissionWebhooks.patch.image.tag }} - image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
+ image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- end }}
imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }} imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }}
args: args:
- create
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml
--- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml --- packages/rke2-ingress-nginx/charts-original/templates/admission-webhooks/job-patch/job-patchWebhook.yaml
+++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ packages/rke2-ingress-nginx/charts/templates/admission-webhooks/job-patch/job-patchWebhook.yaml
@@ -36,7 +36,7 @@ @@ -33,7 +33,7 @@
{{- end }}
containers: containers:
- name: patch - name: patch
- image: {{ .Values.controller.admissionWebhooks.patch.image.repository }}:{{ .Values.controller.admissionWebhooks.patch.image.tag }} {{- with .Values.controller.admissionWebhooks.patch.image }}
+ image: {{ template "system_default_registry" . }}{{ .Values.controller.admissionWebhooks.patch.image.repository }}:{{ .Values.controller.admissionWebhooks.patch.image.tag }} - image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.pullPolicy }} + image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- end }}
imagePullPolicy: {{ .Values.controller.admissionWebhooks.patch.image.pullPolicy }}
args: args:
- patch
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml
--- packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml --- packages/rke2-ingress-nginx/charts-original/templates/controller-daemonset.yaml
+++ packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml +++ packages/rke2-ingress-nginx/charts/templates/controller-daemonset.yaml
@@ -60,7 +60,7 @@ @@ -61,7 +61,7 @@
{{- end }}
containers: containers:
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} - name: controller
- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" {{- with .Values.controller.image }}
+ image: {{ template "system_default_registry" . }}{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }} - image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" + image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- if .Values.controller.lifecycle }} {{- end }}
lifecycle: imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
{{- if .Values.controller.lifecycle }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml
--- packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml --- packages/rke2-ingress-nginx/charts-original/templates/controller-deployment.yaml
+++ packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml +++ packages/rke2-ingress-nginx/charts/templates/controller-deployment.yaml
@@ -64,7 +64,7 @@ @@ -65,7 +65,7 @@
{{- end }}
containers: containers:
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.controller.name }} - name: controller
- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" {{- with .Values.controller.image }}
+ image: {{ template "system_default_registry" . }}{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }} - image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}" + image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- if .Values.controller.lifecycle }}
lifecycle:
@@ -81,16 +81,16 @@
- --default-backend-service={{ .Values.controller.defaultBackendService }}
{{- end }}
{{- end }} {{- end }}
- {{- if and (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) .Values.controller.publishService.enabled }} imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
+ {{- if and (semverCompare ">=0.9.0-beta.1" (trimPrefix "nginx-" .Values.controller.image.tag)) .Values.controller.publishService.enabled }} {{- if .Values.controller.lifecycle }}
- --publish-service={{ template "nginx-ingress.controller.publishServicePath" . }}
{{- end }}
- {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }}
+ {{- if (semverCompare ">=0.9.0-beta.1" (trimPrefix "nginx-" .Values.controller.image.tag)) }}
- --election-id={{ .Values.controller.electionID }}
{{- end }}
- {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }}
+ {{- if (semverCompare ">=0.9.0-beta.1" (trimPrefix "nginx-" .Values.controller.image.tag)) }}
- --ingress-class={{ .Values.controller.ingressClass }}
{{- end }}
- {{- if (semverCompare ">=0.9.0-beta.1" .Values.controller.image.tag) }}
+ {{- if (semverCompare ">=0.9.0-beta.1" (trimPrefix "nginx-" .Values.controller.image.tag)) }}
- --configmap={{ default .Release.Namespace .Values.controller.configMapNamespace }}/{{ template "nginx-ingress.controller.fullname" . }}
{{- else }}
- --nginx-configmap={{ default .Release.Namespace .Values.controller.configMapNamespace }}/{{ template "nginx-ingress.controller.fullname" . }}
@@ -125,7 +125,7 @@
- --{{ $key }}
{{- end }}
{{- end }}
- {{- if (semverCompare ">=0.16.0" .Values.controller.image.tag) }}
+ {{- if (semverCompare ">=0.16.0" (trimPrefix "nginx-" .Values.controller.image.tag)) }}
securityContext:
capabilities:
drop:
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml
--- packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml --- packages/rke2-ingress-nginx/charts-original/templates/default-backend-deployment.yaml
+++ packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml +++ packages/rke2-ingress-nginx/charts/templates/default-backend-deployment.yaml
@@ -51,7 +51,7 @@ @@ -37,7 +37,7 @@
{{- end }}
containers: containers:
- name: {{ template "nginx-ingress.name" . }}-{{ .Values.defaultBackend.name }} - name: {{ template "ingress-nginx.name" . }}-default-backend
- image: "{{ .Values.defaultBackend.image.repository }}:{{ .Values.defaultBackend.image.tag }}" {{- with .Values.defaultBackend.image }}
+ image: {{ template "system_default_registry" . }}{{ .Values.defaultBackend.image.repository }}:{{ .Values.defaultBackend.image.tag }} - image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
imagePullPolicy: "{{ .Values.defaultBackend.image.pullPolicy }}" + image: "{{ template "system_default_registry" . }}{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
args: {{- end }}
{{- range $key, $value := .Values.defaultBackend.extraArgs }} imagePullPolicy: {{ .Values.defaultBackend.image.pullPolicy }}
{{- if .Values.defaultBackend.extraArgs }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/values.yaml packages/rke2-ingress-nginx/charts/values.yaml diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/values.yaml packages/rke2-ingress-nginx/charts/values.yaml
--- packages/rke2-ingress-nginx/charts-original/values.yaml --- packages/rke2-ingress-nginx/charts-original/values.yaml
+++ packages/rke2-ingress-nginx/charts/values.yaml +++ packages/rke2-ingress-nginx/charts/values.yaml
@@ -4,8 +4,8 @@ @@ -3,8 +3,8 @@
##
controller: controller:
name: controller
image: image:
- repository: quay.io/kubernetes-ingress-controller/nginx-ingress-controller - repository: k8s.gcr.io/ingress-nginx/controller
- tag: "0.30.0" - tag: "v0.35.0"
+ repository: rancher/nginx-ingress-controller + repository: rancher/nginx-ingress-controller
+ tag: "nginx-0.30.0-rancher1" + tag: "nginx-0.35.0-rancher2"
digest: sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# www-data -> uid 101 # www-data -> uid 101
runAsUser: 101 @@ -35,7 +35,7 @@
@@ -37,7 +37,7 @@
# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm),
# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920
# is merged
- hostNetwork: false
+ hostNetwork: true
# Optionally customize the pod dnsConfig.
dnsConfig: {}
@@ -45,7 +45,7 @@
# Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. # Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'.
# By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller # By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller
# to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. # to keep resolving names inside the k8s network, use ClusterFirstWithHostNet.
@ -158,7 +113,16 @@ diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/val
# Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network # Bare-metal considerations via the host network https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network
# Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply # Ingress status was blank because there is no Service exposing the NGINX Ingress controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply
@@ -242,7 +242,7 @@ @@ -44,7 +44,7 @@
# Required for use with CNI based kubernetes installations (such as ones set up by kubeadm),
# since CNI and hostport don't mix yet. Can be deprecated once https://github.com/kubernetes/kubernetes/issues/23920
# is merged
- hostNetwork: false
+ hostNetwork: true
## Use host ports 80 and 443
## Disabled by default
@@ -301,7 +301,7 @@
configMapKey: "" configMapKey: ""
service: service:
@ -167,9 +131,9 @@ diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/val
annotations: {} annotations: {}
labels: {} labels: {}
@@ -440,8 +440,8 @@ @@ -540,8 +540,8 @@
enabled: false
name: default-backend
image: image:
- repository: k8s.gcr.io/defaultbackend-amd64 - repository: k8s.gcr.io/defaultbackend-amd64
- tag: "1.5" - tag: "1.5"
@ -178,7 +142,7 @@ diff -x '*.tgz' -x '*.lock' -uNr packages/rke2-ingress-nginx/charts-original/val
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# nobody user -> uid 65534 # nobody user -> uid 65534
runAsUser: 65534 runAsUser: 65534
@@ -573,3 +573,6 @@ @@ -661,3 +661,6 @@
## ##
udp: {} udp: {}
# 53: "kube-system/kube-dns:53" # 53: "kube-system/kube-dns:53"