An Azure platform for running a service on AKS with Terraform, Argo CD, CI, observability and incident handling.
View the Project on GitHub Franklindot04/production-platform-Azure
A resource that Argo CD manages is edited by hand with kubectl, and the cluster no longer matches Git. Session 2 experiment 5 does this on purpose. The hypothesis is that Argo CD reverts the edit.
All Applications under gitops/dev/apps/ use automated sync with prune and self-heal: cluster-rules, sample-service and opentelemetry-collector, and the root Application that creates them. Self-heal restores the state in Git when a resource changes. A hand edit is therefore expected to be undone. Session 1 showed that self-heal reverted a manual change to the Ingress.
kubectl get applications -n argocd (planned, not run). It shows the sync and health state of each Application. OutOfSync that does not clear points to a revert that did not happen.kubectl describe application sample-service -n argocd (planned, not run). The status and the events show the last sync, its result and any error.kubectl get application sample-service -n argocd -o jsonpath='{.status.sync.status}{"\n"}{.status.health.status}{"\n"}' (planned, not run). It shows the two states only.kubectl get pods -n argocd (planned, not run). It shows whether the Argo CD components are running.kubectl get application sample-service -n argocd -o jsonpath='{.spec.syncPolicy}{"\n"}' (planned, not run). It shows whether automated sync is still set.kubectl -n argocd port-forward svc/argocd-server 8080:443 and read the credential with ./infrastructure/session.sh argocd-password (planned, not run). The credential is printed to the terminal only.The edit was not reverted because:
/spec/source/helm/parameters of the Applications it creates and respects that setting, so the parameters set by session.sh bootstrap identity stay (gitops/dev/root-application.yaml, ADR 0029). An edit to those parameters is not reverted.OutOfSync.apps stays.main was synced in up to about 3 minutes in Session 1.kubectl get application sample-service -n argocd -w (planned, not run). It shows the Application go OutOfSync and back to Synced.OutOfSync and does not sync, read the error in kubectl describe application sample-service -n argocd (planned, not run) and fix the cause named there.kubectl annotate application sample-service -n argocd argocd.argoproj.io/refresh=hard --overwrite (planned, not run). It tells Argo CD to compare again.Unsure: the refresh annotation in step 3. It is the documented Argo CD way to ask for a refresh. It is not used anywhere in this repository.
kubectl get applications -n argocd (planned, not run). Every Application is Synced and Healthy.kubectl get deploy sample-service -n apps -o jsonpath='{.spec.replicas}{"\n"}' (planned, not run). It shows the value from Git (2).If the edit was meant to stay for a test, repeat it by hand and expect it to be reverted again. Nothing else to undo.
Session 2 experiment 5, ADR 0017, gitops/README.md, gitops/dev/root-application.yaml.
not exercised