video-iac/k8s/README.md

38 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2025-12-06 23:42:59 +00:00
# Kubernetes Configuration
This directory contains Kubernetes manifests and configuration for the video infrastructure.
## Managing CRDs
The file `all-crds.yaml` contains all Custom Resource Definitions (CRDs) required by the monitoring stack (Prometheus Operator).
### When to update CRDs
You should regenerate `all-crds.yaml` by running `scripts/update-crds.sh` when:
1. **Upgrading the `kube-prometheus-stack` Helm chart**: If you bump the chart version in `k8s/monitoring/Chart.yaml` and update the dependencies, you must also update the CRDs to match the new version.
2. **Missing CRD fields**: If you encounter errors like `field not declared in schema` during ArgoCD syncs, it likely means the installed CRDs are outdated.
2025-12-07 21:37:46 +00:00
3. **Apply the CRDs**:
Since Helm does not manage CRD upgrades, you must apply the updated CRDs manually. You may need `--force-conflicts` if ArgoCD previously managed these resources:
```bash
kubectl apply --server-side --force-conflicts -f k8s/all-crds.yaml
```
4. **Commit and Push**:
Commit the updated `k8s/all-crds.yaml` to the repository.
```bash
git add k8s/all-crds.yaml
git commit -m "Update Prometheus CRDs"
git push
```
2025-12-06 23:42:59 +00:00
### How to update
Run the update script from the repository root:
```bash
./scripts/update-crds.sh
```
This script extracts the CRDs from the local `kube-prometheus-stack` chart package and concatenates them into `k8s/all-crds.yaml`.