Deploy OpenShift route for external communications

This commit is contained in:
Roman Martin Gil 2023-05-04 13:59:49 +02:00
parent 727f38401b
commit 5921825ca5
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{{- if .Values.route.enabled -}}
{{- $fullName := include "kafka-ui.fullname" . -}}
{{- $svcPort := (eq (int .Values.service.port) 80) | ternary "http" .Values.service.port -}}
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: {{ $fullName }}
labels:
{{- include "kafka-ui.labels" . | nindent 4 }}
{{- with .Values.route.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
to:
kind: Service
name: {{ $fullName }}
weight: 100
port:
targetPort: {{ $svcPort | quote }}
{{- if .Values.route.tls.enabled }}
tls:
termination: {{ .Values.route.tls.termination }}
insecureEdgeTerminationPolicy: {{ .Values.route.tls.insecureEdgeTerminationPolicy }}
{{- end }}
{{- end }}

View file

@ -130,6 +130,23 @@ ingress:
# Http paths to add to the Ingress after the default path # Http paths to add to the Ingress after the default path
succeedingPaths: [] succeedingPaths: []
# OpenShift Route configuration
route:
# Enable OpenShift Route resource
enabled: false
# Annotations for OpenShift Route
annotations: {}
# configs for OpenShift Route TLS
tls:
# Enable TLS termination for the OpenShift Route
enabled: false
# TLS termination
termination: edge
# Insecure Edge Termination Policy
insecureEdgeTerminationPolicy: Redirect
resources: resources:
{} {}
# limits: # limits: