mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Merge pull request #12441 from tico88612/feat/crds-installation
Feat: add common_crds role and Prometheus Operator CRDs installation
This commit is contained in:
@@ -52,11 +52,7 @@
|
|||||||
- { role: kubernetes/kubeadm, tags: kubeadm}
|
- { role: kubernetes/kubeadm, tags: kubeadm}
|
||||||
- { role: kubernetes/node-label, tags: node-label }
|
- { role: kubernetes/node-label, tags: node-label }
|
||||||
- { role: kubernetes/node-taint, tags: node-taint }
|
- { role: kubernetes/node-taint, tags: node-taint }
|
||||||
- role: kubernetes-apps/gateway_api
|
- { role: kubernetes-apps/common_crds }
|
||||||
when: gateway_api_enabled
|
|
||||||
tags: gateway_api
|
|
||||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
|
||||||
run_once: true
|
|
||||||
- { role: network_plugin, tags: network }
|
- { role: network_plugin, tags: network }
|
||||||
|
|
||||||
- name: Install Calico Route Reflector
|
- name: Install Calico Route Reflector
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Gateway API | Download YAML
|
- name: Gateway API | Download YAML
|
||||||
include_tasks: "../../../download/tasks/download_file.yml"
|
include_tasks: "../../../../download/tasks/download_file.yml"
|
||||||
vars:
|
vars:
|
||||||
download: "{{ download_defaults | combine(downloads.gateway_api_crds) }}"
|
download: "{{ download_defaults | combine(downloads.gateway_api_crds) }}"
|
||||||
|
|
||||||
11
roles/kubernetes-apps/common_crds/meta/main.yml
Normal file
11
roles/kubernetes-apps/common_crds/meta/main.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: kubernetes-apps/common_crds/gateway_api
|
||||||
|
when: gateway_api_enabled
|
||||||
|
tags:
|
||||||
|
- gateway_api
|
||||||
|
|
||||||
|
- role: kubernetes-apps/common_crds/prometheus_operator_crds
|
||||||
|
when: prometheus_operator_crds_enabled
|
||||||
|
tags:
|
||||||
|
- prometheus_operator_crds
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
- name: Prometheus Operator CRDs | Download YAML
|
||||||
|
include_tasks: "../../../../download/tasks/download_file.yml"
|
||||||
|
vars:
|
||||||
|
download: "{{ download_defaults | combine(downloads.prometheus_operator_crds) }}"
|
||||||
|
|
||||||
|
- name: Prometheus Operator CRDs | Install
|
||||||
|
command:
|
||||||
|
cmd: "{{ bin_dir }}/kubectl apply -f {{ local_release_dir }}/prometheus-operator-crds.yaml"
|
||||||
|
when:
|
||||||
|
- "inventory_hostname == groups['kube_control_plane'][0]"
|
||||||
@@ -143,6 +143,8 @@ yq_version: "{{ (yq_checksums['amd64'] | dict2items)[0].key }}"
|
|||||||
gateway_api_version: "1.2.1"
|
gateway_api_version: "1.2.1"
|
||||||
gateway_api_channel: "standard"
|
gateway_api_channel: "standard"
|
||||||
|
|
||||||
|
prometheus_operator_crds_version: "{{ (prometheus_operator_crds_checksums.no_arch | dict2items)[0].key }}"
|
||||||
|
|
||||||
github_url: https://github.com
|
github_url: https://github.com
|
||||||
dl_k8s_io_url: https://dl.k8s.io
|
dl_k8s_io_url: https://dl.k8s.io
|
||||||
storage_googleapis_url: https://storage.googleapis.com
|
storage_googleapis_url: https://storage.googleapis.com
|
||||||
@@ -174,6 +176,7 @@ skopeo_download_url: "{{ github_url }}/lework/skopeo-binary/releases/download/v{
|
|||||||
yq_download_url: "{{ github_url }}/mikefarah/yq/releases/download/v{{ yq_version }}/yq_linux_{{ image_arch }}"
|
yq_download_url: "{{ github_url }}/mikefarah/yq/releases/download/v{{ yq_version }}/yq_linux_{{ image_arch }}"
|
||||||
argocd_install_url: "https://raw.githubusercontent.com/argoproj/argo-cd/v{{ argocd_version }}/manifests/install.yaml"
|
argocd_install_url: "https://raw.githubusercontent.com/argoproj/argo-cd/v{{ argocd_version }}/manifests/install.yaml"
|
||||||
gateway_api_crds_download_url: "{{ github_url }}/kubernetes-sigs/gateway-api/releases/download/v{{ gateway_api_version }}/{{ gateway_api_channel }}-install.yaml"
|
gateway_api_crds_download_url: "{{ github_url }}/kubernetes-sigs/gateway-api/releases/download/v{{ gateway_api_version }}/{{ gateway_api_channel }}-install.yaml"
|
||||||
|
prometheus_operator_crds_download_url: "{{ github_url }}/prometheus-operator/prometheus-operator/releases/download/v{{ prometheus_operator_crds_version }}/stripped-down-crds.yaml"
|
||||||
|
|
||||||
etcd_binary_checksum: "{{ etcd_binary_checksums[image_arch][etcd_version] }}"
|
etcd_binary_checksum: "{{ etcd_binary_checksums[image_arch][etcd_version] }}"
|
||||||
cni_binary_checksum: "{{ cni_binary_checksums[image_arch][cni_version] }}"
|
cni_binary_checksum: "{{ cni_binary_checksums[image_arch][cni_version] }}"
|
||||||
@@ -975,6 +978,18 @@ downloads:
|
|||||||
groups:
|
groups:
|
||||||
- kube_control_plane
|
- kube_control_plane
|
||||||
|
|
||||||
|
prometheus_operator_crds:
|
||||||
|
enabled: "{{ prometheus_operator_crds_enabled }}"
|
||||||
|
file: true
|
||||||
|
version: "{{ prometheus_operator_crds_version }}"
|
||||||
|
dest: "{{ local_release_dir }}/prometheus-operator-crds.yaml"
|
||||||
|
checksum: "{{ prometheus_operator_crds_checksums.no_arch[prometheus_operator_crds_version] }}"
|
||||||
|
url: "{{ prometheus_operator_crds_download_url }}"
|
||||||
|
owner: "root"
|
||||||
|
mode: "0755"
|
||||||
|
groups:
|
||||||
|
- kube_control_plane
|
||||||
|
|
||||||
csi_attacher:
|
csi_attacher:
|
||||||
enabled: "{{ cinder_csi_enabled or aws_ebs_csi_enabled }}"
|
enabled: "{{ cinder_csi_enabled or aws_ebs_csi_enabled }}"
|
||||||
container: true
|
container: true
|
||||||
|
|||||||
@@ -463,6 +463,7 @@ metallb_enabled: false
|
|||||||
metallb_speaker_enabled: "{{ metallb_enabled }}"
|
metallb_speaker_enabled: "{{ metallb_enabled }}"
|
||||||
argocd_enabled: false
|
argocd_enabled: false
|
||||||
gateway_api_enabled: false
|
gateway_api_enabled: false
|
||||||
|
prometheus_operator_crds_enabled: false
|
||||||
|
|
||||||
## When OpenStack is used, Cinder version can be explicitly specified if autodetection fails (Fixed in 1.9: https://github.com/kubernetes/kubernetes/issues/50461)
|
## When OpenStack is used, Cinder version can be explicitly specified if autodetection fails (Fixed in 1.9: https://github.com/kubernetes/kubernetes/issues/50461)
|
||||||
# openstack_blockstorage_version: "v1/v2/auto (default)"
|
# openstack_blockstorage_version: "v1/v2/auto (default)"
|
||||||
|
|||||||
@@ -1528,6 +1528,9 @@ gateway_api_experimental_crds_checksums:
|
|||||||
1.2.0: sha256:4369188e63b9ab5a35b5a83032c94d871159dece086b908b6ea18ea321ca06a9
|
1.2.0: sha256:4369188e63b9ab5a35b5a83032c94d871159dece086b908b6ea18ea321ca06a9
|
||||||
1.1.0: sha256:10f322744a005d4e73e2b067e95fecd4cfec619dc7564930b488c296bfa3bec1
|
1.1.0: sha256:10f322744a005d4e73e2b067e95fecd4cfec619dc7564930b488c296bfa3bec1
|
||||||
1.0.0: sha256:6c601dced7872a940d76fa667ae126ba718cb4c6db970d0bab49128ecc1192a3
|
1.0.0: sha256:6c601dced7872a940d76fa667ae126ba718cb4c6db970d0bab49128ecc1192a3
|
||||||
|
prometheus_operator_crds_checksums:
|
||||||
|
no_arch:
|
||||||
|
0.84.0: sha256:8990f6837ccff4461df9abe19d31d532fef11386d85d861b392249fff2502255
|
||||||
argocd_install_checksums:
|
argocd_install_checksums:
|
||||||
no_arch:
|
no_arch:
|
||||||
2.14.15: sha256:0368b8a0adbb673408f2cc2367302ad1068d12cd9ab17cf6680bcb5fdba7c381
|
2.14.15: sha256:0368b8a0adbb673408f2cc2367302ad1068d12cd9ab17cf6680bcb5fdba7c381
|
||||||
|
|||||||
@@ -6,3 +6,5 @@ cloud_image: debian-13
|
|||||||
kube_network_plugin: cilium
|
kube_network_plugin: cilium
|
||||||
|
|
||||||
kube_owner: root
|
kube_owner: root
|
||||||
|
|
||||||
|
prometheus_operator_crds_enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user