Manage GitOps
This page is dedicated to the GitOps
section of the Configuration
tab, the process of establishing the GitOps repository, outline benefits it extends to users within the platform capabilities. GitOps, short for "Git Operations", is a modern approach to managing and automating infrastructure and application deployments. In GitOps, the desired state of your environment is declared and stored in a Git repository. With GitOps, you can ensure that your infrastructure and applications are always in sync with your intended configurations and readily adapt to changing requirements.
Overviewβ
The purpose of the GitOps
section is to provide users with the ability to customize the state of their environments with the help of GitOps approach that enables you to store your entire deployment configuration in a Git repository, providing version control for changes, consistent collaboration, and automated deployments. Enforcing GitOps allows you to declaratively define and automate your configurations, ensuring consistency, version control, and collaboration within your team.
Add GitOps Repositoryβ
GitOps repository is added in two steps:
-
Navigate to Configuration -> Deployment-> GitOps and click the + Add GitOps Repository button:
-
Choose one of the Git servers, fill in the required fields and click Save:
-
Check the GitOps repository connected to the platform:
As the result, the
Codebase
ofsystem
type will be added to the Codebase list of the Components section:
The platform allows only one GitOps repository at a time.
GitOps Usageβ
Once the GitOps repository is added to the platform, you can set custom parameters for the deployed Helm Chart. To redefine the parameters, follow the steps below:
-
Within the GitOps repository, follow the naming convention
<pipeline-name>/<stage-name>/<application-name>-values.yaml
to create the chart values file, e.g.mypipe/dev/fastapi-demo-values.yaml
. -
Add the necessary custom values to the
mypipe/dev/fastapi-demo-values.yaml
file, and then commit the file to the default branch of the GitOps repository. -
Navigate to the Environments section. Open the created environment, open its stage and deploy it with the Values override checkbox selected as it is shown below:
Delete GitOps Repositoryβ
In case you need to delete the GitOps repository, do the following:
-
Delete the GitOps repository in the Git provider.
-
Delete the Codebase custom resource using the
kubectl delete
command:kubectl delete Codebase edp-gitops -n edp