Skip to content

Commit e04c251

Browse files
jmagakGitHub Actions
and
GitHub Actions
authored
RHIDP-5881: Fix inconsistencies with referencing my-rhdh-secrets (redhat-developer#944)
* Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets Fix inconsistencies with referencing my-rhdh-secrets * Fix inconsistencies with referencing my-rhdh-secrets * Apply peer suggestions * Apply peer suggestions * Apply peer suggestions * Apply peer suggestions --------- Co-authored-by: GitHub Actions <[email protected]>
1 parent b0ef8e2 commit e04c251

9 files changed

+54
-36
lines changed

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

+8-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ data:
4040
----
4141
====
4242
+
43-
.Minimal `{my-product-secrets}` Secret example
43+
.Minimal {product} Secret example
4444
====
4545
[source,yaml,subs="+attributes,+quotes"]
4646
----
4747
apiVersion: v1
4848
kind: Secret
4949
metadata:
50-
name: {my-product-secrets}
50+
name: `_<my_product_secrets>_`
5151
StringData:
5252
secret11.txt: |
5353
secret-content
@@ -69,9 +69,14 @@ spec:
6969
key: file12.txt
7070
mountPath: /my/my-rhdh-config-map/path
7171
secrets:
72-
- name: {my-product-secrets}
72+
- name: `_<my_product_secrets>_`
7373
key: secret11.txt
7474
mountPath: /my/my-rhdh-secret/path
7575
7676
----
7777
====
78+
79+
[NOTE]
80+
====
81+
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
82+
====

modules/configuring/proc-provisioning-your-custom-configuration.adoc

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Your changes on this configuration might get reverted on {product-short} restart
1313
* By using the link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/cli_tools/index#cli-about-cli_cli-developer-commands[{openshift-cli}], you have access, with developer permissions, to the {ocp-short} cluster aimed at containing your {product-short} instance.
1414

1515
.Procedure
16-
. Author your custom `{my-product-secrets}.txt` file to provision your secrets as environment variables values in an {ocp-short} secret, rather than in clear text in your configuration files.
16+
. Author your custom `_<my_product_secrets>_.txt` file to provision your secrets as environment variables values in an {ocp-short} secret, rather than in clear text in your configuration files.
1717
It contains one secret per line in `KEY=value` form.
1818
+
1919
* link:{authentication-book-url}[Enter your authentication secrets].
@@ -71,16 +71,21 @@ $ oc create configmap {my-app-config-config-map} --from-file={my-app-config-file
7171
+
7272
Alternatively, link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/nodes/index#nnodes-pods-configmap-create-from-console_configmaps[create the config map by using the web console].
7373

74-
.. Provision your `{my-product-secrets}.txt` file to the `{my-product-secrets}` secret in the _<{my-product-namespace}>_ project.
74+
.. Provision your `_<my_product_secrets>_.txt` file to the `_<my_product_secrets>_` secret in the _<{my-product-namespace}>_ project.
7575
+
7676
[source,terminal,subs="+attributes,+quotes"]
7777
----
78-
$ oc create secret generic {my-product-secrets} --from-file={my-product-secrets}.txt --namespace={my-product-namespace}
78+
$ oc create secret generic `_<my_product_secrets>_` --from-file=`_<my_product_secrets>_.txt` --namespace={my-product-namespace}
7979
----
8080
+
8181
Alternatively,
8282
link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/nodes/index#nodes-pods-secrets-creating-web-console-secrets_nodes-pods-secrets[create the secret by using the web console].
8383

84+
[NOTE]
85+
====
86+
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
87+
====
88+
8489
.Next steps
8590
Consider provisioning additional config maps and secrets:
8691

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

+11-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
- name: {my-app-config-config-map}
3232
extraEnvs:
3333
secrets:
34-
- name: {my-product-secrets}
34+
- name: `_<my_product_secrets>_`
3535
extraFiles:
3636
mountPath: /opt/app-root/src
3737
replicas: 1
@@ -60,7 +60,7 @@ spec:
6060
dynamicPluginsConfigMapName: dynamic-plugins-rhdh
6161
extraEnvs:
6262
secrets:
63-
- name: {my-product-secrets}
63+
- name: `_<my_product_secrets>_`
6464
- name: {my-product-database-secrets}
6565
extraFiles:
6666
mountPath: /opt/app-root/src
@@ -136,31 +136,36 @@ spec:
136136
`spec.application.extraEnvs.secrets`:::
137137
Enter your environment variables secret name list.
138138
+
139-
.Inject the environment variables in your `{my-product-secrets}` secret
139+
.Inject the environment variables in your {product} secret
140140
====
141141
[source,yaml,subs="+attributes,+quotes"]
142142
----
143143
spec:
144144
application:
145145
extraEnvs:
146146
secrets:
147-
- name: {my-product-secrets}
147+
- name: `_<my_product_secrets>_`
148148
----
149149
====
150150
+
151-
.Inject the environment variables in the `{my-product-secrets}` and `{my-product-database-secrets}` secrets
151+
.Inject the environment variables in the {product} and `{my-product-database-secrets}` secrets
152152
====
153153
[source,yaml,subs="+attributes,+quotes"]
154154
----
155155
spec:
156156
application:
157157
extraEnvs:
158158
secrets:
159-
- name: {my-product-secrets}
159+
- name: `_<my_product_secrets>_`
160160
- name: {my-product-database-secrets}
161161
----
162162
====
163163

164+
[NOTE]
165+
====
166+
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
167+
====
168+
164169
`spec.application.extraFiles.secrets`:::
165170
Enter your certificates files secret name and files list.
166171
+

modules/customizing/proc-customizing-the-backend-secret.adoc

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ You can define your custom {product-short} backend secret.
1010

1111
.Procedure
1212

13-
. To define the {product-short} backend secret,
14-
add to your custom `{my-product-secrets}.txt` file the `BACKEND_SECRET` environment variable with a base64 encoded string.
13+
. To define the {product-short} backend secret, add to your custom `_<my_product_secrets>_.txt` file the `BACKEND_SECRET` environment variable with a base64 encoded string.
1514
Use a unique value for each {product-short} instance.
1615
+
17-
[source,terminal,subs="+attributes"]
16+
[source,yaml,subs="+quotes,+attributes"]
1817
----
19-
$ echo > {my-product-secrets}.txt "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
18+
$ echo > `_<my_product_secrets>_.txt` "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
2019
----
2120
+
22-
.`{my-product-secrets}.txt` example
21+
.`_<my_product_secrets>_.txt` example
2322
----
2423
BACKEND_SECRET=3E2/rIPuZNFCtYHoxVP8wjriffnN1q/z
2524
----

modules/dynamic-plugins/proc-config-dynamic-plugins-rhdh-operator.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can store the configuration for dynamic plugins in a `ConfigMap` object that
1010

1111
[NOTE]
1212
====
13-
If the `pluginConfig` field references environment variables, you must define the variables in your {my-product-secrets} secret.
13+
If the `pluginConfig` field references environment variables, you must define the variables in your `_<my_product_secrets>_` secret.
1414
====
1515

1616
.Procedure

modules/installation/proc-configuring-an-rhdh-instance-with-tls-in-kubernetes.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ data:
119119
<1> The base URL to the Kubernetes control plane. You can run the `kubectl cluster-info` command to get the base URL.
120120
<2> Set the value of this parameter to `false` to enable the verification of the TLS certificate.
121121
<3> Optional: The link to the Kubernetes dashboard managing the ARO cluster.
122-
<4> Optional: Pass the service account token using a `K8S_SERVICE_ACCOUNT_TOKEN` environment variable that you can define in your {my-product-secrets} secret.
123-
<5> Pass the CA data using a `K8S_CONFIG_CA_DATA` environment variable that you can define in your {my-product-secrets} secret.
122+
<4> Optional: Pass the service account token using a `K8S_SERVICE_ACCOUNT_TOKEN` environment variable that you define in your `_<my_product_secrets>_` secret.
123+
<5> Pass the CA data using a `K8S_CONFIG_CA_DATA` environment variable that you define in your `_<my_product_secrets>_` secret.
124124

125125
. Save the configuration changes.
126126

modules/installation/proc-deploy-rhdh-instance-eks.adoc

+5-3
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,20 @@ data:
4444
----
4545
--
4646

47-
. Create a Secret named `{my-product-secrets}` and add a key named `BACKEND_SECRET` with a `Base64-encoded` string as value:
47+
. Create a {product} secret and add a key named `BACKEND_SECRET` with a `Base64-encoded` string as value:
4848
+
4949
--
5050
[source,yaml,subs="+attributes,+quotes"]
5151
----
5252
apiVersion: v1
5353
kind: Secret
5454
metadata:
55-
name: {my-product-secrets}
55+
name: `_<my_product_secrets>_` <1>
5656
stringData:
5757
# TODO: See https://backstage.io/docs/auth/service-to-service-auth/#setup
5858
BACKEND_SECRET: "xxx"
5959
----
60+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the unique identifier for your secret configuration within {product-short}.
6061

6162
[IMPORTANT]
6263
====
@@ -103,8 +104,9 @@ spec:
103104
- name: "app-config-rhdh"
104105
extraEnvs:
105106
secrets:
106-
- name: {my-product-secrets}
107+
- name: `_<my_product_secrets>_` <1>
107108
----
109+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the identifier for your secret configuration within {product-short}.
108110
--
109111

110112
. Create an Ingress resource using the following template, ensuring to customize the names as needed:

modules/installation/proc-deploy-rhdh-instance-gke.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ data:
4545
----
4646
--
4747

48-
. Create a Secret named {my-product-secret} and add a key named `BACKEND_SECRET` with a `Base64-encoded` string as value:
48+
. Create a `_<my_product_secrets>_` secret and add a key named `BACKEND_SECRET` with a `Base64-encoded` string value as shown in the following example:
4949
+
5050
--
51-
.{my-product-secrets} fragment
52-
[source,yaml]
51+
[source,yaml,subs="+quotes,+attributes"]
5352
----
5453
apiVersion: v1
5554
kind: Secret
5655
metadata:
57-
name: {my-product-secret}
56+
name: `_<my_product_secrets>_` <1>
5857
stringData:
5958
# TODO: See https://backstage.io/docs/auth/service-to-service-auth/#setup
6059
BACKEND_SECRET: "xxx"
6160
----
61+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the identifier for your secret configuration within {product-short}.
6262

6363
[IMPORTANT]
6464
====
@@ -88,7 +88,7 @@ kubectl patch serviceaccount default \
8888
+
8989
--
9090
.Custom resource fragment
91-
[source,yaml,subs="attributes+"]
91+
[source,yaml,subs="+quotes,+attributes"]
9292
----
9393
apiVersion: rhdh.redhat.com/v1alpha3
9494
kind: Backstage
@@ -106,14 +106,14 @@ spec:
106106
- name: "app-config-rhdh"
107107
extraEnvs:
108108
secrets:
109-
- name: {my-product-secret}
109+
- name: `_<my_product_secrets>_` <1>
110110
----
111+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the identifier for your secret configuration within {product-short}.
111112
--
112113

113-
. Set up a Google-managed certificate by creating a `ManagedCertificate` object which you must attach to the Ingress.
114+
. Set up a Google-managed certificate by creating a `ManagedCertificate` object which you must attach to the Ingress as shown in the following example:
114115
+
115116
--
116-
.Example of a `ManagedCertificate` object
117117
[source,yaml,subs="attributes+"]
118118
----
119119
apiVersion: networking.gke.io/v1

modules/installation/proc-rhdh-deploy-aks-operator.adoc

+7-5
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,25 @@ data:
114114
----
115115
--
116116

117-
. Create a Secret named {my-product-secrets} and add a key named `BACKEND_SECRET` with a `Base64-encoded` string value as shown in the following example:
117+
. Create a `_<my_product_secrets>_` secret and add a key named `BACKEND_SECRET` with a `Base64-encoded` string value as shown in the following example:
118118
+
119119
--
120-
[source,yaml]
120+
[source,yaml,subs="+attributes,+quotes"]
121121
----
122122
apiVersion: v1
123123
kind: Secret
124124
metadata:
125-
name: {my-product-secret}
125+
name: `_<my_product_secrets>_` <1>
126126
stringData:
127127
BACKEND_SECRET: "xxx"
128128
----
129+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the identifier for your secret configuration within {product-short}.
129130
--
130131

131132
. Create your `{product-custom-resource-type}` custom resource (CR) manifest file named `rhdh.yaml` and include the previously created `rhdh-pull-secret` as follows:
132133
+
133134
--
134-
[source,yaml]
135+
[source,yaml,subs="+attributes,+quotes"]
135136
----
136137
apiVersion: rhdh.redhat.com/v1alpha3
137138
kind: Backstage
@@ -146,8 +147,9 @@ spec:
146147
- name: "app-config-rhdh"
147148
extraEnvs:
148149
secrets:
149-
- name: {my-product-secret}
150+
- name: `_<my_product_secrets>_` <1>
150151
----
152+
<1> `_<my_product_secrets>_` is your preferred {product-short} secret name, where `_<my_product_secrets>_` specifies the identifier for your secret configuration within {product-short}.
151153
--
152154

153155
. Apply the CR manifest to your namespace:

0 commit comments

Comments
 (0)