Skip to content

Commit ddbc230

Browse files
authored
Merge pull request #17380 from hakman/automated-cherry-pick-of-#17358-upstream-release-1.32
Automated cherry pick of #17358: Add support for Gateway API within Cilium
2 parents 582252a + e78d0ed commit ddbc230

File tree

20 files changed

+444
-3
lines changed

20 files changed

+444
-3
lines changed

docs/networking/cilium.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,32 @@ EOF
249249

250250
Note that you can create an ingress resource for Hubble UI by configuring the `hubble.ui.ingress` stanza. See [Cilium Helm chart documentation](https://artifacthub.io/packages/helm/cilium/cilium/1.11.1) for more information.
251251

252+
## Gateway API Support
253+
254+
{{ kops_feature_table(kops_added_default='1.32') }}
255+
256+
Cilium supports the Kubernetes Gateway API, which provides a more expressive and extensible way to configure ingress traffic. To enable Gateway API support in Cilium, you need to:
257+
258+
1. Enable the cluster-wide Gateway API feature in your cluster spec
259+
2. Enable Cilium's Gateway API support
260+
261+
Here's how to configure it:
262+
263+
```yaml
264+
spec:
265+
networking:
266+
cilium:
267+
gatewayAPI:
268+
enabled: true
269+
```
270+
271+
Note that enabling Cilium's Gateway API support requires having the Gateway API custom resources definitions (CRDs) deployed manually or through a custom addon first. The current version of Cilium requires the experimental channel. To install it manually, simply run:
272+
```bash
273+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.3.0/experimental-install.yaml
274+
```
275+
276+
For more information about using the Gateway API with Cilium, see the [Cilium Gateway API documentation](https://docs.cilium.io/en/stable/network/servicemesh/gateway-api/).
277+
252278
## Getting help
253279

254280
For problems with deploying Cilium please post an issue to Github:

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5496,6 +5496,20 @@ spec:
54965496
The cluster is operated by cilium-etcd-operator.
54975497
Default: false
54985498
type: boolean
5499+
gatewayAPI:
5500+
description: GatewayAPI specifies the configuration for Cilium
5501+
Gateway API settings.
5502+
properties:
5503+
enableSecretsSync:
5504+
description: |-
5505+
EnableSecretsSync specifies whether synchronization of secrets is enabled.
5506+
Default: true
5507+
type: boolean
5508+
enabled:
5509+
description: Enabled specifies whether Cilium Gateway
5510+
API is enabled.
5511+
type: boolean
5512+
type: object
54995513
hubble:
55005514
description: Hubble configures the Hubble service on the Cilium
55015515
agent.

pkg/apis/kops/networking.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ type CiliumNetworkingSpec struct {
525525

526526
// Ingress specifies the configuration for Cilium Ingress settings.
527527
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
528+
529+
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
530+
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
528531
}
529532

530533
// CiliumIngressSpec configures Cilium Ingress settings.
@@ -554,6 +557,16 @@ type CiliumIngressSpec struct {
554557
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
555558
}
556559

560+
// CiliumGatewayAPISpec configures Cilium Gateway API settings.
561+
type CiliumGatewayAPISpec struct {
562+
// Enabled specifies whether Cilium Gateway API is enabled.
563+
Enabled *bool `json:"enabled,omitempty"`
564+
565+
// EnableSecretsSync specifies whether synchronization of secrets is enabled.
566+
// Default: true
567+
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`
568+
}
569+
557570
// HubbleSpec configures the Hubble service on the Cilium agent.
558571
type HubbleSpec struct {
559572
// Enabled decides if Hubble is enabled on the agent or not

pkg/apis/kops/v1alpha2/networking.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,9 @@ type CiliumNetworkingSpec struct {
642642

643643
// Ingress specifies the configuration for Cilium Ingress settings.
644644
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
645+
646+
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
647+
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
645648
}
646649

647650
// CiliumIngressSpec configures Cilium Ingress settings.
@@ -671,6 +674,16 @@ type CiliumIngressSpec struct {
671674
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
672675
}
673676

677+
// CiliumGatewayAPISpec configures Cilium Gateway API settings.
678+
type CiliumGatewayAPISpec struct {
679+
// Enabled specifies whether Cilium Gateway API is enabled.
680+
Enabled *bool `json:"enabled,omitempty"`
681+
682+
// EnableSecretsSync specifies whether synchronization of secrets is enabled.
683+
// Default: true
684+
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`
685+
}
686+
674687
// HubbleSpec configures the Hubble service on the Cilium agent.
675688
type HubbleSpec struct {
676689
// Enabled decides if Hubble is enabled on the agent or not

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/networking.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,9 @@ type CiliumNetworkingSpec struct {
473473

474474
// Ingress specifies the configuration for Cilium Ingress settings.
475475
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
476+
477+
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
478+
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
476479
}
477480

478481
// CiliumIngressSpec configures Cilium Ingress settings.
@@ -502,6 +505,16 @@ type CiliumIngressSpec struct {
502505
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
503506
}
504507

508+
// CiliumGatewayAPISpec configures Cilium Gateway API settings.
509+
type CiliumGatewayAPISpec struct {
510+
// Enabled specifies whether Cilium Gateway API is enabled.
511+
Enabled *bool `json:"enabled,omitempty"`
512+
513+
// EnableSecretsSync specifies whether synchronization of secrets is enabled.
514+
// Default: true
515+
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`
516+
}
517+
505518
// HubbleSpec configures the Hubble service on the Cilium agent.
506519
type HubbleSpec struct {
507520
// Enabled decides if Hubble is enabled on the agent or not

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)