From a80c94e352c804aea0be2ce1424b5cea23656b02 Mon Sep 17 00:00:00 2001 From: chaunceyjiang Date: Fri, 17 Dec 2021 11:37:08 +0800 Subject: [PATCH] upgrade ingress nginx version --- build/ks-controller-manager/Dockerfile | 2 +- config/gateway/templates/nginx-ingress.yaml | 2 +- config/gateway/values.yaml | 2 +- pkg/controller/helm/helm_controller.go | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build/ks-controller-manager/Dockerfile b/build/ks-controller-manager/Dockerfile index 131546757..f4d54b4a3 100644 --- a/build/ks-controller-manager/Dockerfile +++ b/build/ks-controller-manager/Dockerfile @@ -9,7 +9,7 @@ ARG TARGETARCH ARG TARGETOS ARG HELM_VERSION=v3.5.2 ARG KUSTOMIZE_VERSION=v4.2.0 -ARG INGRESS_NGINX_VERSION=3.35.0 +ARG INGRESS_NGINX_VERSION=4.0.13 ENV OUTDIR=/out RUN mkdir -p ${OUTDIR}/usr/local/bin diff --git a/config/gateway/templates/nginx-ingress.yaml b/config/gateway/templates/nginx-ingress.yaml index c54bef9ad..1dd035bf8 100644 --- a/config/gateway/templates/nginx-ingress.yaml +++ b/config/gateway/templates/nginx-ingress.yaml @@ -11,7 +11,7 @@ spec: {{- with .Values.controller.image }} {{- toYaml . | nindent 6 }} {{- end }} - + watchIngressWithoutClass: true publishService: enabled: {{ eq .Values.service.type "LoadBalancer" }} diff --git a/config/gateway/values.yaml b/config/gateway/values.yaml index cb9881b95..b6a83da4e 100644 --- a/config/gateway/values.yaml +++ b/config/gateway/values.yaml @@ -12,7 +12,7 @@ controller: namespace: "" # defaults to .Release.Namespace image: repository: kubesphere/nginx-ingress-controller - tag: "v0.48.1" + tag: "v1.1.0" pullPolicy: IfNotPresent digest: "" diff --git a/pkg/controller/helm/helm_controller.go b/pkg/controller/helm/helm_controller.go index edc9eb48d..1c491c972 100644 --- a/pkg/controller/helm/helm_controller.go +++ b/pkg/controller/helm/helm_controller.go @@ -59,7 +59,7 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error { r, err := reconciler.New( reconciler.WithChart(*w.Chart), reconciler.WithGroupVersionKind(w.GroupVersionKind), - reconciler.WithOverrideValues(r.defaultConfiguration()), + reconciler.WithOverrideValues(r.defaultConfiguration(w.OverrideValues)), reconciler.SkipDependentWatches(w.WatchDependentResources != nil && !*w.WatchDependentResources), reconciler.WithMaxConcurrentReconciles(maxConcurrentReconciles), reconciler.WithReconcilePeriod(reconcilePeriod), @@ -78,8 +78,7 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error { return nil } -func (r *Reconciler) defaultConfiguration() map[string]string { - var overrideValues = make(map[string]string) +func (r *Reconciler) defaultConfiguration(overrideValues map[string]string) map[string]string { if r.GatewayOptions.Repository != "" { overrideValues["controller.image.repository"] = r.GatewayOptions.Repository }