Red Hat OpenShift GitOps

OpenShift GitOps leverages Argo CD to manage and deploy applications using a Git-based approach, enabling auditable, versioned, and repeatable deployments.

Argo CD continuously monitors our Git repository for changes and ensures the deployed state matches the declared desired state defined in Kubernetes manifests. This allows for scalable, resilient, and declarative application management, with a clear separation of duties between developers and operators.

In the previous section, Tekton handled the CI cycle, building the application image and leaving the platform ready for CD.

In this section, we use the quarkus-petclinic-config repository, which contains configuration files for deploying the application with the previously built image across environments.

  • Open the quarkus-petclinic-config repository, branch cnd, and inspect environments/dev/kustomization.yaml. The latest commit updates the image digest (00d58…​), corresponding to the image built in CI.

gitops 1
  • Open the Argo CD dashboard to see the synchronized applications.

gitops 2
  • Click dev-quarkus-petclinic.

  • At the top, verify it shows Synchronized To cnd (xxx), where xxx is the commit hash from the Git repository, matching the previous step.

gitops 3
  • Click the pod component quarkus-petclinic-xxxx.

  • In the SUMMARY under IMAGES, verify the deployed image has the updated sha.

gitops 4
  • In the OpenShift console, check the pod and route are deployed with the new image in the demo-dev project.

gitops 5

Once tests pass in the development environment, we can promote the image to the stage environment. The CI pipeline creates a Pull Request in the cnd branch of quarkus-petclinic-config updating the image sha in environments/stage/kustomization.yaml.

  • Open the environments/stage/kustomization.yaml file in the repository; a PR is pending.

gitops 6
  • Open the PR.

gitops 7
  • Merge the PR.

gitops 8

After merging, Argo CD updates the platform state and deploys the new image in the demo-stage project.

  • In the Argo CD dashboard, select the stage-quarkus-petclinic application.

gitops 9
  • Verify the synchronized hash matches the Git repository.

gitops 10
  • Confirm the deployed pod uses the desired image sha.

gitops 11
  • In the OpenShift console, check the new pod is running with the updated image.

gitops 12