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

kvn 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 682853e  fix: dashboard ingress apiVersion newline bug and add apisix 
gateway ingress suppurt (#32)
682853e is described below

commit 682853ed8f9628a9e96c78945f8891898e435c2b
Author: Shaddock <[email protected]>
AuthorDate: Thu Mar 11 10:56:30 2021 +0800

    fix: dashboard ingress apiVersion newline bug and add apisix gateway 
ingress suppurt (#32)
    
    Co-authored-by: shaddock <[email protected]>
---
 .gitignore                                           |  3 ++-
 charts/apisix-dashboard/Chart.yaml                   |  2 +-
 charts/apisix-dashboard/templates/ingress.yaml       |  2 +-
 .../templates/ingress.yaml                           | 20 ++++++++++----------
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/.gitignore b/.gitignore
index 946867d..9eebac1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 .DS_Store
 *.tgz
-*.lock
\ No newline at end of file
+*.lock
+test_**.yaml
\ No newline at end of file
diff --git a/charts/apisix-dashboard/Chart.yaml 
b/charts/apisix-dashboard/Chart.yaml
index aab2eab..541baf7 100644
--- a/charts/apisix-dashboard/Chart.yaml
+++ b/charts/apisix-dashboard/Chart.yaml
@@ -31,7 +31,7 @@ type: application
 # This is the chart version. This version number should be incremented each 
time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.1.0
+version: 0.1.1
 
 # This is the version number of the application being deployed. This version 
number should be
 # incremented each time you make changes to the application. Versions are not 
expected to
diff --git a/charts/apisix-dashboard/templates/ingress.yaml 
b/charts/apisix-dashboard/templates/ingress.yaml
index 8f43e91..0058d94 100644
--- a/charts/apisix-dashboard/templates/ingress.yaml
+++ b/charts/apisix-dashboard/templates/ingress.yaml
@@ -17,7 +17,7 @@
 {{- if .Values.ingress.enabled -}}
 {{- $fullName := include "apisix-dashboard.fullname" . -}}
 {{- $svcPort := .Values.service.port -}}
-{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
 apiVersion: networking.k8s.io/v1beta1
 {{- else -}}
 apiVersion: extensions/v1beta1
diff --git a/charts/apisix-dashboard/templates/ingress.yaml 
b/charts/apisix/templates/ingress.yaml
similarity index 77%
copy from charts/apisix-dashboard/templates/ingress.yaml
copy to charts/apisix/templates/ingress.yaml
index 8f43e91..960331f 100644
--- a/charts/apisix-dashboard/templates/ingress.yaml
+++ b/charts/apisix/templates/ingress.yaml
@@ -14,10 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-{{- if .Values.ingress.enabled -}}
-{{- $fullName := include "apisix-dashboard.fullname" . -}}
-{{- $svcPort := .Values.service.port -}}
-{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+{{- if .Values.gateway.ingress.enabled -}}
+{{- $fullName := include "apisix.fullname" . -}}
+{{- $svcPort := .Values.gateway.http.servicePort -}}
+{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
 apiVersion: networking.k8s.io/v1beta1
 {{- else -}}
 apiVersion: extensions/v1beta1
@@ -26,15 +26,15 @@ kind: Ingress
 metadata:
   name: {{ $fullName }}
   labels:
-    {{- include "apisix-dashboard.labels" . | nindent 4 }}
-  {{- with .Values.ingress.annotations }}
+    {{- include "apisix.labels" . | nindent 4 }}
+  {{- with .Values.gateway.ingress.annotations }}
   annotations:
     {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  {{- if .Values.ingress.tls }}
+  {{- if .Values.gateway.ingress.tls }}
   tls:
-    {{- range .Values.ingress.tls }}
+    {{- range .Values.gateway.ingress.tls }}
     - hosts:
         {{- range .hosts }}
         - {{ . | quote }}
@@ -43,14 +43,14 @@ spec:
     {{- end }}
   {{- end }}
   rules:
-    {{- range .Values.ingress.hosts }}
+    {{- range .Values.gateway.ingress.hosts }}
     - host: {{ .host | quote }}
       http:
         paths:
           {{- range .paths }}
           - path: {{ . }}
             backend:
-              serviceName: {{ $fullName }}
+              serviceName: {{ $fullName }}-gateway
               servicePort: {{ $svcPort }}
           {{- end }}
     {{- end }}

Reply via email to