Skip to content

Commit 47bfe03

Browse files
committed
Updated plugin doc for Argo CD rollout feature
1 parent 1508614 commit 47bfe03

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

artifacts/rhdh-plugins-reference/argocd/argocd-plugin-admin.adoc

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,143 @@ global:
7070
disabled: false
7171
----
7272

73+
== (Optional) Enabling Argo CD Rollouts feature
74+
75+
The Argo CD Rollouts feature enhances Kubernetes by providing advanced deployment strategies, such as blue-green and canary deployments, for your applications. When integrated into the backstage Kubernetes plugin, it allows developers and operations team to visualize and manage these Rollouts seamlessly within the Backstage interface.
76+
77+
.Prerequisites
78+
79+
* *Backstage Kubernetes plugin installed:* Verify that the Kubernetes plugin in Backstage (`@backstage/plugin-kubernetes`) is installed and configured. To install and configure Kubernetes plugin in Backstage, see link:https://backstage.io/docs/features/kubernetes/installation/[Installaltion] and link:https://backstage.io/docs/features/kubernetes/configuration/[configuration] guide.
80+
81+
* *Kubernetes cluster access:* Ensure you have access to the Kubernetes cluster with the necessary permissions to create and manage custom resources and `ClusterRoles`.
82+
83+
* *Argo Rollouts resources:* Confirm that the Kubernetes cluster has the `argoproj.io` group resources (for example, Rollouts and AnalysisRuns) installed.
84+
85+
.Procedures
86+
87+
. Update `app-config.yaml` for custom resources.
88+
89+
.. Open the `app-config.yaml` file in your Backstage instance.
90+
91+
.. Add the following `customResources` component under the `kubernetes` configuration to enable Argo Rollouts and AnalysisRuns:
92+
+
93+
[source,yaml]
94+
----
95+
kubernetes:
96+
...
97+
customResources:
98+
- group: 'argoproj.io'
99+
apiVersion: 'v1alpha1'
100+
plural: 'Rollouts'
101+
- group: 'argoproj.io'
102+
apiVersion: 'v1alpha1'
103+
plural: 'analysisruns'
104+
----
105+
106+
. Grant `ClusterRole` permissions for custom resources.
107+
108+
.. Verify whether the Backstage Kubernetes plugin is already configured. If it is, the `ClusterRole` for Rollouts and AnalysisRuns might already be granted.
109+
+
110+
[NOTE]
111+
====
112+
Use a link:https://raw.githubusercontent.com/backstage/community-plugins/main/workspaces/redhat-argocd/plugins/argocd/manifests/clusterrole.yaml[prepared manifest] for a read-only `ClusterRole` that provides access for both the Kubernetes plugin and the ArgoCD plugin.
113+
====
114+
115+
.. If not already granted, use the following YAML manifest to create the ClusterRole:
116+
+
117+
[source,yaml]
118+
----
119+
apiVersion: rbac.authorization.k8s.io/v1
120+
kind: ClusterRole
121+
metadata:
122+
name: backstage-read-only
123+
rules:
124+
- apiGroups:
125+
- argoproj.io
126+
resources:
127+
- Rollouts
128+
- analysisruns
129+
verbs:
130+
- get
131+
- list
132+
----
133+
134+
.. Apply the manifest to the cluster using `kubectl`:
135+
+
136+
[source,bash]
137+
----
138+
kubectl apply -f <your-clusterrole-file>.yaml
139+
----
140+
141+
.. Ensure the `ServiceAccount` accessing the cluster has this `ClusterRole` assigned.
142+
143+
. Add annotations to `catalog-info.yaml` to identify Kubernetes resources for Backstage
144+
145+
.. For identifying resources by entity ID:
146+
+
147+
[source,yaml]
148+
----
149+
annotations:
150+
...
151+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
152+
----
153+
154+
.. For identifying resources by namespace (optional):
155+
+
156+
[source,yaml]
157+
----
158+
annotations:
159+
...
160+
backstage.io/kubernetes-namespace: <RESOURCE_NAMESPACE>
161+
----
162+
163+
.. For using custom label selectors (takes precedence over the above annotations):
164+
+
165+
[source,yaml]
166+
----
167+
annotations:
168+
...
169+
backstage.io/kubernetes-label-selector: 'app=my-app,component=front-end'
170+
----
171+
172+
. Add label to Kubernetes resources to enable Backstage to find the appropriate Kubernetes resources.
173+
174+
.. Backstage Kubernetes plugin label: Add this label to map resources to specific Backstage entities.
175+
+
176+
[source,yaml]
177+
----
178+
labels:
179+
...
180+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
181+
----
182+
183+
.. GitOps application mapping: Add this label to map Argo CD Rollouts to a specific GitOps application
184+
+
185+
[source,yaml]
186+
----
187+
labels:
188+
...
189+
app.kubernetes.io/instance: <GITOPS_APPLICATION_NAME>
190+
----
191+
192+
+
193+
[NOTE]
194+
====
195+
If using the label selector annotation (backstage.io/kubernetes-label-selector), ensure the specified labels are present on the resources. The label selector will override other annotations like kubernetes-id or kubernetes-namespace.
196+
====
197+
198+
.Verification
199+
200+
. Push code changes to your GitOps repository to trigger a deployment.
201+
202+
. Open the Backstage interface and navigate to the entity you configured.
203+
204+
. Confirm that:
205+
206+
** Kubernetes resources, such as Rollouts and AnalysisRuns, are visible under the *Kubernetes* tab.
207+
208+
** The Argo CD Rollouts feature is functioning as expected, allowing you to monitor rollouts status and manage deployments.
209+
73210
[role="_additional-resources"]
74211
.Additional resources
75212

0 commit comments

Comments
 (0)