1.8 KiB
1.8 KiB
Prometheus Operator CRDs
This directory contains the CustomResourceDefinitions (CRDs) for the Prometheus Operator.
Why Separate CRDs?
These CRDs are managed separately from the main kube-prometheus-stack Helm chart to avoid:
- Large Annotation Error: Helm stores the full manifest in annotations, which can exceed Kubernetes' 262144-byte limit for CRDs
- CRD Installation Race Conditions: Ensures CRDs are installed before any resources that depend on them
Deployment Method
These CRDs are manually deployed using kubectl server-side apply:
kubectl apply --server-side=true --force-conflicts -f manifests/prometheus-operator-crds/
Note: Server-side apply is required to bypass the annotation size limit that affects large CRDs.
CRDs Included
crd-alertmanagerconfigs.yaml- AlertmanagerConfig resourcescrd-alertmanagers.yaml- Alertmanager resourcescrd-podmonitors.yaml- PodMonitor resourcescrd-probes.yaml- Probe resourcescrd-prometheusagents.yaml- PrometheusAgent resourcescrd-prometheuses.yaml- Prometheus resourcescrd-prometheusrules.yaml- PrometheusRule resourcescrd-scrapeconfigs.yaml- ScrapeConfig resourcescrd-servicemonitors.yaml- ServiceMonitor resourcescrd-thanosrulers.yaml- ThanosRuler resources
Updating CRDs
When updating the kube-prometheus-stack chart version:
- Copy the new CRDs from
charts/kube-prometheus-stack/charts/crds/crds/to this directory - Reapply them:
kubectl apply --server-side=true --force-conflicts -f manifests/prometheus-operator-crds/ - Then update the main stack via ArgoCD
Related Configuration
- Main stack values:
manifests/kube-prometheus-stack/values.yamlhascrds.enabled: false - Main ArgoCD app:
argocd-apps/kube-prometheus-stack.yaml