Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NGINX Ingress Controller to 3.3.0 #177

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ metadata:
"image": {
"pullPolicy": "IfNotPresent",
"repository": "nginx/nginx-ingress",
"tag": "3.2.1-ubi"
"tag": "3.3.0-ubi"
},
"includeYear": false,
"ingressClass": "nginx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ metadata:
"customPorts": [],
"image": {
"repository": "nginx/nginx-ingress",
"tag": "3.2.1-ubi",
"tag": "3.3.0-ubi",
"pullPolicy": "IfNotPresent"
},
"lifecycle": {},
Expand Down
2 changes: 1 addition & 1 deletion config/samples/charts_v1alpha1_nginxingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
customPorts: []
image:
repository: nginx/nginx-ingress
tag: "3.2.1-ubi"
tag: "3.3.0-ubi"
# digest: "sha256:CHANGEME"
pullPolicy: IfNotPresent
lifecycle: {}
Expand Down
4 changes: 2 additions & 2 deletions docs/nginx-ingress-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
customPorts: []
image:
repository: nginx/nginx-ingress
tag: "3.2.1-ubi"
tag: "3.3.0-ubi"
# digest: "sha256:CHANGEME"
pullPolicy: IfNotPresent
lifecycle: {}
Expand Down Expand Up @@ -220,7 +220,7 @@ Parameter | Description | Default
`controller.logLevel` | The log level of the Ingress Controller. | 1
`controller.image.digest ` | The image digest of the Ingress Controller. | None
`controller.image.repository` | The image repository of the Ingress Controller. | nginx/nginx-ingress
`controller.image.tag` | The tag of the Ingress Controller image. | 3.2.1
`controller.image.tag` | The tag of the Ingress Controller image. | 3.3.0
`controller.image.pullPolicy` | The pull policy for the Ingress Controller image. | IfNotPresent
`controller.lifecycle` | The lifecycle of the Ingress Controller pods. | {}
`controller.customConfigMap` | The name of the custom ConfigMap used by the Ingress Controller. If set, then the default config is ignored. | ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
image:
pullPolicy: IfNotPresent
repository: nginx/nginx-ingress
tag: 3.2.1-ubi
tag: 3.3.0-ubi
ingressClass: nginx
kind: deployment
nginxplus: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
image:
pullPolicy: IfNotPresent
repository: nginx/nginx-ingress
tag: 3.2.1-ubi
tag: 3.3.0-ubi
ingressClass: nginx
kind: deployment
nginxplus: true
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/nginx-ingress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 3.2.1
appVersion: 3.3.0
description: NGINX Ingress Controller
home: https://github.com/nginxinc/kubernetes-ingress
icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.2.1/deployments/helm-chart/chart-icon.png
icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v3.3.0/deployments/helm-chart/chart-icon.png
keywords:
- ingress
- nginx
Expand All @@ -12,6 +12,6 @@ maintainers:
name: nginxinc
name: nginx-ingress
sources:
- https://github.com/nginxinc/kubernetes-ingress/tree/v3.2.1/deployments/helm-chart
- https://github.com/nginxinc/kubernetes-ingress/tree/v3.3.0/deployments/helm-chart
type: application
version: 0.18.1
version: 1.0.0
103 changes: 71 additions & 32 deletions helm-charts/nginx-ingress/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: dosprotectedresources.appprotectdos.f5.com
spec:
group: appprotectdos.f5.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: dnsendpoints.externaldns.nginx.org
spec:
group: externaldns.nginx.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: globalconfigurations.k8s.nginx.org
spec:
group: k8s.nginx.org
Expand Down Expand Up @@ -45,5 +45,7 @@ spec:
type: integer
protocol:
type: string
ssl:
type: boolean
served: true
storage: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: policies.k8s.nginx.org
spec:
group: k8s.nginx.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: transportservers.k8s.nginx.org
spec:
group: k8s.nginx.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: virtualserverroutes.k8s.nginx.org
spec:
group: k8s.nginx.org
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.13.0
name: virtualservers.k8s.nginx.org
spec:
group: k8s.nginx.org
Expand Down Expand Up @@ -97,6 +97,14 @@ spec:
internalRoute:
description: InternalRoute allows for the configuration of internal routing.
type: boolean
listener:
description: Listener references a custom http and/or https listener defined in GlobalConfiguration.
type: object
properties:
http:
type: string
https:
type: string
policies:
type: array
items:
Expand Down
10 changes: 9 additions & 1 deletion helm-charts/nginx-ingress/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "nginx-ingress.selectorLabels" -}}
{{- if .Values.controller.selectorLabels -}}
{{ toYaml .Values.controller.selectorLabels }}
{{- else -}}
app.kubernetes.io/name: {{ include "nginx-ingress.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Expand the name of the configmap.
Expand Down Expand Up @@ -125,3 +129,7 @@ Expand image name.
{{- printf "%s:%s" .Values.controller.image.repository (include "nginx-ingress.tag" .) -}}
{{- end -}}
{{- end -}}

{{- define "nginx-ingress.prometheus.serviceName" -}}
{{- printf "%s-%s" (include "nginx-ingress.fullname" .) "prometheus-service" -}}
{{- end -}}
19 changes: 12 additions & 7 deletions helm-charts/nginx-ingress/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ spec:
{{ toYaml .Values.controller.lifecycle | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
hostPort: 80
- name: https
containerPort: 443
hostPort: 443
{{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }}
containerPort: {{ $value }}
protocol: TCP
{{- if and $.Values.controller.hostPort.enable (index $.Values.controller.hostPort $key) }}
hostPort: {{ index $.Values.controller.hostPort $key }}
{{- end }}
{{- end }}
{{ if .Values.controller.customPorts }}
{{ toYaml .Values.controller.customPorts | indent 8 }}
{{ end }}
Expand Down Expand Up @@ -178,7 +180,7 @@ spec:
{{ else if and (.Values.controller.defaultTLS.cert) (.Values.controller.defaultTLS.key) }}
- -default-server-tls-secret=$(POD_NAMESPACE)/{{ include "nginx-ingress.defaultTLSName" . }}
{{- end }}
- -ingress-class={{ .Values.controller.ingressClass }}
- -ingress-class={{ .Values.controller.ingressClass.name }}
{{- if .Values.controller.watchNamespace }}
- -watch-namespace={{ .Values.controller.watchNamespace }}
{{- end }}
Expand Down Expand Up @@ -228,6 +230,9 @@ spec:
- -disable-ipv6={{ .Values.controller.disableIPV6 }}
{{- if .Values.controller.enableCustomResources }}
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
{{ if .Values.controller.enableTLSPassthrough }}
- -tls-passthrough-port={{ .Values.controller.tlsPassthroughPort }}
{{ end }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
- -enable-cert-manager={{ .Values.controller.enableCertManager }}
- -enable-oidc={{ .Values.controller.enableOIDC }}
Expand Down
17 changes: 12 additions & 5 deletions helm-charts/nginx-ingress/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ spec:
{{ toYaml .Values.controller.lifecycle | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
{{- range $key, $value := .Values.controller.containerPort }}
- name: {{ $key }}
containerPort: {{ $value }}
protocol: TCP
{{- if and $.Values.controller.hostPort.enable (index $.Values.controller.hostPort $key) }}
hostPort: {{ index $.Values.controller.hostPort $key }}
{{- end }}
{{- end }}
{{- if .Values.controller.customPorts }}
{{ toYaml .Values.controller.customPorts | indent 8 }}
{{- end }}
Expand Down Expand Up @@ -183,7 +187,7 @@ spec:
{{ else if and (.Values.controller.defaultTLS.cert) (.Values.controller.defaultTLS.key) }}
- -default-server-tls-secret=$(POD_NAMESPACE)/{{ include "nginx-ingress.defaultTLSName" . }}
{{- end }}
- -ingress-class={{ .Values.controller.ingressClass }}
- -ingress-class={{ .Values.controller.ingressClass.name }}
{{- if .Values.controller.watchNamespace }}
- -watch-namespace={{ .Values.controller.watchNamespace }}
{{- end }}
Expand Down Expand Up @@ -233,6 +237,9 @@ spec:
- -disable-ipv6={{ .Values.controller.disableIPV6 }}
{{- if .Values.controller.enableCustomResources }}
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
{{ if .Values.controller.enableTLSPassthrough }}
- -tls-passthrough-port={{ .Values.controller.tlsPassthroughPort }}
{{ end }}
- -enable-preview-policies={{ .Values.controller.enablePreviewPolicies }}
- -enable-cert-manager={{ .Values.controller.enableCertManager }}
- -enable-oidc={{ .Values.controller.enableOIDC }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/nginx-ingress/templates/controller-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (semverCompare ">=1.23.0" .Capabilities.KubeVersion.Version) -}}
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (.Capabilities.APIVersions.Has "autoscaling/v2") -}}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{{ if .Values.controller.ingressClass.create }}
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: {{ .Values.controller.ingressClass }}
name: {{ .Values.controller.ingressClass.name }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.controller.setAsDefaultIngress }}
{{- if .Values.controller.ingressClass.setAsDefaultIngress }}
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
{{- end }}
spec:
controller: nginx.org/ingress-controller
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if and .Values.prometheus.create .Values.prometheus.service.create}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "nginx-ingress.prometheus.serviceName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.prometheus.service.labels -}}
{{- toYaml .Values.prometheus.service.labels | nindent 4 }}
{{- end }}
spec:
clusterIP: None
ports:
- name: prometheus
protocol: TCP
port: {{ .Values.prometheus.port }}
targetPort: {{ .Values.prometheus.port }}
selector:
{{- include "nginx-ingress.selectorLabels" . | nindent 4 }}
{{- end }}
3 changes: 3 additions & 0 deletions helm-charts/nginx-ingress/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata:
{{ toYaml .Values.controller.service.annotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.controller.service.clusterIP }}
clusterIP: {{ .Values.controller.service.clusterIP }}
{{- end }}
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
{{- if .Values.controller.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{{- if .Values.controller.serviceMonitor.create }}
{{- if .Values.prometheus.serviceMonitor.create }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "nginx-ingress.controller.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.controller.serviceMonitor.labels -}}
{{- toYaml .Values.controller.serviceMonitor.labels | nindent 4 }}
{{- if .Values.prometheus.serviceMonitor.labels -}}
{{- toYaml .Values.prometheus.serviceMonitor.labels | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- if .Values.controller.serviceMonitor.selectorMatchLabels -}}
{{- toYaml .Values.controller.serviceMonitor.selectorMatchLabels | nindent 6 }}
{{- if .Values.prometheus.serviceMonitor.selectorMatchLabels -}}
{{- toYaml .Values.prometheus.serviceMonitor.selectorMatchLabels | nindent 6 }}
{{- end }}
{{- include "nginx-ingress.selectorLabels" . | nindent 6 }}
endpoints:
{{- toYaml .Values.controller.serviceMonitor.endpoints | nindent 4 }}
{{- toYaml .Values.prometheus.serviceMonitor.endpoints | nindent 4 }}
{{- end }}
2 changes: 1 addition & 1 deletion helm-charts/nginx-ingress/values-icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ controller:
nginxplus: true
image:
repository: mycluster.icp:8500/kube-system/nginx-plus-ingress
tag: "3.2.1"
tag: "3.3.0"
nodeSelector:
beta.kubernetes.io/arch: "amd64"
proxy: true
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/nginx-ingress/values-plus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ controller:
nginxplus: true
image:
repository: nginx-plus-ingress
tag: "3.2.1"
tag: "3.3.0"
Loading