Skip to content

Commit

Permalink
ADD charts/opencost/templates/route.yaml: OpenShift route
Browse files Browse the repository at this point in the history
  • Loading branch information
kastl-ars committed Dec 6, 2024
1 parent c1f846e commit 338b0f8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions charts/opencost/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 338b0f8

Please sign in to comment.