Skip to content

Commit 214eb62

Browse files
committed
feat(argo-cd): adding httproute support to applicationset controller's webhook support
Signed-off-by: Stephen Kluthe <[email protected]>
1 parent 9bf4945 commit 214eb62

4 files changed

Lines changed: 91 additions & 1 deletion

File tree

charts/argo-cd/Chart.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ appVersion: v3.2.5
33
kubeVersion: ">=1.25.0-0"
44
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
55
name: argo-cd
6-
version: 9.3.4
6+
version: 9.3.5
77
home: https://github.com/argoproj/argo-helm
88
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
99
sources:
@@ -28,3 +28,5 @@ annotations:
2828
artifacthub.io/changes: |
2929
- kind: changed
3030
description: Bump argo-cd to v3.2.5
31+
- kind: added
32+
description: Added httproute support to ApplicationSet controller webhook

charts/argo-cd/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,12 @@ If you use an External Redis (See Option 3 above), this Job is not deployed.
16751675
| applicationSet.extraEnvFrom | list | `[]` (See [values.yaml]) | envFrom to pass to the ApplicationSet controller |
16761676
| applicationSet.extraVolumeMounts | list | `[]` | List of extra mounts to add (normally used with extraVolumes) |
16771677
| applicationSet.extraVolumes | list | `[]` | List of extra volumes to add |
1678+
| applicationSet.httproute.annotations | object | `{}` | Additional HTTPRoute annotations |
1679+
| applicationSet.httproute.enabled | bool | `false` | Enable HTTPRoute resource for Argo CD Applicationset Webhook (Gateway API) |
1680+
| applicationSet.httproute.hostnames | list | `[]` (See [values.yaml]) | List of hostnames for the HTTPRoute |
1681+
| applicationSet.httproute.labels | object | `{}` | Additional HTTPRoute labels |
1682+
| applicationSet.httproute.parentRefs | list | `[]` (See [values.yaml]) | Gateway API parentRefs for the HTTPRoute |
1683+
| applicationSet.httproute.rules | list | `[]` (See [values.yaml]) | HTTPRoute rules configuration |
16781684
| applicationSet.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the ApplicationSet controller |
16791685
| applicationSet.image.repository | string | `""` (defaults to global.image.repository) | Repository to use for the ApplicationSet controller |
16801686
| applicationSet.image.tag | string | `""` (defaults to global.image.tag) | Tag to use for the ApplicationSet controller |
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{{- if .Values.applicationSet.httproute.enabled -}}
2+
{{- $fullName := include "argo-cd.applicationSet.fullname" . -}}
3+
apiVersion: gateway.networking.k8s.io/v1
4+
kind: HTTPRoute
5+
metadata:
6+
name: {{ include "argo-cd.applicationSet.fullname" . }}
7+
namespace: {{ include "argo-cd.namespace" . }}
8+
labels:
9+
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
10+
{{- with .Values.applicationSet.httproute.labels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- with .Values.applicationSet.httproute.annotations }}
14+
annotations:
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
17+
spec:
18+
parentRefs:
19+
{{- with .Values.applicationSet.httproute.parentRefs }}
20+
{{- toYaml . | nindent 4 }}
21+
{{- end }}
22+
{{- with .Values.applicationSet.httproute.hostnames }}
23+
hostnames:
24+
{{- toYaml . | nindent 4 }}
25+
{{- end }}
26+
rules:
27+
{{- range .Values.applicationSet.httproute.rules }}
28+
{{- with .matches }}
29+
- matches:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
{{- with .filters }}
33+
filters:
34+
{{- toYaml . | nindent 8 }}
35+
{{- end }}
36+
backendRefs:
37+
- group: ''
38+
kind: Service
39+
name: {{ include "argo-cd.applicationSet.fullname" . }}
40+
port: {{ .Values.applicationSet.service.port }}
41+
weight: 1
42+
{{- end }}
43+
{{- end }}

charts/argo-cd/values.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,45 @@ applicationSet:
35113511
# - secretName: argocd-applicationset-tls
35123512
# hosts:
35133513
# - argocd-applicationset.example.com
3514+
3515+
## Gateway API HTTPRoute for the Git Generator webhook
3516+
## Ref: https://argocd-applicationset.readthedocs.io/en/master/Generators-Git/#webhook-configuration)
3517+
# NOTE: Gateway API support is in EXPERIMENTAL status
3518+
# Support depends on your Gateway controller implementation
3519+
# Some controllers may require additional configuration (e.g., BackendTLSPolicy for HTTPS backends)
3520+
# Refer to https://gateway-api.sigs.k8s.io/implementations/ for controller-specific details
3521+
httproute:
3522+
# -- Enable HTTPRoute resource for Argo CD Applicationset Webhook (Gateway API)
3523+
enabled: false
3524+
# -- Additional HTTPRoute labels
3525+
labels: {}
3526+
# -- Additional HTTPRoute annotations
3527+
annotations: {}
3528+
# -- Gateway API parentRefs for the HTTPRoute
3529+
## Must reference an existing Gateway
3530+
# @default -- `[]` (See [values.yaml])
3531+
parentRefs: []
3532+
# - name: example-gateway
3533+
# namespace: example-gateway-namespace
3534+
# sectionName: https
3535+
# -- List of hostnames for the HTTPRoute
3536+
# @default -- `[]` (See [values.yaml])
3537+
hostnames: []
3538+
# - argocd.example.com
3539+
# -- HTTPRoute rules configuration
3540+
# @default -- `[]` (See [values.yaml])
3541+
rules:
3542+
- matches:
3543+
- path:
3544+
type: PathPrefix
3545+
value: /api/webhook
3546+
# filters: []
3547+
# - type: RequestHeaderModifier
3548+
# requestHeaderModifier:
3549+
# add:
3550+
# - name: X-Custom-Header
3551+
# value: custom-value
3552+
35143553
# -- Enable ApplicationSet in any namespace feature
35153554
allowAnyNamespace: false
35163555

0 commit comments

Comments
 (0)