Feat: Gateway API CRDs install support (#11376)

* Feat: add Gateway API CRDs installation

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>

* Feat: add Gateway API CRDs variable in inventory

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>

---------

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
pull/11499/head
ChengHao Yang 2024-08-31 15:24:45 +08:00 committed by GitHub
parent db0138b2f9
commit 8a961a60c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 31843 additions and 0 deletions

View File

@ -96,6 +96,10 @@ rbd_provisioner_enabled: false
# rbd_provisioner_storage_class: rbd # rbd_provisioner_storage_class: rbd
# rbd_provisioner_reclaim_policy: Delete # rbd_provisioner_reclaim_policy: Delete
# Gateway API CRDs
gateway_api_enabled: false
# gateway_api_experimental_channel: false
# Nginx ingress controller deployment # Nginx ingress controller deployment
ingress_nginx_enabled: false ingress_nginx_enabled: false
# ingress_nginx_host_network: false # ingress_nginx_host_network: false

View File

@ -0,0 +1,4 @@
---
gateway_api_enabled: false
gateway_api_version: v1.1.0
gateway_api_experimental_channel: false

View File

@ -0,0 +1,33 @@
---
- name: Gateway API | Create addon dir
file:
path: "{{ kube_config_dir }}/addons/gateway_api"
state: directory
owner: root
group: root
mode: "0755"
when:
- inventory_hostname == groups['kube_control_plane'][0]
- name: Gateway API | Set channel
set_fact:
gateway_api_channel: "{{ 'experimental' if gateway_api_experimental_channel else 'standard' }}"
when:
- "inventory_hostname == groups['kube_control_plane'][0]"
- name: Gateway API | Copy Gateway API manifests to remote
template:
src: "{{ gateway_api_channel }}-install.yaml.j2"
dest: "{{ kube_config_dir }}/addons/gateway_api/{{ gateway_api_channel }}-install.yaml"
mode: "0644"
when:
- "inventory_hostname == groups['kube_control_plane'][0]"
- name: Gateway API | Install Gateway API
kube:
name: Gateway API
kubectl: "{{ bin_dir }}/kubectl"
filename: "{{ kube_config_dir }}/addons/gateway_api/{{ gateway_api_channel }}-install.yaml"
state: latest
when:
- "inventory_hostname == groups['kube_control_plane'][0]"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -111,6 +111,13 @@ dependencies:
tags: tags:
- oci - oci
- role: kubernetes-apps/gateway_api
when:
- gateway_api_enabled
- inventory_hostname == groups['kube_control_plane'][0]
tags:
- gateway_api
- role: kubernetes-apps/metallb - role: kubernetes-apps/metallb
when: when:
- metallb_enabled - metallb_enabled