فهرست منبع

feat: Introducing precedingPaths in the Ingress object. With the help of the precedingPaths you can to SSL redirect on the ingress controller side. Inspired by Airflow Helm chart web ingress object.

BREAKING CHANGE: Ingress object changed.
andormarkus 4 سال پیش
والد
کامیت
7482465943
2فایلهای تغییر یافته به همراه45 افزوده شده و 18 حذف شده
  1. 22 14
      charts/kafka-ui/templates/ingress.yaml
  2. 23 4
      charts/kafka-ui/values.yaml

+ 22 - 14
charts/kafka-ui/templates/ingress.yaml

@@ -16,26 +16,34 @@ metadata:
     {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  {{- if .Values.ingress.tls }}
+  {{- if .Values.ingress.tls.enabled }}
   tls:
-    {{- range .Values.ingress.tls }}
     - hosts:
-        {{- range .hosts }}
-        - {{ . | quote }}
-        {{- end }}
-      secretName: {{ .secretName }}
-    {{- end }}
+        - {{ .Values.ingress.host }}
+      secretName: {{ .Values.ingress.tls.secretName }}
   {{- end }}
   rules:
-    {{- range .Values.ingress.hosts }}
-    - host: {{ .host | quote }}
-      http:
+    - http:
         paths:
-          {{- range .paths }}
-          - path: {{ . }}
+          {{- range .Values.ingress.precedingPaths }}
+          - path: {{ .path }}
             backend:
+              serviceName: {{ .serviceName }}
+              servicePort: {{ .servicePort }}
+          {{- end }}
+          - backend:
               serviceName: {{ $fullName }}
               servicePort: {{ $svcPort }}
+{{- if .Values.ingress.path }}
+            path: {{ .Values.ingress.path }}
+{{- end }}
+          {{- range .Values.ingress.succeedingPaths }}
+          - path: {{ .path }}
+            backend:
+              serviceName: {{ .serviceName }}
+              servicePort: {{ .servicePort }}
           {{- end }}
-    {{- end }}
-  {{- end }}
+{{- if .Values.ingress.host }}
+      host: {{ .Values.ingress.host }}
+{{- end }}
+  {{- end }}

+ 23 - 4
charts/kafka-ui/values.yaml

@@ -44,13 +44,32 @@ service:
   # if you want to force a specific nodePort. Must be use with service.type=NodePort
   # nodePort:
 
+# Ingress configuration
 ingress:
+  # Enable ingress resource
   enabled: false
+
+  # Annotations for the Ingress
   annotations: {}
-  hosts:
-    - host: chart-example.local
-      paths: []
-  tls: []
+
+  # The path for the Ingress
+  path: ""
+
+  # The hostname for the Ingress
+  host: ""
+
+  # configs for Ingress TLS
+  tls:
+    # Enable TLS termination for the Ingress
+    enabled: false
+    # the name of a pre-created Secret containing a TLS private key and certificate
+    secretName: ""
+
+  # HTTP paths to add to the Ingress before the default path
+  precedingPaths: []
+
+  # Http paths to add to the Ingress after the default path
+  succeedingPaths: []
 
 resources: {}
   # limits: