Compare commits

...

2 Commits

Author SHA1 Message Date
Kirill Ilin
7247edc280 feat(external-dns): add Gateway API source when gatewayAPI is enabled
When gateway.gatewayAPI is true, pass gateway-httproute source to the
system external-dns package via components values override.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
2026-03-11 23:27:54 +05:00
Kirill Ilin
2c0a043fa5 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 <noreply@anthropic.com>
Signed-off-by: Kirill Ilin <stitch14@yandex.ru>
2026-03-11 23:27:30 +05:00
6 changed files with 8452 additions and 1284 deletions

View File

@@ -15,6 +15,12 @@ spec:
- name: cilium
dependsOn: []
components:
- name: gateway-api-crds
path: system/gateway-api-crds
install:
namespace: cozy-gateway-api-crds
releaseName: gateway-api-crds
dependsOn: []
- name: cilium
path: system/cilium
valuesFiles:
@@ -24,7 +30,8 @@ spec:
privileged: true
namespace: cozy-cilium
releaseName: cilium
dependsOn: []
dependsOn:
- gateway-api-crds
- name: cilium-networkpolicy
path: system/cilium-networkpolicy
install:
@@ -36,6 +43,12 @@ spec:
- name: cilium-kilo
dependsOn: []
components:
- name: gateway-api-crds
path: system/gateway-api-crds
install:
namespace: cozy-gateway-api-crds
releaseName: gateway-api-crds
dependsOn: []
- name: cilium
path: system/cilium
valuesFiles:
@@ -46,7 +59,8 @@ spec:
privileged: true
namespace: cozy-cilium
releaseName: cilium
dependsOn: []
dependsOn:
- gateway-api-crds
- name: kilo
path: system/kilo
valuesFiles:
@@ -62,6 +76,12 @@ spec:
- name: cilium-generic
dependsOn: []
components:
- name: gateway-api-crds
path: system/gateway-api-crds
install:
namespace: cozy-gateway-api-crds
releaseName: gateway-api-crds
dependsOn: []
- name: cilium
path: system/cilium
valuesFiles:
@@ -70,7 +90,8 @@ spec:
privileged: true
namespace: cozy-cilium
releaseName: cilium
dependsOn: []
dependsOn:
- gateway-api-crds
- name: cilium-networkpolicy
path: system/cilium-networkpolicy
install:
@@ -82,6 +103,12 @@ spec:
- name: kubeovn-cilium
dependsOn: []
components:
- name: gateway-api-crds
path: system/gateway-api-crds
install:
namespace: cozy-gateway-api-crds
releaseName: gateway-api-crds
dependsOn: []
- name: cilium
path: system/cilium
valuesFiles:
@@ -92,7 +119,8 @@ spec:
privileged: true
namespace: cozy-cilium
releaseName: cilium
dependsOn: []
dependsOn:
- gateway-api-crds
- name: cilium-networkpolicy
path: system/cilium-networkpolicy
install:
@@ -113,6 +141,12 @@ spec:
- name: kubeovn-cilium-generic
dependsOn: []
components:
- name: gateway-api-crds
path: system/gateway-api-crds
install:
namespace: cozy-gateway-api-crds
releaseName: gateway-api-crds
dependsOn: []
- name: cilium
path: system/cilium
valuesFiles:
@@ -122,7 +156,8 @@ spec:
privileged: true
namespace: cozy-cilium
releaseName: cilium
dependsOn: []
dependsOn:
- gateway-api-crds
- name: cilium-networkpolicy
path: system/cilium-networkpolicy
install:

View File

@@ -16,10 +16,14 @@
{{- $kubeovnValues := dict "kube-ovn" $kubeovnDict -}}
{{- $_ := set $networkingComponents "kubeovn" (dict "values" $kubeovnValues) -}}
{{- /* For Talos (isp-full): use KubePrism endpoint and disable cgroup autoMount */ -}}
{{- $ciliumValues := dict "cilium" (dict
{{- $ciliumDict := dict
"k8sServiceHost" "localhost"
"k8sServicePort" "7445"
"cgroup" (dict "autoMount" (dict "enabled" false))) -}}
"cgroup" (dict "autoMount" (dict "enabled" false)) -}}
{{- if .Values.gateway.gatewayAPI -}}
{{- $_ := set $ciliumDict "gatewayAPI" (dict "enabled" true) -}}
{{- end -}}
{{- $ciliumValues := dict "cilium" $ciliumDict -}}
{{- $_ := set $networkingComponents "cilium" (dict "values" $ciliumValues) -}}
{{- end -}}
{{include "cozystack.platform.package" (list "cozystack.networking" "kubeovn-cilium" $ $networkingComponents) }}
@@ -83,10 +87,14 @@
{{- $kubeovnValues := dict "kube-ovn" $kubeovnDict -}}
{{- $_ := set $networkingComponents "kubeovn" (dict "values" $kubeovnValues) -}}
{{- /* Cilium configuration - for generic k8s, always enable cgroup autoMount */ -}}
{{- $ciliumValues := dict "cilium" (dict
{{- $ciliumDict := dict
"k8sServiceHost" $apiHost
"k8sServicePort" $apiPort
"cgroup" (dict "autoMount" (dict "enabled" true))) -}}
"cgroup" (dict "autoMount" (dict "enabled" true)) -}}
{{- if .Values.gateway.gatewayAPI -}}
{{- $_ := set $ciliumDict "gatewayAPI" (dict "enabled" true) -}}
{{- end -}}
{{- $ciliumValues := dict "cilium" $ciliumDict -}}
{{- $_ := set $networkingComponents "cilium" (dict "values" $ciliumValues) -}}
{{- end -}}
{{- /* Use kubeovn-cilium-generic variant (no values-talos.yaml) */ -}}
@@ -148,7 +156,16 @@
# Optional System Packages (controlled via bundles.enabledPackages)
{{include "cozystack.platform.package.optional.default" (list "cozystack.nfs-driver" $) }}
{{include "cozystack.platform.package.optional.default" (list "cozystack.telepresence" $) }}
{{include "cozystack.platform.package.optional.default" (list "cozystack.external-dns" $) }}
{{- $externalDnsComponents := dict -}}
{{- if .Values.gateway.gatewayAPI -}}
{{- $externalDnsValues := dict "external-dns" (dict "sources" (list "service" "ingress" "gateway-httproute")) -}}
{{- $_ := set $externalDnsComponents "external-dns" (dict "values" $externalDnsValues) -}}
{{- end -}}
{{- $disabled := default (list) .Values.bundles.disabledPackages -}}
{{- $enabled := default (list) .Values.bundles.enabledPackages -}}
{{- if and (has "cozystack.external-dns" $enabled) (not (has "cozystack.external-dns" $disabled)) -}}
{{include "cozystack.platform.package" (list "cozystack.external-dns" "default" $ $externalDnsComponents) }}
{{- end }}
{{include "cozystack.platform.package.optional.default" (list "cozystack.external-dns-application" $) }}
{{include "cozystack.platform.package.optional.default" (list "cozystack.external-secrets-operator" $) }}
{{- if has "cozystack.bootbox" (default (list) .Values.bundles.enabledPackages) }}

View File

@@ -34,6 +34,10 @@ networking:
# Set this to comma-separated list of master node IPs to override.
kubeovn:
MASTER_NODES: ""
# Gateway configuration
gateway:
ingress: true
gatewayAPI: false
# Service publishing and ingress configuration
publishing:
host: "example.org"

View File

@@ -0,0 +1,3 @@
cert-manager:
config:
enableGatewayAPI: true

View File

@@ -6,4 +6,4 @@ include ../../../hack/package.mk
update:
rm -rf templates
mkdir templates
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.2.0" > templates/crds-experimental.yaml
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.5.0" > templates/crds-experimental.yaml