From 402be8c665a491d1d8607c371c19f35bad76fe8e Mon Sep 17 00:00:00 2001 From: Dennis Pattmann Date: Thu, 28 Apr 2022 09:55:08 +0200 Subject: [PATCH] [bitnami/nginx] Add ingressClassName parameter to nginx chart (#9953) * [bitnami/nginx] Add ingressClassName parameter to nginx chart Signed-off-by: Dennis Pattmann * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers * [bitnami/nginx] Release 10.1.5 updating components versions Signed-off-by: Bitnami Containers * [bitnami/nginx] Updated nginx chart version Signed-off-by: Dennis Pattmann * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/nginx/Chart.yaml | 2 +- bitnami/nginx/README.md | 47 ++++++++++++++-------------- bitnami/nginx/templates/ingress.yaml | 3 ++ bitnami/nginx/values.yaml | 5 +++ 4 files changed, 33 insertions(+), 24 deletions(-) diff --git a/bitnami/nginx/Chart.yaml b/bitnami/nginx/Chart.yaml index 77c3783f0..4a8ce8d09 100644 --- a/bitnami/nginx/Chart.yaml +++ b/bitnami/nginx/Chart.yaml @@ -25,4 +25,4 @@ name: nginx sources: - https://github.com/bitnami/bitnami-docker-nginx - https://www.nginx.org -version: 10.1.5 \ No newline at end of file +version: 10.2.0 \ No newline at end of file diff --git a/bitnami/nginx/README.md b/bitnami/nginx/README.md index 8a46ca956..6d941a0d5 100644 --- a/bitnami/nginx/README.md +++ b/bitnami/nginx/README.md @@ -80,7 +80,7 @@ The command removes all the Kubernetes components associated with the chart and | -------------------- | -------------------------------------------------------------------- | ---------------------- | | `image.registry` | NGINX image registry | `docker.io` | | `image.repository` | NGINX image repository | `bitnami/nginx` | -| `image.tag` | NGINX image tag (immutable tags are recommended) | `1.21.6-debian-10-r69` | +| `image.tag` | NGINX image tag (immutable tags are recommended) | `1.21.6-debian-10-r91` | | `image.pullPolicy` | NGINX image pull policy | `IfNotPresent` | | `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `image.debug` | Set to true if you would like to see extra information on logs | `false` | @@ -158,27 +158,27 @@ The command removes all the Kubernetes components associated with the chart and ### Custom NGINX application parameters -| Name | Description | Value | -| ------------------------------------------ | ------------------------------------------------------------------------------------------------- | ---------------------- | -| `cloneStaticSiteFromGit.enabled` | Get the server static content from a Git repository | `false` | -| `cloneStaticSiteFromGit.image.registry` | Git image registry | `docker.io` | -| `cloneStaticSiteFromGit.image.repository` | Git image repository | `bitnami/git` | -| `cloneStaticSiteFromGit.image.tag` | Git image tag (immutable tags are recommended) | `2.35.1-debian-10-r67` | -| `cloneStaticSiteFromGit.image.pullPolicy` | Git image pull policy | `IfNotPresent` | -| `cloneStaticSiteFromGit.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | -| `cloneStaticSiteFromGit.repository` | Git Repository to clone static content from | `""` | -| `cloneStaticSiteFromGit.branch` | Git branch to checkout | `""` | -| `cloneStaticSiteFromGit.interval` | Interval for sidecar container pull from the Git repository | `60` | -| `cloneStaticSiteFromGit.gitClone.command` | Override default container command for git-clone-repository | `[]` | -| `cloneStaticSiteFromGit.gitClone.args` | Override default container args for git-clone-repository | `[]` | -| `cloneStaticSiteFromGit.gitSync.command` | Override default container command for git-repo-syncer | `[]` | -| `cloneStaticSiteFromGit.gitSync.args` | Override default container args for git-repo-syncer | `[]` | -| `cloneStaticSiteFromGit.extraEnvVars` | Additional environment variables to set for the in the containers that clone static site from git | `[]` | -| `cloneStaticSiteFromGit.extraVolumeMounts` | Add extra volume mounts for the Git containers | `[]` | -| `serverBlock` | Custom server block to be added to NGINX configuration | `""` | -| `existingServerBlockConfigmap` | ConfigMap with custom server block to be added to NGINX configuration | `""` | -| `staticSiteConfigmap` | Name of existing ConfigMap with the server static site content | `""` | -| `staticSitePVC` | Name of existing PVC with the server static site content | `""` | +| Name | Description | Value | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------- | --------------------- | +| `cloneStaticSiteFromGit.enabled` | Get the server static content from a Git repository | `false` | +| `cloneStaticSiteFromGit.image.registry` | Git image registry | `docker.io` | +| `cloneStaticSiteFromGit.image.repository` | Git image repository | `bitnami/git` | +| `cloneStaticSiteFromGit.image.tag` | Git image tag (immutable tags are recommended) | `2.36.0-debian-10-r9` | +| `cloneStaticSiteFromGit.image.pullPolicy` | Git image pull policy | `IfNotPresent` | +| `cloneStaticSiteFromGit.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | +| `cloneStaticSiteFromGit.repository` | Git Repository to clone static content from | `""` | +| `cloneStaticSiteFromGit.branch` | Git branch to checkout | `""` | +| `cloneStaticSiteFromGit.interval` | Interval for sidecar container pull from the Git repository | `60` | +| `cloneStaticSiteFromGit.gitClone.command` | Override default container command for git-clone-repository | `[]` | +| `cloneStaticSiteFromGit.gitClone.args` | Override default container args for git-clone-repository | `[]` | +| `cloneStaticSiteFromGit.gitSync.command` | Override default container command for git-repo-syncer | `[]` | +| `cloneStaticSiteFromGit.gitSync.args` | Override default container args for git-repo-syncer | `[]` | +| `cloneStaticSiteFromGit.extraEnvVars` | Additional environment variables to set for the in the containers that clone static site from git | `[]` | +| `cloneStaticSiteFromGit.extraVolumeMounts` | Add extra volume mounts for the Git containers | `[]` | +| `serverBlock` | Custom server block to be added to NGINX configuration | `""` | +| `existingServerBlockConfigmap` | ConfigMap with custom server block to be added to NGINX configuration | `""` | +| `staticSiteConfigmap` | Name of existing ConfigMap with the server static site content | `""` | +| `staticSitePVC` | Name of existing PVC with the server static site content | `""` | ### Traffic Exposure parameters @@ -199,6 +199,7 @@ The command removes all the Kubernetes components associated with the chart and | `ingress.hostname` | Default host for the ingress resource | `nginx.local` | | `ingress.path` | The Path to Nginx. You may need to set this to '/*' in order to use this with ALB ingress controllers. | `/` | | `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` | +| `ingress.ingressClassName` | Set the ingerssClassName on the ingress record for k8s 1.18+ | `""` | | `ingress.tls` | Create TLS Secret | `false` | | `ingress.extraHosts` | The list of additional hostnames to be covered with this ingress record. | `[]` | | `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` | @@ -222,7 +223,7 @@ The command removes all the Kubernetes components associated with the chart and | `metrics.port` | NGINX Container Status Port scraped by Prometheus Exporter | `""` | | `metrics.image.registry` | NGINX Prometheus exporter image registry | `docker.io` | | `metrics.image.repository` | NGINX Prometheus exporter image repository | `bitnami/nginx-exporter` | -| `metrics.image.tag` | NGINX Prometheus exporter image tag (immutable tags are recommended) | `0.10.0-debian-10-r102` | +| `metrics.image.tag` | NGINX Prometheus exporter image tag (immutable tags are recommended) | `0.10.0-debian-10-r123` | | `metrics.image.pullPolicy` | NGINX Prometheus exporter image pull policy | `IfNotPresent` | | `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `metrics.podAnnotations` | Additional annotations for NGINX Prometheus exporter pod(s) | `{}` | diff --git a/bitnami/nginx/templates/ingress.yaml b/bitnami/nginx/templates/ingress.yaml index b3227fe49..08199fcc5 100644 --- a/bitnami/nginx/templates/ingress.yaml +++ b/bitnami/nginx/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 (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} + ingressClassName: {{ .Values.ingress.ingressClassName | quote }} + {{- end }} rules: {{- if .Values.ingress.hostname }} - host: {{ .Values.ingress.hostname }} diff --git a/bitnami/nginx/values.yaml b/bitnami/nginx/values.yaml index dabbc5c23..b229a9920 100644 --- a/bitnami/nginx/values.yaml +++ b/bitnami/nginx/values.yaml @@ -523,6 +523,11 @@ ingress: ## cert-manager.io/cluster-issuer: cluster-issuer-name ## annotations: {} + ## @param ingress.ingressClassName Set the ingerssClassName on the ingress record for k8s 1.18+ + ## 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.tls Create TLS Secret ## TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }} ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it