Skip to content

Commit

Permalink
Add support for global.systemDefaultIngressClass to rke2-ingress-nginx
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed May 22, 2024
1 parent 0e3fb9d commit fa03791
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- charts-original/templates/controller-ingressclass.yaml
+++ charts/templates/controller-ingressclass.yaml
@@ -11,7 +11,7 @@
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .Values.controller.ingressClassResource.name }}
-{{- if .Values.controller.ingressClassResource.default }}
+{{- if or (.Values.controller.ingressClassResource.default) (eq .Values.global.systemDefaultIngressClass "ingress-nginx") }}
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# -- Configures the ports that the nginx-controller listens on
containerPort:
http: 80
@@ -70,14 +66,14 @@
@@ -70,7 +66,7 @@
# -- 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
# to keep resolving names inside the k8s network, use ClusterFirstWithHostNet.
Expand All @@ -36,14 +36,6 @@
# -- 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 Ingress-Nginx Controller in a configuration using the host network, the default --publish-service flag used in standard cloud setups does not apply
reportNodeInternalIp: false
# -- Process Ingress objects without ingressClass annotation/ingressClassName field
# Overrides value for --watch-ingress-without-class flag of the controller binary
# Defaults to false
- watchIngressWithoutClass: false
+ watchIngressWithoutClass: true
# -- Process IngressClass per name (additionally as per spec.controller).
ingressClassByName: false
# -- This configuration enables Topology Aware Routing feature, used together with service annotation service.kubernetes.io/topology-mode="auto"
@@ -96,7 +92,7 @@
## Disabled by default
hostPort:
Expand Down Expand Up @@ -119,10 +111,11 @@
pullPolicy: IfNotPresent
runAsNonRoot: true
# nobody user -> uid 65534
@@ -1092,3 +1086,6 @@
@@ -1092,3 +1086,7 @@
# This can be generated with: `openssl dhparam 4096 2> /dev/null | base64`
## Ref: https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/ssl-dh-param
dhParam: ""
+
+global:
+ systemDefaultRegistry: ""
+ systemDefaultIngressClass: ""
2 changes: 1 addition & 1 deletion packages/rke2-ingress-nginx/package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://github.com/kubernetes/ingress-nginx/releases/download/helm-chart-4.9.1/ingress-nginx-4.9.1.tgz
packageVersion: 00
packageVersion: 01
# This repository does not use releaseCandidateVersions, so you can leave this as 00.
releaseCandidateVersion: 00

0 comments on commit fa03791

Please sign in to comment.