Skip to content

Commit 4c6a26c

Browse files
Merge branch 'main' into RHIDP-5351-oc-mirror-helm-procedure-update
2 parents ae6647e + 9e97a36 commit 4c6a26c

11 files changed

+223
-14
lines changed

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

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,159 @@ 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+
.Procedure
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+
+
108+
[NOTE]
109+
====
110+
111+
* If the Backstage Kubernetes plugin is already configured, the `ClusterRole` permissions for Rollouts and AnalysisRuns might already be granted.
112+
113+
* Use the link:https://raw.githubusercontent.com/backstage/community-plugins/main/workspaces/redhat-argocd/plugins/argocd/manifests/clusterrole.yaml[prepared manifest] to provide read-only `ClusterRole` access to both the Kubernetes and ArgoCD plugins.
114+
====
115+
116+
.. If the `ClusterRole` permission is not granted, use the following YAML manifest to create the `ClusterRole`:
117+
118+
+
119+
[source,yaml]
120+
----
121+
apiVersion: rbac.authorization.k8s.io/v1
122+
kind: ClusterRole
123+
metadata:
124+
name: backstage-read-only
125+
rules:
126+
- apiGroups:
127+
- argoproj.io
128+
resources:
129+
- rollouts
130+
- analysisruns
131+
verbs:
132+
- get
133+
- list
134+
----
135+
136+
.. Apply the manifest to the cluster using `kubectl`:
137+
+
138+
[source,bash]
139+
----
140+
kubectl apply -f <your-clusterrole-file>.yaml
141+
----
142+
143+
.. Ensure the `ServiceAccount` accessing the cluster has this `ClusterRole` assigned.
144+
145+
. Add annotations to `catalog-info.yaml` to identify Kubernetes resources for Backstage.
146+
147+
.. For identifying resources by entity ID:
148+
+
149+
[source,yaml]
150+
----
151+
annotations:
152+
...
153+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
154+
----
155+
156+
.. (Optional) For identifying resources by namespace:
157+
+
158+
[source,yaml]
159+
----
160+
annotations:
161+
...
162+
backstage.io/kubernetes-namespace: <RESOURCE_NAMESPACE>
163+
----
164+
165+
.. For using custom label selectors, which override resource identification by entity ID or namespace:
166+
+
167+
[source,yaml]
168+
----
169+
annotations:
170+
...
171+
backstage.io/kubernetes-label-selector: 'app=my-app,component=front-end'
172+
----
173+
+
174+
[NOTE]
175+
====
176+
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`.
177+
====
178+
179+
. Add label to Kubernetes resources to enable Backstage to find the appropriate Kubernetes resources.
180+
181+
.. Backstage Kubernetes plugin label: Add this label to map resources to specific Backstage entities.
182+
+
183+
[source,yaml]
184+
----
185+
labels:
186+
...
187+
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>
188+
----
189+
190+
.. GitOps application mapping: Add this label to map Argo CD Rollouts to a specific GitOps application
191+
+
192+
[source,yaml]
193+
----
194+
labels:
195+
...
196+
app.kubernetes.io/instance: <GITOPS_APPLICATION_NAME>
197+
----
198+
199+
+
200+
[NOTE]
201+
====
202+
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.
203+
====
204+
205+
.Verification
206+
207+
. Push the updated configuration to your GitOps repository to trigger a rollout.
208+
209+
. Open {Product} interface and navigate to the entity you configured.
210+
211+
. Select the *CD* tab and then select the *GitOps application*. The side panel opens.
212+
213+
. In the *Resources* table of the side panel, verify that the following resources are displayed:
214+
215+
* Rollouts
216+
217+
* AnalysisRuns (optional)
218+
219+
. Expand a rollout resource and review the following details:
220+
221+
* The Revisions row displays traffic distribution details for different rollout versions.
222+
223+
* The Analysis Runs row displays the status of analysis tasks that evaluate rollout success.
224+
225+
73226
[role="_additional-resources"]
74227
.Additional resources
75228

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
:context: readonlyrootfilesystem
3+
[id="{context}"]
4+
= Configuring readOnlyRootFilesystem in {product}
5+
6+
The {product} deployment consists of two containers: an `initContainer` that installs the Dynamic Plugins, and a backend container that runs the application. The `initContainer` has the `readOnlyRootFilesystem` option enabled by default. To enable this option on the backend container, you must either have permission to deploy resources through Helm or to create or update a CR for Operator-backed deployments. You can manually configure the `readOnlyRootFilesystem` option on the backend container by using the following methods:
7+
8+
* The {product} Operator
9+
* The {product} Helm chart
10+
11+
include::modules/configuring-readonlyrootfilesystem/proc-configuring-readonlyrootfilesystem-option-in-rhdh-operator-deployment.adoc[leveloffset=+1]
12+
13+
include::modules/configuring-readonlyrootfilesystem/proc-configuring-readonlyrootfilesystem-option-in-rhdh-helm-chart-deployment.adoc[leveloffset=+1]

modules/configuring-external-databases/proc-configuring-postgresql-instance-using-helm.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ By default, {product-short} uses a database for each plugin and automatically cr
2424

2525
. Optional: Create a certificate secret to configure your PostgreSQL instance with a TLS connection:
2626
+
27-
[source,terminal]
27+
[source,terminal, subs="+attributes"]
2828
----
2929
cat <<EOF | oc -n <your-namespace> create -f -
3030
apiVersion: v1
@@ -52,7 +52,7 @@ EOF
5252

5353
. Create a credential secret to connect with the PostgreSQL instance:
5454
+
55-
[source,terminal]
55+
[source,terminal, subs="+attributes"]
5656
----
5757
cat <<EOF | oc -n <your-namespace> create -f -
5858
apiVersion: v1
@@ -76,7 +76,7 @@ EOF
7676

7777
. Configure your PostgreSQL instance in the Helm configuration file named `values.yaml`:
7878
+
79-
[source,yaml]
79+
[source,yaml, subs="+attributes"]
8080
----
8181
# ...
8282
upstream:
@@ -89,10 +89,10 @@ upstream:
8989
backend:
9090
database:
9191
connection: # configure Backstage DB connection parameters
92-
host: ${POSTGRES_HOST}
93-
port: ${POSTGRES_PORT}
94-
user: ${POSTGRES_USER}
95-
password: ${POSTGRES_PASSWORD}
92+
host: $\{POSTGRES_HOST}
93+
port: $\{POSTGRES_PORT}
94+
user: $\{POSTGRES_USER}
95+
password: $\{POSTGRES_PASSWORD}
9696
ssl:
9797
rejectUnauthorized: true,
9898
ca:

modules/configuring-external-databases/proc-migrating-databases-to-an-external-server.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ You can stop port forwarding when the copying of the data is complete. For more
8181
. Reconfigure your `{product-custom-resource-type}` custom resource (CR). For more information, see link:{configuring-book-url}#proc-configuring-postgresql-instance-using-operator_configuring-external-postgresql-databases[Configuring an external PostgreSQL instance using the Operator].
8282
. Check that the following code is present at the end of your `Backstage` CR after reconfiguration:
8383
+
84-
[source,yaml]
84+
[source,yaml, subs="+attributes"]
8585
----
8686
# ...
8787
spec:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[id="proc-configuring-readonlyrootfilesystem-option-in-rhdh-helm-chart-deployment"]
2+
= Configuring the readOnlyRootFilesystem option in a {product} Helm chart deployment
3+
4+
.Procedure
5+
. In your 'values.yaml' file, add the `readOnlyRootFilesystem: true` line to the `containerSecurityContext` section. For example:
6+
+
7+
====
8+
[source,yaml,subs="+attributes,+quotes"]
9+
----
10+
upstream:
11+
backstage:
12+
containerSecurityContext:
13+
readOnlyRootFilesystem: true
14+
----
15+
====
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[id="proc-configuring-readonlyrootfilesystem-option-in-rhdh-operator-deployment"]
2+
= Configuring the readOnlyRootFilesystem option in a {product} Operator deployment
3+
4+
When you are deploying {product-short} using the Operator, you must specify a `patch` for the `deployment` in your `{product-custom-resource-type}` custom resource (CR) that applies the `readOnlyRootFilesystem` option to the `securityContext` section in the {product-short} backend container.
5+
6+
.Procedure
7+
8+
. In your `{product-custom-resource-type}` CR, add the `securityContext` specification. For example:
9+
+
10+
====
11+
[source,yaml,subs="+attributes,+quotes"]
12+
----
13+
spec:
14+
deployment:
15+
patch:
16+
spec:
17+
template:
18+
spec:
19+
containers:
20+
- name: backstage-backend <1>
21+
securityContext:
22+
readOnlyRootFilesystem: true
23+
----
24+
====
25+
<1> Name of the main container defined in the Operator default configuration.

modules/configuring/proc-mounting-additional-files-in-your-custom-configuration-using-rhdh-operator.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The `mountPath` field specifies the location where a ConfigMap or Secret is moun
1111

1212
[NOTE]
1313
====
14-
* {ocp-short} does not automatically update a volume mounted with `subPath`. By default, the {product-very-short} operator monitors these ConfigMaps or Secrets and refreshes the {product-very-short} Pod when changes occur.
14+
* {ocp-short} does not automatically update a volume mounted with `subPath`. By default, the {product-very-short} Operator monitors these ConfigMaps or Secrets and refreshes the {product-very-short} Pod when changes occur.
1515
* For security purposes, {product} does not give the Operator Service Account read access to Secrets. As a result, mounting files from Secrets without specifying both mountPath and key is not supported.
1616
====
1717

modules/configuring/proc-using-the-operator-to-run-rhdh-with-your-custom-configuration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[id="using-the-operator-to-run-rhdh-with-your-custom-configuration"]
2-
= Using the {product} operator to run {product-short} with your custom configuration
2+
= Using the {product} Operator to run {product-short} with your custom configuration
33

4-
To use the {product-short} operator to run {product} with your custom configuration, create your {product-custom-resource-type} custom resource (CR) that:
4+
To use the {product-short} Operator to run {product} with your custom configuration, create your {product-custom-resource-type} custom resource (CR) that:
55

66
* Mounts files provisioned in your custom config maps.
77
* Injects environment variables provisioned in your custom secrets.

modules/customizing-the-appearance/ref-customize-rhdh-default-rhdh.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ app:
8888
mainSectionBackgroundColor: "#FFF"
8989
headerBottomBorderColor: "#C7C7C7"
9090
cardBackgroundColor: "#FFF"
91-
sideBarBackgroundColor: "#212427"
91+
sidebarBackgroundColor: "#212427"
9292
cardBorderColor: "#C7C7C7"
9393
tableTitleColor: "#181818"
9494
tableSubtitleColor: "#616161"
@@ -180,7 +180,7 @@ app:
180180
mainSectionBackgroundColor: "#0f1214"
181181
headerBottomBorderColor: "#A3A3A3"
182182
cardBackgroundColor: "#292929"
183-
sideBarBackgroundColor: "#1b1d21"
183+
sidebarBackgroundColor: "#1b1d21"
184184
cardBorderColor: "#A3A3A3"
185185
tableTitleColor: "#E0E0E0"
186186
tableSubtitleColor: "#E0E0E0"

modules/dynamic-plugins/proc-create-plugin-tgz-file.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ npm pack --pack-destination ~/test/dynamic-plugins-root/
4848
To create a plugin registry using HTTP server on {ocp-short}, run the following commands:
4949
5050
.Example commands to build and deploy an HTTP server in {ocp-short}
51-
[source,terminal]
51+
[source,terminal, subs="+attributes"]
5252
----
5353
oc project {my-product-namespace}
5454
oc new-build httpd --name=plugin-registry --binary

0 commit comments

Comments
 (0)