From ff904d6e7eb49b1919aea98b164f217712b0c04c Mon Sep 17 00:00:00 2001 From: Federico Silvestre Date: Mon, 9 Aug 2021 13:45:45 +0200 Subject: [PATCH] [bitnami/apache] add support for IngressClassName (#7169) * add support for IngressClassName * add @param in README to ingressClassName --- bitnami/apache/Chart.yaml | 2 +- bitnami/apache/README.md | 41 ++++++++++++++------------- bitnami/apache/templates/ingress.yaml | 3 ++ bitnami/apache/values.yaml | 6 ++++ 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/bitnami/apache/Chart.yaml b/bitnami/apache/Chart.yaml index 5b7f59f857..8a9a519293 100644 --- a/bitnami/apache/Chart.yaml +++ b/bitnami/apache/Chart.yaml @@ -26,4 +26,4 @@ name: apache sources: - https://github.com/bitnami/bitnami-docker-apache - https://httpd.apache.org -version: 8.5.11 +version: 8.6.0 diff --git a/bitnami/apache/README.md b/bitnami/apache/README.md index 0c3b36ac09..ff0a0a564c 100644 --- a/bitnami/apache/README.md +++ b/bitnami/apache/README.md @@ -133,26 +133,27 @@ The command removes all the Kubernetes components associated with the chart and ### Traffic Exposure Parameters -| Name | Description | Value | -| ------------------------------- | -------------------------------------------------------------------------- | ------------------------ | -| `service.type` | Apache Service type | `LoadBalancer` | -| `service.port` | Apache service HTTP port | `80` | -| `service.httpsPort` | Apache service HTTPS port | `443` | -| `service.nodePorts.http` | Node port for HTTP | `""` | -| `service.nodePorts.https` | Node port for HTTPS | `""` | -| `service.loadBalancerIP` | Apache service Load Balancer IP | `""` | -| `service.annotations` | Additional custom annotations for Apache service | `{}` | -| `service.externalTrafficPolicy` | Apache service external traffic policy | `Cluster` | -| `ingress.enabled` | Enable ingress record generation for Apache | `false` | -| `ingress.pathType` | Ingress path type | `ImplementationSpecific` | -| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` | -| `ingress.hostname` | Default host for the ingress record | `example.local` | -| `ingress.path` | Default path for the ingress record | `ImplementationSpecific` | -| `ingress.annotations` | Additional custom annotations for the ingress record | `{}` | -| `ingress.tls` | Enable TLS configuration for the hosts defined | `[]` | -| `ingress.certManager` | Add the corresponding annotations for cert-manager integration | `false` | -| `ingress.hosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` | -| `ingress.secrets` | Custom TLS certificates as secrets | `[]` | +| Name | Description | Value | +| ------------------------------- | ----------------------------------------------------------------------------- | ------------------------ | +| `service.type` | Apache Service type | `LoadBalancer` | +| `service.port` | Apache service HTTP port | `80` | +| `service.httpsPort` | Apache service HTTPS port | `443` | +| `service.nodePorts.http` | Node port for HTTP | `""` | +| `service.nodePorts.https` | Node port for HTTPS | `""` | +| `service.loadBalancerIP` | Apache service Load Balancer IP | `""` | +| `service.annotations` | Additional custom annotations for Apache service | `{}` | +| `service.externalTrafficPolicy` | Apache service external traffic policy | `Cluster` | +| `ingress.enabled` | Enable ingress record generation for Apache | `false` | +| `ingress.pathType` | Ingress path type | `ImplementationSpecific` | +| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` | +| `ingress.hostname` | Default host for the ingress record | `example.local` | +| `ingress.path` | Default path for the ingress record | `ImplementationSpecific` | +| `ingress.annotations` | Additional custom annotations for the ingress record | `{}` | +| `ingress.tls` | Enable TLS configuration for the hosts defined | `[]` | +| `ingress.ingressClassName` | (Kubernetes 1.18+) IngressClass that will be be used to implement the Ingress | `""` | +| `ingress.certManager` | Add the corresponding annotations for cert-manager integration | `false` | +| `ingress.hosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` | +| `ingress.secrets` | Custom TLS certificates as secrets | `[]` | ### Metrics Parameters diff --git a/bitnami/apache/templates/ingress.yaml b/bitnami/apache/templates/ingress.yaml index 4ee29d8655..15df6c2122 100644 --- a/bitnami/apache/templates/ingress.yaml +++ b/bitnami/apache/templates/ingress.yaml @@ -18,6 +18,9 @@ metadata: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- if and .Values.ingress.ingressClassName (include "common.ingress.supportsIngressClassname" .) }} + ingressClassName: {{ .Values.ingress.ingressClassName | quote }} + {{- end }} rules: {{- if .Values.ingress.hostname }} - host: {{ .Values.ingress.hostname }} diff --git a/bitnami/apache/values.yaml b/bitnami/apache/values.yaml index 87321117c3..82145d2732 100644 --- a/bitnami/apache/values.yaml +++ b/bitnami/apache/values.yaml @@ -315,6 +315,12 @@ ingress: ## @param ingress.apiVersion Force Ingress API version (automatically detected if not set) ## apiVersion: "" + ## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) + ## IngressClassName is used to reference the IngressClass that should be used to implement this Ingress. + ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster . + ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/ + ## + ingressClassName: "" ## @param ingress.hostname Default host for the ingress record ## hostname: example.local