Add gateway API Support

This commit is contained in:
Michael McCulloch 2024-01-14 15:38:11 -07:00
parent 3b8e19045a
commit 3cf060049c
2 changed files with 36 additions and 2 deletions

View File

@ -169,14 +169,31 @@ Flannel manifest file to apply to the Kubernetes cluster to enable networking. Y
kubernetes_calico_manifest_file: https://projectcalico.docs.tigera.io/manifests/calico.yaml
```
Cilium Helm chart values can be specified under `kubernetes_cilium_values`. [Kube Proxy Replacement](https://docs.cilium.io/en/latest/network/kubernetes/kubeproxy-free/) is supported through this method.
Calico manifest file to apply to the Kubernetes cluster (if using Calico instead of Flannel).
#### Cilium
```yaml
kubernetes_cilium_hubble_client: true
kubernetes_cilium_values:
kubeProxyReplacement: true
gatewayAPI:
enabled: true
```
Calico manifest file to apply to the Kubernetes cluster (if using Calico instead of Flannel).
Cilium Helm chart values can be specified under `kubernetes_cilium_values`.
##### Kube Proxy Replacement
[Kube Proxy Replacement](https://docs.cilium.io/en/latest/network/kubernetes/kubeproxy-free/) is supported through this method. The is a prerequisite for Gateway API Support.
##### Gateway API Support
[Gateway API Support](https://docs.cilium.io/en/latest/network/servicemesh/gateway-api/gateway-api/#gs-gateway-api). This will install additional CRDs to support GatewayAPI.
##### Hubble Observability
In addition to setting up [Setting up Hubble Observability](https://docs.cilium.io/en/stable/gettingstarted/hubble_setup/#hubble-setup), you may choose to install the hubble client with `kubernetes_cilium_hubble_client: true`
## Dependencies

View File

@ -16,6 +16,12 @@
(kubernetes_cilium_values.kubeProxyReplacement is defined) and
(kubernetes_cilium_values.kubeProxyReplacement) | bool }}"
- name: Determine if we installing Gateway API
set_fact:
install_gateway_api="{{ (replace_kube_proxy) and
(kubernetes_cilium_values.gatewayAPI.enabled is defined) and
(kubernetes_cilium_values.gatewayAPI.enabled)| bool }}"
- name: Initialize Kubernetes control plane with kubeadm init
command: >
kubeadm init
@ -102,6 +108,17 @@
retries: 12
delay: 5
- name: Install Prerequisite CRDs for Cilium Gateway API support.
when: install_gateway_api
command: "kubectl apply -f {{ item }}"
loop:
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/standard/gateway.networking.k8s.io_gateways.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
- name: Configure Cilium networking
command: >
/usr/local/bin/cilium install