Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Gateway API CRDs install support #11376

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions inventory/sample/group_vars/k8s_cluster/addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ rbd_provisioner_enabled: false
# rbd_provisioner_storage_class: rbd
# rbd_provisioner_reclaim_policy: Delete

# Gateway API CRDs
gateway_api_enabled: false
# gateway_api_experimental_channel: false

# Nginx ingress controller deployment
ingress_nginx_enabled: false
# ingress_nginx_host_network: false
Expand Down
4 changes: 4 additions & 0 deletions roles/kubernetes-apps/gateway_api/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
gateway_api_enabled: false
gateway_api_version: v1.1.0
gateway_api_experimental_channel: false
33 changes: 33 additions & 0 deletions roles/kubernetes-apps/gateway_api/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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]"
Loading