Git for Code and Configuration Management

Why Git is the Go-To option for Code, Configuration ? We all know that application code is stored in the github repos and every team is dependent on it as it offers many advantages like - Audit Trail - Using git revert we can roll back changes easily - We can see when each change was made, who made it and what changes they made - Everything is Version Controlled - Life Saviour in team environments - Approvals via Pull Requests It didnt stop with application code but also extended to application configurations like terraform code, K8s manifests, helm charts, ansible playbooks, chef recipes, puppet manifests, pipeline code, custom code etc., All of these things are moving towards Git. Lets say we have a team of 5 people and currently there are 5 replicas running for a deployment, a devops engineer went to k8s cluster and changed the no of replicas from 5 to 3, now suddenly the pods metrics went up as only 3 are serving the traffic to the end users. When we see the no of pods its 3 instead of 5, no body is taking the ownership. How do we find who made the change. Git solves these problem. So all the changes will go via Git, the code can be merged only when Lead approves the Pull Request, so without git the k8s manifests are scattered across engineers laptop. With git everything is put in place. Rollback is also made easy with git commands, we can also see the change history using git log command, git revert command to go back to previous commit, git gives powerful branching strategies so we can do parallel development without touching the current production code ( main branch ). Also one big advantage git offers is single source of truth, if i hear that term the first thing the comes in my mind is GitOps ArgoCD, and its because the argocd checks what is currently present in the git ( desired state ) and compares it with what is being present in the K8s cluster ( current state ). It is similar to how terraform state file compares current state, desired state and make necessary changes, even ArgoCD does the same. ArgoCD is able to do this because of git stores the code and its the desired state. ➕ Follow Sai P. for more insights ♻ Repost to help others 📩 Save for later #github #singlesourceoftruth #rollback #auditing #compliance #ISO #PCIDSS #SOC2 #git #K8s #ansible #applicationcode #configuration #manifests #versioncontrol #rollout

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories