Переглянути джерело

add nodePort support (#337)

* add nodePort support
Sebastien Dionne 4 роки тому
батько
коміт
7c0cc3bf14
2 змінених файлів з 5 додано та 0 видалено
  1. 3 0
      charts/kafka-ui/templates/service.yaml
  2. 2 0
      charts/kafka-ui/values.yaml

+ 3 - 0
charts/kafka-ui/templates/service.yaml

@@ -11,5 +11,8 @@ spec:
       targetPort: http
       targetPort: http
       protocol: TCP
       protocol: TCP
       name: http
       name: http
+      {{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }}
+      nodePort: {{ .Values.service.nodePort }}
+      {{- end }}
   selector:
   selector:
     {{- include "kafka-ui.selectorLabels" . | nindent 4 }}
     {{- include "kafka-ui.selectorLabels" . | nindent 4 }}

+ 2 - 0
charts/kafka-ui/values.yaml

@@ -41,6 +41,8 @@ securityContext: {}
 service:
 service:
   type: ClusterIP
   type: ClusterIP
   port: 80
   port: 80
+  # if you want to force a specific nodePort. Must be use with service.type=NodePort
+  # nodePort:
 
 
 ingress:
 ingress:
   enabled: false
   enabled: false