Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 181 additions & 0 deletions gitops/gitops_addon_with_argocd.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
[#enable-gitops-addon-with-argocd]
= Enabling {gitops} add-on with _ArgoCD_ agent
Copy link
Contributor

@swopebe swopebe Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback for the entire collection here:

This was a lot, great job. I think it's getting close to done.

Themes:

  • The YAML additions are missing details or specifics.

  • All of them are also missing the step to apply the command. I have shown this previously, but there are also examples in the doc if you need to see what I mean. We give them a sample to add, explain it a bit, then give them the command to apply.

Usually something like:

  1. Create the YAML file with the ___ specifications. (or resource, or label, or annotation--depends on what it actually is)
  2. Apply the YAML file with the following command:
    oc apply (check for sure)
  • There are a few space issues, I may not have caught all of them.
  • One file needs to be broken out into three
  • Remove callouts because we cannot create those anymore, unfortunately. We all agreed to move forward with more conversion friendly content as much as we can.

Couple other smaller things.


Enable the {gitops-short} add-on for `Advanced` pull model with the `ArgoCD` agent to get detailed statuses on the health of your hub clusters and to simplify your cluster management processes. To enable a GitOps add-on with the `ArgoCD` agent, complete the following sections:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have Advanced coded here?

Copy link
Contributor

@swopebe swopebe Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing comma spacing issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Enable the {gitops-short} add-on for `Advanced` pull model with the `ArgoCD` agent to get detailed statuses on the health of your hub clusters and to simplify your cluster management processes. To enable a GitOps add-on with the `ArgoCD` agent, complete the following sections:
Enable the {gitops-short} add-on for `Advanced` pull model with the `ArgoCD` agent to get detailed statuses on the health of your Application. To enable a GitOps add-on with the `ArgoCD` agent, complete the following sections:


* <<prerequisites, Prerequisites>>
* <<enable-argocd-agent, Enabling the _ArgoCD_ agent>>
* <<verify-installation, Verifying the installation>>
* <<additional-resources, Additional resources>>

[#prerequisites]
== Prerequisites

* {acm-short} hub cluster installed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout the doc, these are complete sentences. We would be changing that with this prereq list. Usually:

You need x

or

You have X.

* Managed clusters registered with {acm-short}
* OpenShift GitOps operator installed on the hub cluster
Copy link
Contributor

@swopebe swopebe Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is conref-ed in our docs--please check; please check on all product names internally and check the guidance if we don't have anything for this. Check all OCP and GitOps instances for conref and naming.

* A `Placement` resource to select target managed clusters
* `ManagedClusterSet` bound to the target namespace
* OpenShift GitOps operator subscription configured with the `ArgoCD` agent environment
* The `ArgoCD` custom resource configured for the `Agent` mode

[#configure-subscriptions-resources]
== Configuring subscriptions and resources

To enable the `ArgoCD` agent, you must configure the {gitops-short} operator subscription and the `ArgoCD` custom resource. To configure the necessary subscriptions and resources, complete the following steps:


. On the hub cluster only, modify the OpenShift GitOps operator subscription to include the required environment variables:

+
[source,bash]
----
oc edit subscription gitops-operator -n openshift-gitops-operator
----

. Add the following environment variables under `spec.config.env`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please never use under, this can alienate a nonsighted user. We go over this in our internal doc very clearly: https://stolostron.github.io/rhacm-docs/accessibility

Further we have this on the checklist: https://stolostron.github.io/rhacm-docs/checklist (directional language)


+
[source,yaml]
----
spec:
config:
env:
- name: ARGOCD_CLUSTER_CONFIG_NAMESPACES
value: openshift-gitops
- name: ARGOCD_PRINCIPAL_TLS_SERVER_ALLOW_GENERATE
value: "false"
- name: ARGOCD_PRINCIPAL_REDIS_SERVER_ADDRESS
value: openshift-gitops-redis:6379
----

. Replace the existing `ArgoCD` custom resource with the compatible `Agent` mode configuration:

+
[source,yaml]
----
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: openshift-gitops
namespace: openshift-gitops
spec:
controller:
enabled: false
argoCDAgent:
principal:
allowedNamespaces:
- '*'
auth: mtls:CN=system:open-cluster-management:cluster:([^:]+):addon:gitops-addon:agent:gitops-addon-agent
enabled: true
----

* *Note:* On the hub cluster only, this configuration disables the traditional `ArgoCD` controller and enables the agent principal with mutual TLS authentication.

[#enable-argocd-agent]
== Enabling _ArgoCD_ agent

Create a `GitOpsCluster` resource to manage the `ArgoCD` agent add-on deployment. its controller automatically creates the following resources for each managed cluster selected by the `Placement`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the possessive here and rewrite that line; see the IBM style guide about possessive.

"its" is also not capitalized, but is a start a new sentence, I think?


The `GitOpsCluster` controller performs the following operations:

* Create and automated PKI management
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The controller .... creates (add the s to make subject/predicate agree,

* Creates `ArgoCD` cluster secrets configured for agent mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that are?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are for Argo CD to understand what clusters are imported.
Argo CD by default does not understand ACM's ManagedClusters.
This progress is equivalent of: importing all the ACM's ManagedClusters (selected by the Placement) into Argo CD.

* Deploys the Argo CD Agent on each selected managed cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes Argo CD is coded, see above examples, and sometimes not.


To create a `GitOpsCluster` resource with the `ArgoCD` agent, complete the following steps:

. Create a `GitOpsCluster resource with the `ArgoCD` agent enabled by inputting the following YAML sample:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputting?

We normally keep it simple:

Add the following YAML to create ___

Create ___ by adding the following YAML.

Are they adding the entire sample and what from it matters to the user. We don't want to just give them a big sample and not explain it.


+
[source,yaml]
----
apiVersion: apps.open-cluster-management.io/v1beta1
kind: GitOpsCluster
metadata:
name: gitops-agent-clusters
namespace: openshift-gitops
spec:
argoServer:
argoNamespace: openshift-gitops
placementRef:
kind: Placement
apiVersion: cluster.open-cluster-management.io/v1beta1
name: production-clusters
namespace: openshift-gitops
gitopsAddon:
enabled: true
argoCDAgent:
enabled: true
propagateHubCA: true
----

[#verify-installation]
== Verifying the installation

After the `ArgoCD` agent is successfully deployed, verify the `Pull Model` workflow is completed by creating an application on the hub cluster and confirming it works on the managed cluster.

To verify the necessary installations and resources for successful deployment, complete the following steps:

. Check the `GitOpsCluster` status for specific `Agent` conditions by running the following command:

+
[source,bash]
----
oc get gitopscluster gitops-agent-clusters -n openshift-gitops -o jsonpath='{.status.conditions}' | jq
----

. Confirm that you see the following condition types in the status:

+
* `ArgoCDAgentPrereqsReady` - Agent prerequisites are set up
* `CertificatesReady` - TLS certificates are signed
* `ManifestWorksApplied` - CA certificates propagated to managed clusters
Copy link
Contributor

@mikeshng mikeshng Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Ready - GitOpsCluster is ready and all components are functioning correctly
  • PlacementResolved - Placement reference resolved and managed clusters retrieved
  • ClustersRegistered - Managed clusters successfully registered with ArgoCD server
  • AddOnDeploymentConfigsReady - AddOnDeploymentConfigs created for all managed clusters (GitOps addon)
  • ManagedClusterAddOnsReady - ManagedClusterAddons created/updated for all managed clusters (GitOps addon)
  • AddOnTemplateReady - Dynamic AddOnTemplate created for ArgoCD agent mode (ArgoCD agent only)
  • ArgoCDAgentPrereqsReady - ArgoCD agent prerequisites are set up (RBAC, Redis secret, JWT secret, server discovery)
  • CertificatesReady - ArgoCD agent TLS certificates (CA, Principal, Resource Proxy) are signed and ready
  • ManifestWorksApplied - CA certificates propagated to managed clusters via ManifestWorks (ArgoCD agent only)

Sorry, we added new conditions. Please see above for the full list.


. On the hub cluster, create an `ArgoCD` application resource in the managed cluster namespace by inputting the following YAML file:

+
[source,yaml]
----
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: <managed cluster name>
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server: https://<principal-external-ip:port>?agentName=<managed cluster name>
namespace: guestbook
syncPolicy:
automated:
prune: true
selfHeal: true
----

. On the managed cluster, verify that the application resources are deployed by running the following command:

+
[source,bash]
----
oc get all -n guestbook
----

. On the hub cluster, verify the application status is reflected back to you by running the following command:

+
[source,bash]
----
oc get application guestbook -n <managed cluster name>
----

. Confirm that the status shows `Synced` when the application is successfully deployed.

[#additional-resources]
== Additional resources

Continue learning about the {gitops-short} add-on by completing xref:../gitops/gitops_manage_addon.adoc#manage-gitops-addon[Managing the {gitops} add-on].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would take out learning here since they are heading to a task and not a concept and you are telling them to "complete" something?

99 changes: 99 additions & 0 deletions gitops/gitops_addon_without_argocd.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[#enable-gitops-addon-without-argocd]
= Enabling {gitops} add-on without the _ArgoCD_ agent

The `Basic` pull model does not include the `ArgoCD` agent, so it gives you a simpler setup for your hub cluster management and only gives you the necessary statuses of the health of your hub clusters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is Basic coded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with the GitOps name throughout, see where the conref needs to be used.


To enable a GitOps add-on without the `ArgoCD` agent, complete the following sections:

* <<prerequisites, Prerequisites>>
* <<create-gitopscluster-resource, Creating a _GitOpsCluster_ resource>>
* <<verify-installation, Verifying the installation>>
* <<additional-resources, Additional resources>>

[#prerequisites]
== Prerequisites
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same feedback. You tell them to "complete" this section in the line before, so I would go with different language, but either way these are complete sentences in most of the books.

Ensure you have an {acm-short} hub cluster installed.
Register your
Install OCP GitOps operator
etc...


* {acm-short} hub cluster installed
* Managed clusters registered with {acm-short}
* OpenShift GitOps operator installed on the hub cluster
* A `Placement` resource to select target managed clusters
* `ManagedClusterSet` bound to the target namespace

[#create-gitopscluster-resource]
== Creating a `GitOpsCluster` resource

Instead of using an `ArgoCD` agent, you can install a `GitOpsCluster` resource. After you install a `GitOpsCluster` resource, its controller automatically creates the following resources for each managed cluster selected by the `Placement` policy:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with possessive. I usually just say "the"


* `AddOnDeploymentConfig` in the managed cluster namespace
* `ManagedClusterAddOn` in the managed cluster namespace

The {gitops} add-on deploys to each selected managed cluster and installs the following resources:

* OpenShift GitOps operator in the `openshift-gitops-operator` namespace
* Argo CD instance in the `openshift-gitops` namespace

To create a `GitOpsCluster` resource, complete the following steps:

. On your hub cluster, create a `GitOpsCluster` resource to enable the {gitops} add-on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the following...


+
[source,yaml]
----
apiVersion: apps.open-cluster-management.io/v1beta1
kind: GitOpsCluster
metadata:
name: gitops-clusters
namespace: openshift-gitops
spec:
argoServer:
argoNamespace: openshift-gitops
placementRef:
kind: Placement
apiVersion: cluster.open-cluster-management.io/v1beta1
name: all-openshift-clusters
namespace: openshift-gitops
gitopsAddon:
enabled: true
----

[#verify-installation]
== Verifying the installation

To verify the necessary installations and resources for successful deployment, complete the following steps:

. Verify that the `GitOpsCluster` resource has a status for successful deployment by running the following command:

+
[source,bash]
----
oc get gitopscluster gitops-clusters -n openshift-gitops -o yaml
----

. Verify that the GitOps add-on controller is working by running the following command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command and the following commands are meant to run on the managed cluster (where the addon is installed).


+
[source,bash]
----
oc get pods -n open-cluster-management-agent-addon
----

. Verify the OpenShift GitOps operator is working by running the following command:

+
[source,bash]
----
oc get pods -n openshift-gitops-operator
----

. Verify the Argo CD instance is working by running the following command:

+
[source,bash]
----
oc get pods -n openshift-gitops
----

[#additional-resources]
== Additional resources

Continue learning about the {gitops-short} add-on by completing xref:../gitops/gitops_manage_addon.adoc#manage-gitops-addon[Managing the {gitops} add-on].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with "learning" but you are sending them to a task to "complete"

Loading
Loading