Feat: add prometheus_operator_crds in common_crds

The Prometheus Operator CRDs are commonly used for monitoring and are
used by some CNIs (such as Cilium). Kubespray can be installed first,
and the subsequent installation of the operator can be handled by the
user (or later extensions).

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
This commit is contained in:
ChengHao Yang
2025-08-18 21:14:49 +08:00
parent 1e327b4747
commit 9dca520b33
2 changed files with 16 additions and 0 deletions

View File

@@ -4,3 +4,8 @@ dependencies:
when: gateway_api_enabled
tags:
- gateway_api
- role: kubernetes-apps/common_crds/prometheus_operator_crds
when: prometheus_operator_crds_enabled
tags:
- prometheus_operator_crds

View File

@@ -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]"