From da5dc2771215addadd3a4dc8afbfd3b4dca47bd0 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 15:25:22 +0400 Subject: [PATCH 1/7] feat: add httproute template --- .../gitops-runtime/templates/httproute.yaml | 41 +++++++++++++++++++ charts/gitops-runtime/values.yaml | 7 ++++ 2 files changed, 48 insertions(+) create mode 100644 charts/gitops-runtime/templates/httproute.yaml diff --git a/charts/gitops-runtime/templates/httproute.yaml b/charts/gitops-runtime/templates/httproute.yaml new file mode 100644 index 00000000..c0488f64 --- /dev/null +++ b/charts/gitops-runtime/templates/httproute.yaml @@ -0,0 +1,41 @@ +{{- if .Values.global.runtime.httpRoute.enabled -}} +{{- $svcName := include "internal-router.fullname" (dict "Values" (get .Values "internal-router")) -}} +{{- $svcPort := index .Values "internal-router" "service" "port" -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: codefresh-gitops-runtime + labels: + {{- include "codefresh-gitops-runtime.labels" . | nindent 4 }} + {{- with .Values.global.runtime.httpRoute.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.global.runtime.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + parentRefs: + {{- if .Values.global.runtime.httpRoute.parentRefs }} + {{- toYaml .Values.global.runtime.httpRoute.parentRefs | nindent 4 }} + {{- else }} + {{- fail "ERROR: global.runtime.httpRoute.parentRefs is required when httpRoute is enabled" }} + {{- end }} + hostnames: {{- toYaml .Values.global.runtime.httpRoute.hostnames | nindent 4 }} + rules: + - matches: + - path: + type: PathPrefix + value: /webhooks + - path: + type: PathPrefix + value : /app-proxy + {{- if (index (get $.Values "argo-workflows") "enabled") }} + - path: + type: PathPrefix + value : /workflows + {{- end }} + backendRefs: + - name: {{ $svcName }} + port: {{ $svcPort }} +{{- end }} diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 82f84f03..f16f7df9 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -65,6 +65,13 @@ global: labels: {} # -- Hosts for runtime ingress. Note that Codefresh platform will always use the first host in the list to access the runtime. hosts: [] + # -- HTTPRoute settings + httpRoute: + enabled: false + annotations: {} + labels: {} + parentRefs: [] + hostnames: [] # -- Explicit url for runtime ingress. Provide this value only if you don't want the chart to create and ingress (global.runtime.ingress.enabled=false) and tunnel-client is not used (tunnel-client.enabled=false) ingressUrl: "" # -- is the runtime set as a "configuration runtime". From 139657d6b53e8d4aa1063f804e62a930ee507365 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 16:06:48 +0400 Subject: [PATCH 2/7] feat: add httproute template --- charts/gitops-runtime/templates/tunnel-client.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitops-runtime/templates/tunnel-client.yaml b/charts/gitops-runtime/templates/tunnel-client.yaml index 8d5b0c70..ecc3d90e 100644 --- a/charts/gitops-runtime/templates/tunnel-client.yaml +++ b/charts/gitops-runtime/templates/tunnel-client.yaml @@ -4,7 +4,7 @@ to intruduce the subdomainPrefix to the tunnel. Since the prefix is comprised of -, we can tempalate it and thus reduce complexity of installation and number or mandatory values to provide for the installation to work. */}} -{{- if and ( not .Values.global.runtime.ingress.enabled) (index .Values "tunnel-client" "enabled") }} +{{- if and ( not .Values.global.runtime.ingress.enabled) ( not .Values.global.runtime.httpRoute.enabled) (index .Values "tunnel-client" "enabled") }} {{ $tunnelClientContext := (index .Subcharts "tunnel-client")}} {{ $accoundId := required "codefresh.accountId is required" .Values.global.codefresh.accountId }} {{ $runtimeName := required "runtime.name is required" .Values.global.runtime.name }} From e573431a97daf22019347fec2c13a259c8b25d13 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 16:53:15 +0400 Subject: [PATCH 3/7] feat: add httproute template --- charts/gitops-runtime/templates/_helpers.tpl | 6 ++++++ charts/gitops-runtime/values.yaml | 1 + 2 files changed, 7 insertions(+) diff --git a/charts/gitops-runtime/templates/_helpers.tpl b/charts/gitops-runtime/templates/_helpers.tpl index c487355d..1ac04563 100644 --- a/charts/gitops-runtime/templates/_helpers.tpl +++ b/charts/gitops-runtime/templates/_helpers.tpl @@ -341,6 +341,12 @@ Get ingress url for both tunnel based and ingress based runtimes {{- else }} {{ fail (printf "ERROR: Unsupported protocol %s for ingress. Only http and https supported" .Values.global.runtime.ingress.protocol)}} {{- end }} + {{- else if .Values.global.runtime.httpRoute.enabled }} + {{- if has .Values.global.runtime.httpRoute.protocol $supportedProtocols }} + {{- printf "%s://%s" .Values.global.runtime.httpRoute.protocol (index .Values.global.runtime.httpRoute.hostnames 0)}} + {{- else }} + {{ fail (printf "ERROR: Unsupported protocol %s for httpRoute. Only http and https supported" .Values.global.runtime.httpRoute.protocol)}} + {{- end }} {{/* If tunnel client is enabled - ingress url is -. */}} {{- else if index .Values "tunnel-client" "enabled" }} {{- $accoundId := required "global.codefresh.accountId is required for tunnel based runtime" .Values.global.codefresh.accountId }} diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index f16f7df9..8e5fd9a2 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -68,6 +68,7 @@ global: # -- HTTPRoute settings httpRoute: enabled: false + protocol: https annotations: {} labels: {} parentRefs: [] From cce1e508bd48572658529bd44772c6e1a8a77107 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 16:54:51 +0400 Subject: [PATCH 4/7] feat: add httproute template --- charts/gitops-runtime/templates/httproute.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/gitops-runtime/templates/httproute.yaml b/charts/gitops-runtime/templates/httproute.yaml index c0488f64..1c59e07f 100644 --- a/charts/gitops-runtime/templates/httproute.yaml +++ b/charts/gitops-runtime/templates/httproute.yaml @@ -21,7 +21,12 @@ spec: {{- else }} {{- fail "ERROR: global.runtime.httpRoute.parentRefs is required when httpRoute is enabled" }} {{- end }} - hostnames: {{- toYaml .Values.global.runtime.httpRoute.hostnames | nindent 4 }} + hostnames: + {{ - if .Values.global.runtime.httpRoute.hostnames }} + {{- toYaml .Values.global.runtime.httpRoute.hostnames | nindent 4 }} + {{- else }} + {{- fail "ERROR: global.runtime.httpRoute.hostnames is required when httpRoute is enabled" }} + {{- end }} rules: - matches: - path: From 80faa4b36f8f1547c574bd71cadd576ce593b6ee Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 16:58:16 +0400 Subject: [PATCH 5/7] feat: add httproute template --- charts/gitops-runtime/templates/httproute.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitops-runtime/templates/httproute.yaml b/charts/gitops-runtime/templates/httproute.yaml index 1c59e07f..00d247da 100644 --- a/charts/gitops-runtime/templates/httproute.yaml +++ b/charts/gitops-runtime/templates/httproute.yaml @@ -22,7 +22,7 @@ spec: {{- fail "ERROR: global.runtime.httpRoute.parentRefs is required when httpRoute is enabled" }} {{- end }} hostnames: - {{ - if .Values.global.runtime.httpRoute.hostnames }} + {{- if .Values.global.runtime.httpRoute.hostnames }} {{- toYaml .Values.global.runtime.httpRoute.hostnames | nindent 4 }} {{- else }} {{- fail "ERROR: global.runtime.httpRoute.hostnames is required when httpRoute is enabled" }} From 1ec75a5757b3571b0acee3769051b4ee38a90850 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 17:45:34 +0400 Subject: [PATCH 6/7] feat: add httproute template --- charts/gitops-runtime/values.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 8e5fd9a2..89062f34 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -67,12 +67,27 @@ global: hosts: [] # -- HTTPRoute settings httpRoute: + # -- Enable HTTPRoute enabled: false + # -- The protocol that Codefresh platform will use to access the runtime ingress. Can be http or https. protocol: https - annotations: {} - labels: {} + # -- Required! List of parent Gateway references this HTTPRoute should attach to + # ref: https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference + # E.g. + # parentRefs: + # - name: traefik-gateway + # namespace: traefik parentRefs: [] + # -- List of hostnames to be covered by this HTTPRoute + # ref: https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#hostname + # E.g. + # hostnames: + # - runtime.example.com hostnames: [] + # -- Set annotations on the HTTPRoute resource + annotations: {} + # -- Set labels on the HTTPRoute resource + labels: {} # -- Explicit url for runtime ingress. Provide this value only if you don't want the chart to create and ingress (global.runtime.ingress.enabled=false) and tunnel-client is not used (tunnel-client.enabled=false) ingressUrl: "" # -- is the runtime set as a "configuration runtime". From 4fe99f108bed4724c59ef97a639edd409a1db145 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 2 Jun 2026 17:49:38 +0400 Subject: [PATCH 7/7] feat: add httproute template --- charts/gitops-runtime/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 89062f34..fe963cc7 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -69,7 +69,7 @@ global: httpRoute: # -- Enable HTTPRoute enabled: false - # -- The protocol that Codefresh platform will use to access the runtime ingress. Can be http or https. + # -- The protocol that Codefresh platform will use to access the runtime. Can be http or https. protocol: https # -- Required! List of parent Gateway references this HTTPRoute should attach to # ref: https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference