Example of deploying openshift-gitops via a policy along with a Argo CD App of Apps cluster configuration. The Argo CD App of App leverages my cluster-config repository to configure a AWS remote cluster.
When I use this repo the following steps are required:
- Create namespace
open-cluster-management-policiesandopenshift-gitopson ACM Hub Cluster - Add gitops-operator and sealed-secrets-seed policies to ACM. The sealed-secrets-seed policy deploys the
sealed-secretsnamespace along with a default private key for decrypting secrets. - Import a new AWS cluster into ACM and set labels
cluster=aws.clusterandgitops=truekustomize build components/policies/gitops-operator/base | oc apply -f -
- Policy will automatically deploy artifacts, wait for it to finish
- Deploy the cluster-config subscription:
kustomize build clusters/aws.cluster/acm/overlays/subscription | oc apply -f -
Thanks to Andrew Block for the original version of the policy at https://github.com/sabre1041/rhacm-argocd/tree/main/rhacm-managed-argocd/argocd-cluster/policies