Skip to content

Commit

Permalink
feat(argo-cd): Add Gateway API support
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Drastil <[email protected]>
  • Loading branch information
pdrastil committed May 12, 2024
1 parent 3693ed4 commit be5fb00
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
42 changes: 42 additions & 0 deletions charts/argo-cd/templates/argocd-server/gateway-httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{- .Values.server.gatewayAPI.enabled }}
apiVersion: {{ .Values.server.gatewayAPI.apiVersion }}
kind: HTTPRoute
metadata:
name: {{ include "argo-cd.server.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
{{- with .Values.server.gatewayAPI.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.server.gatewayAPI.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: {{ .Values.server.gatewayAPI.gateway }}
hostnames:
- {{ .Values.server.gatewayAPI.hostname | default .Values.global.domain }}
rules:
- matches:
- path:
type: {{ .Values.server.gatewayAPI.pathType }}
value: {{ .Values.server.gatewayAPI.path }}
{{- with .Values.server.gatewayAPI.extraPaths }}
- path:
type: {{ .type | default $.Values.gatewayAPI.pathType }}
value: {{ .value }}
{{- end }}
backendRefs:
- name: {{ include "argo-cd.server.fullname" . }}
port: {{ .Values.server.service.servicePortHttp }}
{{- with .Values.server.ingress.extraRules }}
- matches:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- end }}
39 changes: 39 additions & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2043,6 +2043,45 @@ server:
# -- Automount API credentials for the Service Account
automountServiceAccountToken: true

# Argo CD server Gateway API HTTPRoute configuration
# NOTE: Alpha feature, gRPC & TLS pass-through will not work
gatewayAPI:
# -- Enable a Gateway API resources for the Argo CD server
enabled: true
# -- Additional route labels
labels: {}
# -- Additional route annotations
annotations: {}

# -- Defines which Gateway will implement the resource
gateway: ""

# -- Argo CD server hostname
# @default -- `""` (defaults to global.domain)
hostname: ""

# -- The path to Argo CD server
path: /

# -- HTTP reoute path type. Either 'Exact' or `PathPrefix`
pathType: PathPrefix

extraPaths: []
# - type: PathPrefix
# value: /*

# -- Additional routing rules
# @default -- `[]` (See [values.yaml])
## Note: Supports use of custom Helm templates
extraRules: []
# - path:
# type: PathPrefix
# value: /
# backendRefs:
# - name: '{{ include "argo-cd.server.fullname" . }}'
# port: '{{ .Values.server.service.servicePortHttpName }}'


# Argo CD server ingress configuration
ingress:
# -- Enable an ingress resource for the Argo CD server
Expand Down

0 comments on commit be5fb00

Please sign in to comment.