Argo CD implementation

Within HeartAI OpenShift instances, the OpenShift GitOps Operator provides declarative approaches for GitOps lifecycle management and continuous delivery. A core component of this process is the management of cluster resources with an integrated Argo CD instance. The Argo CD framework defines a Kubernetes Application custom resource that provides functionality to synchronise with GitHub hosted source repositories. Through these Application resources, Argo CD monitors for updates to the HeartAI GitHub repository, and synchronisation is triggered when modifications are made to the master branch. Triggered behaviour includes applying the cluster resource declaration files to the HeartAI OpenShift instance, which coordinates the deployment of OpenShift resources to the cluster environment. These approaches allow the deployment of platform resources to occur through the GitHub managed review and deployment processes, and provide a supportive framework to optimise developer and contributor productivity and experience.

Red Hat OpenShift implementation

HeartAI orchestrates system services with the Kubernetes-based Red Hat OpenShift container platform. Further information about the HeartAI implementation of Red Hat OpenShift may be found with the following documentation:

Argo CD OpenShift resources

Example: Argo CD Application resource

The following OpenShift declaration shows the Argo CD Application resource for the HeartAI HelloWorldService production environment. Within the corresponding directory path at src/services/hello-world/deploy/openshift/prod/ there are a collection of OpenShift declaration files for specifying the HelloWorldService deployment to OpenShift. Argo CD synchronises the declared state of this directory with that of the OpenShift cluster, and applies any relevant operations to ensure the alignment of these states.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: heartai-hello-world-prod
  namespace: openshift-gitops
spec:
  destination:
    namespace: heartai-hello-world-prod
    server: "https://kubernetes.default.svc"
  project: default
  source:
    directory:
      recurse: true
    path: "src/services/hello-world/deploy/openshift/prod/yaml/"
    repoURL: "https://github.com/Lukah0173/HeartAI.git"
    targetRevision: "master"
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

Argo CD GitOps process

The following diagram describes the process of Argo CD monitoring the corresponding GitHub repository for state changes to the master branch, and applying any changes to state to the corresponding OpenShift environment:

heartai-argocd-gitops-process.svg

Argo CD UI applications overview

The following image shows the Argo CD web interface for Application resources. The Application web interface provides:

  • An overview of Application resources that are managed by Argo CD.
  • Information about Application resources, including:
    • The associated project that manages the Application resource.
    • Labels that have been applied to the Application.
    • Health and synchronisation status.
    • The corresponding GitHub repository path.
    • The target branch of the repository.
    • The Application deployment destination.
    • The associated Application namespace.

heartai-argocd-applications-tiles.png

Argo CD UI applications overview with rows view

The following example shows the Argo CD web interface for Argo CD Application resources with a rows view. The Application web interface provides:

  • An overview of Application resources that are managed by Argo CD.
  • Information about Application resources, including:
  • The associated project that manages the Application resource.
  • Labels that have been applied to the Application.
  • Health and synchronisation status.
  • The corresponding GitHub repository path.
  • The target branch of the repository.
  • The Application deployment destination.
  • The associated Application namespace.

heartai-argocd-applications-rows.png

Argo CD UI application resources tree

The following image shows the Argo CD web interface for the resources of the heartai-acs Application with a tree view. This representation displays the management association between these resources. The Application tree view provides:

  • Information about the Application, including:
    • The health of the Application.
    • Details about current and previous synchronisation states.
  • An overview of the resources that are managed by the Application.
  • The hierarchical management structure between these resources.
  • Information about Application resources, including:
    • The resource name and icon.
    • Resource-level health and synchronisation status.

heartai-argocd-application-tree.png

Argo CD UI application resources list

The following example shows the Argo CD user interface for the Argo CD Application resources of the heartai-acs namespace with a list view. This displays application resources for the HeartAI Red Hat Advanced Cluster Security production environment.

heartai-argocd-application-list.png

Argo CD UI application pods

The following example shows the Argo CD user interface for the application pods of the heartai-acs namespace. This displays application pod resource deployments for the HeartAI Red Hat Advanced Cluster Security production environment.

heartai-argocd-application-pods.png

Argo CD UI application networking

The following example shows the Argo CD user interface for the application networking of the heartai-acs namespace. This displays application networking for the HeartAI Red Hat Advanced Cluster Security production environment.

heartai-argocd-application-network.png