feat(argo-cd): Add Gateway API support
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
6dab549268
commit
0117c1c82e
2 changed files with 97 additions and 0 deletions
|
@ -0,0 +1,48 @@
|
||||||
|
{{- if .Values.server.gatewayAPI.enabled }}
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
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 }}
|
||||||
|
{{- with .Values.server.gatewayAPI.gatewaySection }}
|
||||||
|
sectionName: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
hostnames:
|
||||||
|
- {{ .Values.server.gatewayAPI.hostname | default .Values.global.domain }}
|
||||||
|
{{- with .Values.server.gatewayAPI.extraHosts }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- with .Values.server.ingress.extraRules }}
|
||||||
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
- matches:
|
||||||
|
- path:
|
||||||
|
type: {{ .Values.server.gatewayAPI.pathType }}
|
||||||
|
value: {{ .Values.server.gatewayAPI.path }}
|
||||||
|
{{- range .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 }}
|
||||||
|
weight: 100
|
||||||
|
{{- end }}
|
|
@ -2151,6 +2151,55 @@ server:
|
||||||
# -- Automount API credentials for the Service Account
|
# -- Automount API credentials for the Service Account
|
||||||
automountServiceAccountToken: true
|
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: ""
|
||||||
|
|
||||||
|
# -- Defines which Gateway section will implement the resource
|
||||||
|
gatewaySection: ""
|
||||||
|
|
||||||
|
# -- 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
|
||||||
|
|
||||||
|
# -- The list of additional hostnames to be covered by API Gateway record
|
||||||
|
extraHosts: []
|
||||||
|
|
||||||
|
# -- Additional API Gateway paths
|
||||||
|
# @default -- `[]` (See [values.yaml])
|
||||||
|
## Note: Supports use of custom Helm templates
|
||||||
|
extraPaths: []
|
||||||
|
# - type: PathPrefix
|
||||||
|
# value: /*
|
||||||
|
|
||||||
|
# -- Additional routing rules
|
||||||
|
# @default -- `[]` (See [values.yaml])
|
||||||
|
## Note: Supports use of custom Helm templates
|
||||||
|
extraRules: []
|
||||||
|
# - matches:
|
||||||
|
# - path:
|
||||||
|
# type: PathPrefix
|
||||||
|
# value: /
|
||||||
|
# backendRefs:
|
||||||
|
# - name: '{{ include "argo-cd.server.fullname" . }}'
|
||||||
|
# port: '{{ .Values.server.service.servicePortHttpName }}'
|
||||||
|
|
||||||
|
|
||||||
# Argo CD server ingress configuration
|
# Argo CD server ingress configuration
|
||||||
ingress:
|
ingress:
|
||||||
# -- Enable an ingress resource for the Argo CD server
|
# -- Enable an ingress resource for the Argo CD server
|
||||||
|
|
Loading…
Reference in a new issue