You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by zh...@apache.org on 2022/03/23 02:06:32 UTC

[apisix-helm-chart] branch master updated: Ingress classname (#254)

This is an automated email from the ASF dual-hosted git repository.

zhangjintao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new b41e19e  Ingress classname (#254)
b41e19e is described below

commit b41e19e4e46e9e7b293198cf38e8c5d4b03a28db
Author: 笨兔儿 <ze...@126.com>
AuthorDate: Wed Mar 23 10:06:27 2022 +0800

    Ingress classname (#254)
---
 charts/apisix-dashboard/README.md              | 17 +++++++++--------
 charts/apisix-dashboard/templates/ingress.yaml |  3 +++
 charts/apisix-dashboard/values.yaml            |  7 +++++++
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/charts/apisix-dashboard/README.md b/charts/apisix-dashboard/README.md
index 496d6cb..40d9859 100644
--- a/charts/apisix-dashboard/README.md
+++ b/charts/apisix-dashboard/README.md
@@ -99,14 +99,15 @@ The following tables lists the configurable parameters of the apisix-dashboard c
 
 ### Traffic Exposure parameters
 
-| Name                            | Description                                                                                            | Value                    |
-| ------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------ |
-| `service.type`                  | Service type                                                                                           | `ClusterIP`              |
-| `service.port`                  | Service HTTP port                                                                                      | `80`                     |
-| `ingress.enabled`               | Set to true to enable ingress record generation                                                        | `false`                  |
-| `ingress.annotations`           | Ingress annotations                                                                                    | `{}`                     |
-| `ingress.hosts`                 | The list of hostnames to be covered with this ingress record.                                          | `[]`                     |
-| `ingress.tls`                   | Create TLS Secret                                                                                      | `false`                  |
+| Name                            | Description                                                                                      | Value       |
+| ------------------------------- |--------------------------------------------------------------------------------------------------|-------------|
+| `service.type`                  | Service type                                                                                     | `ClusterIP` |
+| `service.port`                  | Service HTTP port                                                                                | `80`        |
+| `ingress.enabled`               | Set to true to enable ingress record generation                                                  | `false`     |
+| `ingress.annotations`           | Ingress annotations                                                                              | `{}`        |
+| `ingress.hosts`                 | The list of hostnames to be covered with this ingress record.                                    | `[]`        |
+| `ingress.tls`                   | Create TLS Secret                                                                                | `false`     |
+| `ingress.className`             | `ingressClassName` replace `annotations kubernetes.io/ingress.class`, required kubernetes 1.18>= | `apisix`    |
 
 ### RBAC parameters
 
diff --git a/charts/apisix-dashboard/templates/ingress.yaml b/charts/apisix-dashboard/templates/ingress.yaml
index 01b0dd1..436acae 100644
--- a/charts/apisix-dashboard/templates/ingress.yaml
+++ b/charts/apisix-dashboard/templates/ingress.yaml
@@ -24,6 +24,9 @@ apiVersion: extensions/v1beta1
 {{- end }}
 kind: Ingress
 metadata:
+  {{- if .Values.ingress.className }}
+  ingressClassName: {{- .Values.ingress.className -}}
+  {{- end }}
   name: {{ $fullName }}
   namespace: {{ .Release.Namespace }}
   labels:
diff --git a/charts/apisix-dashboard/values.yaml b/charts/apisix-dashboard/values.yaml
index 8505d34..f3a8226 100644
--- a/charts/apisix-dashboard/values.yaml
+++ b/charts/apisix-dashboard/values.yaml
@@ -86,9 +86,16 @@ service:
 
 ingress:
   enabled: false
+  # Kubernetes 1.18+ support ingressClassName attribute
+  className: ""
   annotations: {}
     # kubernetes.io/ingress.class: nginx
     # kubernetes.io/tls-acme: "true"
+  # domain access apisix example:
+  # hosts:
+  # - host: apisix-dashboard.local
+  #    paths:
+  #     - /*
   hosts:
     - host: apisix-dashboard.local
       paths: []