mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
51 lines
2.3 KiB
Plaintext
51 lines
2.3 KiB
Plaintext
// Module included in the following assembly:
|
|
//
|
|
// * gitops/configuring_argo_cd_to_recursively_sync_a_git_repository_with_your_application/configuring-an-openshift-cluster-by-deploying-an-application-with-cluster-configurations.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="using-argo-cd-instance-to-manage-cluster-scoped-resources_{context}"]
|
|
|
|
= Using an Argo CD instance to manage cluster-scoped resources
|
|
|
|
To manage cluster-scoped resources, update the existing `Subscription` object for the {gitops-title} Operator and add the namespace of the Argo CD instance to the `ARGOCD_CLUSTER_CONFIG_NAMESPACES` environment variable in the `spec` section.
|
|
|
|
[discrete]
|
|
.Procedure
|
|
. In the **Administrator** perspective of the web console, navigate to **Operators** → **Installed Operators** → **{gitops-title}** → **Subscription**.
|
|
. Click the **Actions** drop-down menu then click **Edit Subscription**.
|
|
. On the **openshift-gitops-operator** Subscription details page, under the **YAML** tab, edit the `Subscription` YAML file by adding the namespace of the Argo CD instance to the `ARGOCD_CLUSTER_CONFIG_NAMESPACES` environment variable in the `spec` section:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: openshift-gitops-operator
|
|
namespace: openshift-operators
|
|
...
|
|
spec:
|
|
config:
|
|
env:
|
|
- name: ARGOCD_CLUSTER_CONFIG_NAMESPACES
|
|
value: openshift-gitops, <list of namespaces of cluster-scoped Argo CD instances>
|
|
...
|
|
----
|
|
+
|
|
. To verify that the Argo instance is configured with a cluster role to manage cluster-scoped resources, perform the following steps:
|
|
+
|
|
.. Navigate to **User Management** → **Roles** and from the **Filter** drop-down menu select **Cluster-wide Roles**.
|
|
.. Search for the `argocd-application-controller` by using the **Search by name** field.
|
|
+
|
|
The **Roles** page displays the created cluster role.
|
|
+
|
|
[TIP]
|
|
====
|
|
Alternatively, in the OpenShift CLI, run the following command:
|
|
|
|
[source,terminal]
|
|
----
|
|
oc auth can-i create oauth -n openshift-gitops --as system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller
|
|
----
|
|
|
|
The output `yes` verifies that the Argo instance is configured with a cluster role to manage cluster-scoped resources. Else, check your configurations and take necessary steps as required.
|
|
==== |