diff --git a/charts/kafka-ui/templates/virtualservice.yaml b/charts/kafka-ui/templates/virtualservice.yaml new file mode 100644 index 00000000..3fdfde89 --- /dev/null +++ b/charts/kafka-ui/templates/virtualservice.yaml @@ -0,0 +1,22 @@ +{{- if .Values.istio.enabled }} +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: {{ include "kafka-ui.fullname" . }} + labels: + {{- include "kafka-ui.labels" . | nindent 4 }} +spec: + hosts: + {{- toYaml .Values.istio.virtualService.hosts | nindent 4 }} + gateways: + {{- toYaml .Values.istio.virtualService.gateways | nindent 4 }} + http: + - match: + - uri: + prefix: "/" + route: + - destination: + host: {{ include "kafka-ui.fullname" . }} + port: + number: 80 +{{- end }} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 72038e9b..4c317a56 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -99,6 +99,18 @@ service: # if you want to force a specific nodePort. Must be use with service.type=NodePort # nodePort: +# Istio configuration +istio: + # Enable istio resource + enabled: false + # Settings istio VirtualService + virtualService: + hosts: + - "example.com" + # Settings gateway istio + gateways: + - "istio-system/gateway" + # Ingress configuration ingress: # Enable ingress resource