From 6f9f62a5ad7ddffa12ea70d6c52ffe2512bfc79d Mon Sep 17 00:00:00 2001 From: Robin De Roeck Date: Mon, 6 Sep 2021 23:47:09 +0200 Subject: [PATCH] Add support for ingressClassName Signed-off-by: Robin De Roeck --- charts/keycloak/Chart.yaml | 2 +- charts/keycloak/README.md | 2 ++ charts/keycloak/templates/ingress.yaml | 6 ++++++ charts/keycloak/values.yaml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/keycloak/Chart.yaml b/charts/keycloak/Chart.yaml index 3fdb3a0e..3f60b430 100644 --- a/charts/keycloak/Chart.yaml +++ b/charts/keycloak/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: keycloak -version: 15.0.4 +version: 15.1.0 appVersion: 15.0.2 description: Open Source Identity and Access Management For Modern Applications and Services keywords: diff --git a/charts/keycloak/README.md b/charts/keycloak/README.md index 2fb0a5e9..86a595ee 100644 --- a/charts/keycloak/README.md +++ b/charts/keycloak/README.md @@ -112,6 +112,7 @@ The following table lists the configurable parameters of the Keycloak chart and | `ingress.rules[0].paths[0].pathType` | Path Type for the Ingress rule | `Prefix` | | `ingress.servicePort` | The Service port targeted by the Ingress | `http` | | `ingress.annotations` | Ingress annotations | `{}` | +| `ingress.ingressClassName` | The name of the Ingress Class associated with the ingress | `""` | | `ingress.labels` | Additional Ingress labels | `{}` | | `ingress.tls` | TLS configuration | see below | | `ingress.tls[0].hosts` | List of TLS hosts | `[keycloak.example.com]` | @@ -123,6 +124,7 @@ The following table lists the configurable parameters of the Keycloak chart and | `ingress.console.rules[0].paths[0].path` | Path for the Ingress rule for the console | `[/auth/admin]` | | `ingress.console.rules[0].paths[0].pathType` | Path Type for the Ingress rule for the console | `Prefix` | | `ingress.console.annotations` | Ingress annotations for the console | `{}` | +| `ingress.console.ingressClassName` | The name of the Ingress Class associated with the console ingress | `""` | | `networkPolicy.enabled` | If true, the ingress network policy is deployed | `false` | `networkPolicy.extraFrom` | Allows to define allowed external traffic (see Kubernetes doc for network policy `from` format) | `[]` | `route.enabled` | If `true`, an OpenShift Route is created | `false` | diff --git a/charts/keycloak/templates/ingress.yaml b/charts/keycloak/templates/ingress.yaml index 9680d9ee..5bee4c68 100644 --- a/charts/keycloak/templates/ingress.yaml +++ b/charts/keycloak/templates/ingress.yaml @@ -16,6 +16,9 @@ metadata: {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} {{- end }} spec: +{{- if $ingress.ingressClassName }} + ingressClassName: {{ $ingress.ingressClassName }} +{{- end }} {{- if $ingress.tls }} tls: {{- range $ingress.tls }} @@ -67,6 +70,9 @@ metadata: {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} {{- end }} spec: +{{- if $ingress.console.ingressClassName }} + ingressClassName: {{ $ingress.console.ingressClassName }} +{{- end }} {{- if $ingress.tls }} tls: {{- range $ingress.tls }} diff --git a/charts/keycloak/values.yaml b/charts/keycloak/values.yaml index b532f518..1042d1f6 100644 --- a/charts/keycloak/values.yaml +++ b/charts/keycloak/values.yaml @@ -268,6 +268,8 @@ service: ingress: # If `true`, an Ingress is created enabled: false + # The name of the Ingress Class associated with this ingress + ingressClassName: "" # The Service port targeted by the Ingress servicePort: http # Ingress annotations @@ -297,6 +299,8 @@ ingress: console: # If `true`, an Ingress is created for console path only enabled: false + # The name of Ingress Class associated with the console ingress only + ingressClassName: "" # Ingress annotations for console ingress only # Useful to set nginx.ingress.kubernetes.io/whitelist-source-range particularly annotations: {}