From 350968436f6eed4b2ddbcfdcd71116b5d71e1969 Mon Sep 17 00:00:00 2001 From: Regina Scott Date: Thu, 26 Aug 2021 16:53:41 -0400 Subject: [PATCH] Update steps to account for cross-namespace Argo CD permission cleanup --- ...lication-by-using-the-argo-cd-dashboard.adoc | 4 ++++ ...ing-an-application-by-using-the-oc-tool.adoc | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/modules/gitops-creating-an-application-by-using-the-argo-cd-dashboard.adoc b/modules/gitops-creating-an-application-by-using-the-argo-cd-dashboard.adoc index e4041a5b77..1ee1b2bd81 100644 --- a/modules/gitops-creating-an-application-by-using-the-argo-cd-dashboard.adoc +++ b/modules/gitops-creating-an-application-by-using-the-argo-cd-dashboard.adoc @@ -52,3 +52,7 @@ Directory Recurse:: `checked` endif::app[] . Click *Create* to create your application. + +. Open the *Administrator* perspective of the web console and navigate to *Administration* -> *Namespaces* in the menu on the left. + +. Search for and select the namespace, then enter `argocd.argoproj.io/managed-by=openshift-gitops` in the *Labels* field so that the Argo CD instance in the `openshift-gitops` namespace can manage your namespace. \ No newline at end of file diff --git a/modules/gitops-creating-an-application-by-using-the-oc-tool.adoc b/modules/gitops-creating-an-application-by-using-the-oc-tool.adoc index f1f05aa6df..456db288ba 100644 --- a/modules/gitops-creating-an-application-by-using-the-oc-tool.adoc +++ b/modules/gitops-creating-an-application-by-using-the-oc-tool.adoc @@ -47,3 +47,20 @@ endif::cluster[] ---- $ oc get application -n openshift-gitops ---- + +. Add a label to the namespace your application is deployed in so that the Argo CD instance in the `openshift-gitops` namespace can manage it: + +ifdef::app[] ++ +[source,terminal] +---- +$ oc label namespace springpet-clinic argocd.argoproj.io/managed-by=openshift-gitops +---- +endif::app[] +ifdef::cluster[] ++ +[source,terminal] +---- +$ oc label namespace default argocd.argoproj.io/managed-by=openshift-gitops +---- +endif::cluster[]