From b41e19e4e46e9e7b293198cf38e8c5d4b03a28db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=A8=E5=85=94=E5=84=BF?= Date: Wed, 23 Mar 2022 10:06:27 +0800 Subject: [PATCH] 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 496d6cb2..40d98599 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 01b0dd1a..436acae7 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 8505d349..f3a82267 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: []