From 7147e1e8caa9ed65ec04b02b13e547ee4b1af3ea Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 6 Dec 2024 14:02:14 +0100 Subject: [PATCH] ADD charts/opencost/templates/route.yaml: OpenShift route --- charts/opencost/templates/route.yaml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 charts/opencost/templates/route.yaml diff --git a/charts/opencost/templates/route.yaml b/charts/opencost/templates/route.yaml new file mode 100644 index 0000000..e11fc05 --- /dev/null +++ b/charts/opencost/templates/route.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.opencost.ui.enabled .Values.opencost.ui.route.enabled }} +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: {{ include "opencost.fullname" . }}-route + namespace: {{ include "opencost.namespace" . }} + labels: {{- include "opencost.labels" . | nindent 4 }} + {{- with .Values.opencost.ui.route.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + host: {{ .Values.opencost.ui.route.host | quote }} + {{- if .Values.opencost.ui.route.path }} + path: {{ .Values.opencost.ui.route.path }} + {{- end }} + port: + targetPort: {{ .Values.opencost.ui.route.targetPort }} + to: + kind: Service + name: opencost + weight: 100 + wildcardPolicy: None + {{- if .Values.opencost.ui.route.tls }} + tls: + {{- if .Values.opencost.ui.route.tls.insecureEdgeTerminationPolicy }} + insecureEdgeTerminationPolicy: {{ .Values.opencost.ui.route.tls.insecureEdgeTerminationPolicy }} + {{- end }} + {{- if .Values.opencost.ui.route.tls.termination }} + termination: {{ .Values.opencost.ui.route.tls.termination }} + {{- end }} + {{- end }} +{{- end }}