Skip to content

Commit d147742

Browse files
sircthulhuclaude
andcommitted
feat(gateway-api): add Gateway API support via Cilium
- Upgrade Gateway API CRDs from v1.2.0 to v1.5.0 (experimental channel) - Add gateway-api-crds as a component in all networking variants, with Cilium depending on it to ensure CRDs are available first - Add gateway.gatewayAPI platform config (enables Cilium gatewayAPI.enabled=true), can be used alongside gateway.ingress - Enable Gateway API support in cert-manager Co-Authored-By: Claude <[email protected]> Signed-off-by: Kirill Ilin <[email protected]>
1 parent bf31b7c commit d147742

6 files changed

Lines changed: 16888 additions & 9729 deletions

File tree

‎packages/core/platform/sources/networking.yaml‎

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ spec:
1515
- name: cilium
1616
dependsOn: []
1717
components:
18+
- name: gateway-api-crds
19+
path: system/gateway-api-crds
20+
install:
21+
namespace: cozy-gateway-api-crds
22+
releaseName: gateway-api-crds
23+
dependsOn: []
1824
- name: cilium
1925
path: system/cilium
2026
valuesFiles:
@@ -24,7 +30,8 @@ spec:
2430
privileged: true
2531
namespace: cozy-cilium
2632
releaseName: cilium
27-
dependsOn: []
33+
dependsOn:
34+
- gateway-api-crds
2835
- name: cilium-networkpolicy
2936
path: system/cilium-networkpolicy
3037
install:
@@ -36,6 +43,12 @@ spec:
3643
- name: cilium-kilo
3744
dependsOn: []
3845
components:
46+
- name: gateway-api-crds
47+
path: system/gateway-api-crds
48+
install:
49+
namespace: cozy-gateway-api-crds
50+
releaseName: gateway-api-crds
51+
dependsOn: []
3952
- name: cilium
4053
path: system/cilium
4154
valuesFiles:
@@ -46,7 +59,8 @@ spec:
4659
privileged: true
4760
namespace: cozy-cilium
4861
releaseName: cilium
49-
dependsOn: []
62+
dependsOn:
63+
- gateway-api-crds
5064
- name: kilo
5165
path: system/kilo
5266
valuesFiles:
@@ -62,6 +76,12 @@ spec:
6276
- name: cilium-generic
6377
dependsOn: []
6478
components:
79+
- name: gateway-api-crds
80+
path: system/gateway-api-crds
81+
install:
82+
namespace: cozy-gateway-api-crds
83+
releaseName: gateway-api-crds
84+
dependsOn: []
6585
- name: cilium
6686
path: system/cilium
6787
valuesFiles:
@@ -70,7 +90,8 @@ spec:
7090
privileged: true
7191
namespace: cozy-cilium
7292
releaseName: cilium
73-
dependsOn: []
93+
dependsOn:
94+
- gateway-api-crds
7495
- name: cilium-networkpolicy
7596
path: system/cilium-networkpolicy
7697
install:
@@ -82,6 +103,12 @@ spec:
82103
- name: kubeovn-cilium
83104
dependsOn: []
84105
components:
106+
- name: gateway-api-crds
107+
path: system/gateway-api-crds
108+
install:
109+
namespace: cozy-gateway-api-crds
110+
releaseName: gateway-api-crds
111+
dependsOn: []
85112
- name: cilium
86113
path: system/cilium
87114
valuesFiles:
@@ -92,7 +119,8 @@ spec:
92119
privileged: true
93120
namespace: cozy-cilium
94121
releaseName: cilium
95-
dependsOn: []
122+
dependsOn:
123+
- gateway-api-crds
96124
- name: cilium-networkpolicy
97125
path: system/cilium-networkpolicy
98126
install:
@@ -113,6 +141,12 @@ spec:
113141
- name: kubeovn-cilium-generic
114142
dependsOn: []
115143
components:
144+
- name: gateway-api-crds
145+
path: system/gateway-api-crds
146+
install:
147+
namespace: cozy-gateway-api-crds
148+
releaseName: gateway-api-crds
149+
dependsOn: []
116150
- name: cilium
117151
path: system/cilium
118152
valuesFiles:
@@ -122,7 +156,8 @@ spec:
122156
privileged: true
123157
namespace: cozy-cilium
124158
releaseName: cilium
125-
dependsOn: []
159+
dependsOn:
160+
- gateway-api-crds
126161
- name: cilium-networkpolicy
127162
path: system/cilium-networkpolicy
128163
install:

‎packages/core/platform/templates/bundles/system.yaml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
{{- $kubeovnValues := dict "kube-ovn" $kubeovnDict -}}
1717
{{- $_ := set $networkingComponents "kubeovn" (dict "values" $kubeovnValues) -}}
1818
{{- /* For Talos (isp-full): use KubePrism endpoint and disable cgroup autoMount */ -}}
19-
{{- $ciliumValues := dict "cilium" (dict
19+
{{- $ciliumDict := dict
2020
"k8sServiceHost" "localhost"
2121
"k8sServicePort" "7445"
22-
"cgroup" (dict "autoMount" (dict "enabled" false))) -}}
22+
"cgroup" (dict "autoMount" (dict "enabled" false)) -}}
23+
{{- if .Values.gateway.gatewayAPI -}}
24+
{{- $_ := set $ciliumDict "gatewayAPI" (dict "enabled" true) -}}
25+
{{- end -}}
26+
{{- $ciliumValues := dict "cilium" $ciliumDict -}}
2327
{{- $_ := set $networkingComponents "cilium" (dict "values" $ciliumValues) -}}
2428
{{- end -}}
2529
{{include "cozystack.platform.package" (list "cozystack.networking" "kubeovn-cilium" $ $networkingComponents) }}
@@ -83,10 +87,14 @@
8387
{{- $kubeovnValues := dict "kube-ovn" $kubeovnDict -}}
8488
{{- $_ := set $networkingComponents "kubeovn" (dict "values" $kubeovnValues) -}}
8589
{{- /* Cilium configuration - for generic k8s, always enable cgroup autoMount */ -}}
86-
{{- $ciliumValues := dict "cilium" (dict
90+
{{- $ciliumDict := dict
8791
"k8sServiceHost" $apiHost
8892
"k8sServicePort" $apiPort
89-
"cgroup" (dict "autoMount" (dict "enabled" true))) -}}
93+
"cgroup" (dict "autoMount" (dict "enabled" true)) -}}
94+
{{- if .Values.gateway.gatewayAPI -}}
95+
{{- $_ := set $ciliumDict "gatewayAPI" (dict "enabled" true) -}}
96+
{{- end -}}
97+
{{- $ciliumValues := dict "cilium" $ciliumDict -}}
9098
{{- $_ := set $networkingComponents "cilium" (dict "values" $ciliumValues) -}}
9199
{{- end -}}
92100
{{- /* Use kubeovn-cilium-generic variant (no values-talos.yaml) */ -}}

‎packages/core/platform/values.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ networking:
3434
# Set this to comma-separated list of master node IPs to override.
3535
kubeovn:
3636
MASTER_NODES: ""
37+
# Gateway configuration
38+
gateway:
39+
ingress: true
40+
gatewayAPI: false
3741
# Service publishing and ingress configuration
3842
publishing:
3943
host: "example.org"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cert-manager:
2+
config:
3+
enableGatewayAPI: true

‎packages/system/gateway-api-crds/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ include ../../../hack/package.mk
66
update:
77
rm -rf templates
88
mkdir templates
9-
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.2.0" > templates/crds-experimental.yaml
9+
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.5.0" > templates/crds-experimental.yaml

0 commit comments

Comments
 (0)