5. GitOps principles
• The entire system is described by using a declarative
approach. The desired state of the system is versioned
in a Git repository
• The changes need to be approved, and they are
automatically applied to the system
• Services will guarantee the application of the desired
state and alert in case of divergence
6. GitOps in practice
• Git is the single source of truth, any change in git will
trigger all the operations
• Both the application and the infrastructure are stored in
the Git repository. Using tools such as kubectl to apply
a configuration is not suggested (Self-documenting
Deployments)
• Once prepared the workflow, the entire process is
guided by pull requests, and it is fully automated
7. GitOps in a sentence
Only what can be described and observed
can be automated and controlled
8. GitOps & DevOps
• GitOps is mainly based on DevOps
• Why now?
– Until today, there were only a few frameworks able to create an
infrastructure in a declarative way to be stored in Git
– Git is the best tool to store an infrastructure thanks to auditing,
comments and review feature
22. A GitOps repository
• 1 repository per application, 1 repository for environment
configuration
• Branches are mapped to environments
• Changes are related to both application code and
infrastructure
• Rollback using revert
• Use of protected branches to force the pull request