This is based on Red Hat Canada’s Argo CD Setup but also includes cert-manager
and OLM
and has been tweaked to work on generic k8s clusters specifically k3s.
Get ArgoCD admin
password:
$ kubectl get -n argocd secrets argocd-cluster -o jsonpath='{.data.admin\.password}' | base64 -d
To update the catalog run the following to first pull the latest image operators image:
$ kubectl run catalog-update-custom --image quay.io/operator-framework/upstream-community-operators:latest --image-pull-policy Always $ kubectl delete pod catalog-update-custom
$ kubectl delete pods -n olm -l olm.catalogSource=operatorhubio-catalog
In OLM when you set an operator for manual upgrades you need to manually approve the initial deployment which is challenging in a gitops world. This can be automated.
For a manual example to approve the operator enmasse-operator
in the enmasse
namespace run:
$ kubectl patch installplan $(kubectl get subscriptions.operators.coreos.com -A --field-selector metadata.name=enmasse-operator -o jsonpath='{.items[0].status.installPlanRef.name}') -n enmasse --type=json -p='[{"op":"replace","path": "/spec/approved", "value": true}]'