6.2. The GitOps methodology and practice
GitOps is a set of practices that use Git pull requests to manage infrastructure and application configurations. The Git repository in GitOps is the only source of truth for system and application configuration. The repository contains the entire state of the system so that the trail of changes to the system state are visible and auditable. GitOps enables you to implement a DevOps methodology.
You can use GitOps tooling to create repeatable and predictable processes for managing and recreating OpenShift Container Platform clusters and applications. By using GitOps, you can address the issues of infrastructure and application configuration sprawl. It simplifies the propagation of infrastructure and application configuration changes across multiple clusters by defining your infrastructure and applications definitions as “code.” Implementing GitOps for your cluster configuration files can make automated installation easier and allow you to configure automated cluster customizations. You can apply the core principles of developing and maintaining software in a Git repository to the creation and management of your cluster and application configuration files.
By using OpenShift Container Platform to automate both your cluster configuration and container development process, you can pick and choose where and when to adopt GitOps practices. Using a CI pipeline that pairs with your GitOps strategy and execution plan is ideal. OpenShift Container Platform provides the flexibility to choose when and how you integrate this methodology into your business practices and pipelines.
With GitOps integration, you can declaratively configure and store your OpenShift Container Platform cluster configuration
GitOps works well with OpenShift Container Platform because you can both declaratively configure clusters and store the state of the cluster configuration in Git. For more information, see Available cluster customizations.
6.2.1. GitOps for single-cluster and multi-cluster administration
Whether you need one or more independent or cooperative OpenShift Container Platform clusters, you can use a GitOps strategy to manage the following tasks:
- Ensure that the clusters have similar states for configuration, monitoring, or storage.
- Recover or recreate clusters from a known state.
- Create clusters with a known state.
- Apply or revert configuration changes to multiple OpenShift Container Platform clusters.
- Associate templated configuration with different environments.
6.2.2. GitOps for application configuration management
You can also use GitOps practices to manage application configuration. This practice ensures consistency in applications when you deploy them to different clusters in different environments, like development, stage, and production. Managing application configuration with GitOps is also beneficial when you must deploy applications across multiple clusters, whether on-cloud or on-premise, for availability and scalability purposes.
You can use a GitOps strategy to:
- Promote applications across clusters, from stage to production.
- Apply or revert application changes to multiple OpenShift Container Platform clusters.
6.2.3. GitOps technology providers and integrators
There are several community offerings and third-party vendors that provide a high level of integration with OpenShift Container Platform.
You can integrate GitOps into OpenShift Container Platform with the following community partners and third-party integrators: