Skip to content

Commit e573431

Browse files
feat: add httproute template
1 parent 139657d commit e573431

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

charts/gitops-runtime/templates/_helpers.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ Get ingress url for both tunnel based and ingress based runtimes
341341
{{- else }}
342342
{{ fail (printf "ERROR: Unsupported protocol %s for ingress. Only http and https supported" .Values.global.runtime.ingress.protocol)}}
343343
{{- end }}
344+
{{- else if .Values.global.runtime.httpRoute.enabled }}
345+
{{- if has .Values.global.runtime.httpRoute.protocol $supportedProtocols }}
346+
{{- printf "%s://%s" .Values.global.runtime.httpRoute.protocol (index .Values.global.runtime.httpRoute.hostnames 0)}}
347+
{{- else }}
348+
{{ fail (printf "ERROR: Unsupported protocol %s for httpRoute. Only http and https supported" .Values.global.runtime.httpRoute.protocol)}}
349+
{{- end }}
344350
{{/* If tunnel client is enabled - ingress url is <accoundId>-<runtimename>.<tunnel-subdomain> */}}
345351
{{- else if index .Values "tunnel-client" "enabled" }}
346352
{{- $accoundId := required "global.codefresh.accountId is required for tunnel based runtime" .Values.global.codefresh.accountId }}

charts/gitops-runtime/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ global:
6868
# -- HTTPRoute settings
6969
httpRoute:
7070
enabled: false
71+
protocol: https
7172
annotations: {}
7273
labels: {}
7374
parentRefs: []

0 commit comments

Comments
 (0)