Skip to content

Commit c93651e

Browse files
committed
Updated plugin doc for Argo CD rollout feature
1 parent e0834a6 commit c93651e

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed

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

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

73+
== Enabling Argo CD Rollouts
74+
75+
The optional 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 teams to visualize and manage Argo CD Rollouts seamlessly within the Backstage interface.
76+
77+
.Prerequisites
78+
79+
* The Backstage Kubernetes plugin (`@backstage/plugin-kubernetes`) is installed and configured.
80+
81+
** 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.
82+
83+
* You have access to the Kubernetes cluster with the necessary permissions to create and manage custom resources and `ClusterRoles`.
84+
85+
* The Kubernetes cluster has the `argoproj.io` group resources (for example, Rollouts and AnalysisRuns) installed.
86+
87+
.Procedures
88+
89+
. In the `app-config.yaml` file in your Backstage instance, add the following `customResources` component under the `kubernetes` configuration to enable Argo Rollouts and AnalysisRuns:
90+
91+
+
92+
[source,yaml]
93+
----
94+
kubernetes:
95+
...
96+
customResources:
97+
- group: 'argoproj.io'
98+
apiVersion: 'v1alpha1'
99+
plural: 'Rollouts'
100+
- group: 'argoproj.io'
101+
apiVersion: 'v1alpha1'
102+
plural: 'analysisruns'
103+
----
104+
105+
. Grant `ClusterRole` permissions for custom resources.
106+
107+
.. If the Backstage Kubernetes plugin is already configured, the `ClusterRole` permissions for `Rollouts` and `AnalysisRuns` might already be granted.
108+
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 the `ClusterRole` permission is not granted, use the following YAML manifest to create the `ClusterRole`:
116+
117+
+
118+
[source,yaml]
119+
----
120+
apiVersion: rbac.authorization.k8s.io/v1
121+
kind: ClusterRole
122+
metadata:
123+
name: backstage-read-only
124+
rules:
125+
- apiGroups:
126+
- argoproj.io
127+
resources:
128+
- Rollouts
129+
- analysisruns
130+
verbs:
131+
- get
132+
- list
133+
----
134+
135+
.. Apply the manifest to the cluster using `kubectl`:
136+
+
137+
[source,bash]
138+
----
139+
kubectl apply -f <your-clusterrole-file>.yaml
140+
----
141+
142+
.. Ensure the `ServiceAccount` accessing the cluster has this `ClusterRole` assigned.
143+
144+
. Add annotations to `catalog-info.yaml` to identify Kubernetes resources for Backstage.
145+
146+
.. For identifying resources by entity ID:
147+
+
148+
[source,yaml]
149+
----
150+
annotations:
151+
...
152+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
153+
----
154+
155+
.. (Optional) For identifying resources by namespace:
156+
+
157+
[source,yaml]
158+
----
159+
annotations:
160+
...
161+
backstage.io/kubernetes-namespace: <RESOURCE_NAMESPACE>
162+
----
163+
164+
.. For using custom label selectors, which override resource identification by entity ID or namespace:
165+
+
166+
[source,yaml]
167+
----
168+
annotations:
169+
...
170+
backstage.io/kubernetes-label-selector: 'app=my-app,component=front-end'
171+
----
172+
+
173+
[NOTE]
174+
====
175+
Ensure you specify the labels declared in `backstage.io/kubernetes-label-selector` on your Kubernetes resources. This annotation overrides entity-based or namespace-based identification annotations, such as `backstage.io/kubernetes-id` and `backstage.io/kubernetes-namespace`.
176+
====
177+
178+
. Add label to Kubernetes resources to enable Backstage to find the appropriate Kubernetes resources.
179+
180+
.. Backstage Kubernetes plugin label: Add this label to map resources to specific Backstage entities.
181+
+
182+
[source,yaml]
183+
----
184+
labels:
185+
...
186+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
187+
----
188+
189+
.. GitOps application mapping: Add this label to map Argo CD Rollouts to a specific GitOps application
190+
+
191+
[source,yaml]
192+
----
193+
labels:
194+
...
195+
app.kubernetes.io/instance: <GITOPS_APPLICATION_NAME>
196+
----
197+
198+
+
199+
[NOTE]
200+
====
201+
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.
202+
====
203+
204+
.Verification
205+
206+
. Push code changes to your GitOps repository to trigger a deployment.
207+
208+
. Open the Backstage interface and navigate to the entity you configured.
209+
210+
. Confirm that the Argo CD Rollouts feature is functioning as expected by performing the following checks:
211+
212+
** Kubernetes resources, such as `Rollouts` and `AnalysisRuns`, are visible under the *Kubernetes* tab.
213+
214+
** You are able to monitor `Rollouts` status and manage deployments.
215+
73216
[role="_additional-resources"]
74217
.Additional resources
75218

0 commit comments

Comments
 (0)