video-iac/README.md

73 lines
2.3 KiB
Markdown
Raw Normal View History

2021-06-15 16:21:49 +00:00
# README #
2025-12-12 21:34:10 +00:00
2021-06-15 16:21:49 +00:00
This README would normally document whatever steps are necessary to get your application up and running.
### What is this repository for? ###
* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
### Development Setup
1. **Install Pre-commit Hooks** (Required for CRD management):
```bash
./scripts/setup-hooks.sh
```
This ensures that `k8s/crds/all-crds.yaml` is automatically updated whenever you modify the monitoring Helm chart.
2025-12-13 14:49:51 +00:00
### Monitoring Chart Patch (Critical)
The included chart `k8s/monitoring/charts/kube-prometheus-stack-75.12.0.tgz` is **MANUALLY PATCHED**.
**Why?**
The upstream chart (v65.x+) introduced a field `trackTimestampsStaleness` in the `ServiceMonitor` CRD. Our cluster is running an older version of the Prometheus Operator/CRDs that does not support this field. The upstream chart renders this field unconditionally in some templates (specifically `kubelet`), causing ArgoCD sync to fail with a schema validation error ("field not declared in schema").
**How was it patched?**
1. Unpacked the official `kube-prometheus-stack-75.12.0.tgz`.
2. Modified `templates/exporters/kubelet/servicemonitor.yaml`.
3. Wrapped `trackTimestampsStaleness` in a conditional block:
```yaml
{{- if .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
{{- end }}
```
4. Repackaged the chart using `tar -czf`.
5. Force added to git (`git add -f`) because `charts/*.tgz` is ignored.
**When to delete?**
You can revert to the official upstream chart once the Prometheus Operator CRDs on the cluster are upgraded to a version that includes `trackTimestampsStaleness` in the `ServiceMonitor` schema (likely Prometheus Operator >= v0.68.0 or similar).
2021-06-15 16:21:49 +00:00
### How do I get set up? ###
* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions
### Contribution guidelines ###
* Writing tests
* Code review
* Other guidelines
### Who do I talk to? ###
* Repo owner or admin
2021-10-28 18:15:01 +00:00
* Other community or team contact
2021-10-31 12:36:53 +00:00
# Apply terraform
2021-10-28 18:15:01 +00:00
# Install ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
2021-10-31 12:36:53 +00:00
# Add Bitbucket SSH Key secret