From b652b1aed43f938c2169678cf0fd5b6c4a347c43 Mon Sep 17 00:00:00 2001 From: Dhruv Soni Date: Wed, 9 Oct 2024 19:10:15 +0530 Subject: [PATCH] RHDEVDOCS-6197: Content creation --- _topic_maps/_topic_map.yml | 2 + ...instance-to-manage-rollouts-resources.adoc | 24 +++++++++++ ...instance-to-manage-rollouts-resources.adoc | 40 +++++++++++++++++++ ...eating-rolloutmanager-custom-resource.adoc | 1 + 4 files changed, 67 insertions(+) create mode 100644 argo_rollouts/using-cluster-scoped-rollouts-instance-to-manage-rollouts-resources.adoc create mode 100644 modules/gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources.adoc diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index cba04fd60e81..bdef0cb37fb1 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -125,6 +125,8 @@ Topics: File: routing-traffic-by-using-argo-rollouts-for-openshift-service-mesh - Name: Enabling support for namespace-scoped Argo Rollouts installation File: enable-support-for-namespace-scoped-argo-rollouts-installation +- Name: Using a cluster-scoped rollouts instance to manage rollouts resources + File: using-cluster-scoped-rollouts-instance-to-manage-rollouts-resources --- Name: Security Dir: securing_openshift_gitops diff --git a/argo_rollouts/using-cluster-scoped-rollouts-instance-to-manage-rollouts-resources.adoc b/argo_rollouts/using-cluster-scoped-rollouts-instance-to-manage-rollouts-resources.adoc new file mode 100644 index 000000000000..47f7b96a7eb6 --- /dev/null +++ b/argo_rollouts/using-cluster-scoped-rollouts-instance-to-manage-rollouts-resources.adoc @@ -0,0 +1,24 @@ +:_mod-docs-content-type: ASSEMBLY +include::_attributes/common-attributes.adoc[] +[id="using-a-cluster-scoped-rollouts-instance-to-manage-rollouts-resources"] += Using a cluster-scoped rollouts instance to manage rollouts resources +:context: using-a-cluster-scoped-rollouts-instance-to-manage-rollouts-resources + +toc::[] + +To manage rollouts resources, after you install the {gitops-titel} Operator on the cluster, you can create and configure a `RolloutManager` custom resource (CR) instance in the namespace of your choice. You can then update the existing `Subscription` object for the {gitops-title} Operator and add user-defined namespaces to the `CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES` environment variable in the `spec` section of the Argo CD instance. + +[id="prerequisites_{context}"] +== Prerequisites + +* You have logged in to the {OCP} cluster as an administrator. +* You have installed the {gitops-title} Operator on your {OCP} cluster. +* You have created a `RolloutManager` custom resource. + +// Configuring a cluster-scoped rollouts instance to manage rollouts resources +include::modules/gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources.adoc[leveloffset=+1] + +[role="_additional-resources"] +[id="additional-resources_{context}"] +== Additional resources +* xref:../argo_rollouts/using-argo-rollouts-for-progressive-deployment-delivery.adoc#gitops-creating-rolloutmanager-custom-resource_using-argo-rollouts-for-progressive-deployment-delivery[Creating RolloutManager custom resources] \ No newline at end of file diff --git a/modules/gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources.adoc b/modules/gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources.adoc new file mode 100644 index 000000000000..3b601764251c --- /dev/null +++ b/modules/gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources.adoc @@ -0,0 +1,40 @@ +// Module included in the following assemblies: +// +// * argo_rollouts/using-a-cluster-scoped-rollouts-instance-to-manage-rollouts-resources.adoc + +:_mod-docs-content-type: PROCEDURE +[id="gitops-configuring-a-cluster-scoped-instance-to-manage-rollouts-resources_{context}"] += Configuring a cluster-scoped rollouts instance to manage rollouts resources + +To configure a cluster-scoped rollouts instance for managing rollouts resources, add the `CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES` environment variable in the `Subscription` resource. This variable contains a list of user-defined namespaces which can be configured for a cluster-scoped rollouts installation. + +[NOTE] +==== +You can only create a cluster-scoped rollouts instance if the `NAMESPACE_SCOPED_ARGO_ROLLOUTS` variable is set to `false`. +==== + +.Procedure +. In the *Administrator* perspective of the web console, navigate to *Operators* → *Installed Operators* → *{gitops-title}* → *Subscription*. +. Click the *Actions* list and 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 `CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES` environment variable in the `spec` section: +.Example: Configuring the `CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES` environment variable ++ +[source,yaml] +---- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: argo-operator +spec: + config: + env: + - name: NAMESPACE_SCOPED_ARGO_ROLLOUTS + value: 'false' # <1> + - name: CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES + value: # <2> + ... +---- +<1> The value set to `'false'` means that the installation defaults to cluster-scoped mode. +<2> Specifies the list of namespaces defined in the cluster scoped Argo CD instance, for example `test123-cluster-scoped`. + +. Click *Save* and *Reload*. \ No newline at end of file diff --git a/modules/gitops-creating-rolloutmanager-custom-resource.adoc b/modules/gitops-creating-rolloutmanager-custom-resource.adoc index 09cfa1adcc7e..e6ae2fe83e73 100644 --- a/modules/gitops-creating-rolloutmanager-custom-resource.adoc +++ b/modules/gitops-creating-rolloutmanager-custom-resource.adoc @@ -33,6 +33,7 @@ apiVersion: argoproj.io/v1alpha1 kind: RolloutManager metadata: name: argo-rollout + namespace: openshift-gitops labels: example: basic spec: {}