# README # 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. ### 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). ### 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 * Other community or team contact # Apply terraform # Install ArgoCD kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml # Add Bitbucket SSH Key secret