Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 3.37 KB

File metadata and controls

45 lines (29 loc) · 3.37 KB

Installing the Runtime Component Operator using kustomize with Argo CD

This directory contains configuration files that helps installing the Runtime Component operator using kustomize with Argo CD. These configurations are useful when using Red Hat® OpenShift® GitOps Operator to manage Argo CD Applications within a Red Hat® OpenShift® Container Platform cluster.

Red Hat® OpenShift® GitOps is based on the open source project Argo CD and provides a similar set of features to what the upstream offers, with additional automation and integration into Red Hat® OpenShift® Container Platform. Hence, these configurations are also transferable when using Argo CD Operator standalone within a Kubernetes cluster.

Installation

  1. Install Red Hat® OpenShift® GitOps Operator from OpenShift® UI into the openshift-gitops-operator namespace.

  2. Grant cluster-admin permissions for the GitOps operator to be able to create Custom Resource Definitions for Runtime Component operator.

    oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller -n openshift-gitops
  3. Follow the steps below for one of the three install modes:

  4. You can choose to modify the default namespace(s) by updating .spec.source.kustomize.namespace and .spec.destination.namespace in the Application custom resource(s).

  5. (Optional) Ignore runtime artifacts generated by Runtime Component operator such as the runtime-component-operator ConfigMap by editing the Application custom resource.

Installing and watching own namespace

kustomize-rco-own-namespace.yaml

This Argo CD Application installs the operator into the 'runtime-component' namespace, and the operator watches for Runtime Component custom resource instances only in its own namespace. To install, run: kubectl apply -f kustomize-rco-own-namespace.yaml and to uninstall, run: kubectl delete -f kustomize-rco-own-namespace.yaml

Installing and watching another namespace

kustomize-rco-another-namespace.yaml

These Argo CD Applications install the operator into the namespace 'rco-ns', but configures it to watch for Runtime Component custom resource instances in a different namespace called 'rco-watched-ns'. To install, run: kubectl apply -f kustomize-rco-another-namespace.yaml

Installing and watching all namespaces

kustomize-rco-all-namespaces.yaml

This Argo CD Application installs the operator into the 'runtime-component' namespace, but configures it to watch for Runtime Component custom resource instances in any namespaces. Compared to the OwnNamespace configuration, this Application requires additional ClusterRoles and ClusterRoleBindings. To install, run: kubectl apply -f kustomize-rco-all-namespaces.yaml