You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Configuring high availability in a {product} Helm chart deployment
3
4
4
-
When you are deploying {product-short} using the Helm chart, you must set `replicas` to a value greater than `1` in your Helm chart. The default value for `replicas` is `1`.
5
+
When you are deploying {product-short} using the Helm chart, you must set `replicas` to a value greater than `1` in your Helm chart. The default value for `replicas` is `1`.
5
6
6
7
.Procedure
7
-
To configure your {product-short} Helm chart for high availability, complete the following step:
8
-
9
-
* In your Helm chart configuration file, set `replicas` to a value greater than `1`. For example:
8
+
* In your Helm chart configuration file, set `replicas` to a value greater than `1`.
9
+
+
10
+
For example, to configure two replicas (one backup instance):
10
11
+
11
-
====
12
12
[source,yaml,subs="+attributes,+quotes"]
13
13
----
14
14
upstream:
15
15
backstage:
16
-
replicas: _<replicas_value>_ <1>
16
+
replicas: 2
17
17
----
18
-
====
19
-
<1> Set the number of replicas based on the number of backup instances that you want to configure.
= Configuring High availability in a {product} Operator deployment
3
-
4
-
{product-very-short} instances that are deployed with the Operator use configurations in the `{product-custom-resource-type}` custom resource. In the `{product-custom-resource-type}` custom resource, the default value for the `replicas` field is `1`. If you want to configure your {product-very-short} instance for high availability, you must set `replicas` to a value greater than `1`.
3
+
= Configuring high availability in a {product} Operator deployment
5
4
5
+
{product-very-short} instances that are deployed with the Operator use configurations in the `{product-custom-resource-type}` custom resource (CR).
6
+
In the `{product-custom-resource-type}` CR, the default value for the `replicas` field is `1`.
7
+
If you want to configure your {product-very-short} instance for high availability, you must set `replicas` to a value greater than `1`.
6
8
7
9
.Procedure
8
-
9
-
* In your `{product-custom-resource-type}` custom resource, set `replicas` to a value greater than `1`. For example:
10
+
* In your `{product-custom-resource-type}` custom resource (CR), set `replicas` to a value greater than `1`.
11
+
+
12
+
For example, to configure two replicas (one backup instance):
10
13
+
11
-
====
12
14
[source,yaml,subs="+attributes,+quotes"]
13
15
----
14
-
apiVersion: rhdh.redhat.com/v1alpha3
15
-
kind: Backstage
16
-
metadata:
17
-
name: _<your_yaml_file>_
16
+
apiVersion: rhdh.redhat.com/v1alpha3
17
+
kind: Backstage
18
+
metadata:
19
+
name: _<your_yaml_file>_
18
20
spec:
19
21
deployment:
20
22
patch:
21
-
spec:
22
-
...
23
-
replicas: _<replicas_value>_ <1>
24
-
...
23
+
spec:
24
+
replicas: 2
25
25
----
26
-
====
27
-
<1> Set the number of replicas based on the number of backup instances that you want to configure.
= Mounting additional files in your custom configuration using the {product} Operator
3
+
= Mounting additional files in your custom configuration by using the {product} Operator
3
4
4
5
You can use the {product-short} Operator to mount extra files, such as a ConfigMap or Secret, to the container in a preferred location.
5
6
6
-
The `mountPath` field specifies the location where a ConfigMap or Secret is mounted. The behavior of the mount, whether it includes or excludes a `subPath`, depends on the specification of the `key` or `mountPath` fields.
7
+
The `mountPath` field specifies the location where a ConfigMap or Secret is mounted.
8
+
The behavior of the mount, whether it includes or excludes a `subPath`, depends on the specification of the `key` or `mountPath` fields.
7
9
8
10
* If `key` and `mountPath` are not specified: Each key or value is mounted as a `filename` or content with a `subPath`.
9
11
* If `key` is specified with or without `mountPath`: The specified key or value is mounted with a `subPath`.
@@ -15,17 +17,15 @@ The `mountPath` field specifies the location where a ConfigMap or Secret is moun
15
17
* 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.
16
18
====
17
19
18
-
19
20
.Prerequisites
20
21
* You have developer permissions to access the {ocp-short} cluster containing your {product-short} instance using the {openshift-cli}.
21
22
* link:{installing-on-ocp-book-url}[Your {ocp-short} administrator has installed the {product} Operator in {ocp-short}].
22
23
23
24
.Procedure
24
-
25
25
. In {ocp-short}, create your ConfigMap or Secret with the following YAML codes:
26
26
+
27
-
.Minimal `{my-extra-file-configmap}` ConfigMap example
For more information, see xref:provisioning-your-custom-configuration[Provisioning and using your custom {product} configuration].
57
56
58
-
. Set the value of the `configMaps name` to the name of the ConfigMap or `secrets name` to the name of the Secret in your `{product-custom-resource-type}` CR. For example:
57
+
. Set the value of the `configMaps name` to the name of the ConfigMap or `secrets name` to the name of the Secret in your `{product-custom-resource-type}` CR.
58
+
For example:
59
59
+
60
-
====
61
60
[source,yaml,subs="+attributes,+quotes"]
62
61
----
63
62
spec:
@@ -74,8 +73,7 @@ spec:
74
73
mountPath: /my/my-rhdh-secret/path
75
74
76
75
----
77
-
====
78
-
76
+
+
79
77
[NOTE]
80
78
====
81
79
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
.`{my-product-cr-name}.yaml` custom resource example with dynamic plugins and RBAC policies config maps, and external PostgreSQL database secrets.
45
-
====
43
+
`{my-product-cr-name}.yaml` custom resource example with dynamic plugins and RBAC policies config maps, and external PostgreSQL database secrets:
44
+
+
46
45
[source,yaml,subs="+attributes,+quotes"]
47
46
----
48
47
apiVersion: rhdh.redhat.com/v1alpha3
@@ -71,21 +70,19 @@ spec:
71
70
database:
72
71
enableLocalDb: false
73
72
----
74
-
====
75
73
76
74
Mandatory fields::
77
75
78
76
No fields are mandatory.
79
-
You can create an empty {product-custom-resource-type} CR
80
-
and run {product-short} with the default configuration.
77
+
You can create an empty {product-custom-resource-type} CR and run {product-short} with the default configuration.
81
78
82
79
Optional fields::
83
80
84
81
`spec.application.appConfig.configMaps`:::
85
82
Enter your config map name list.
86
83
+
87
-
.Mount files in the `{my-app-config-config-map}` config map.
88
-
====
84
+
Mount files in the `{my-app-config-config-map}` config map:
85
+
+
89
86
[source,yaml,subs="+attributes,+quotes"]
90
87
----
91
88
spec:
@@ -95,10 +92,9 @@ spec:
95
92
configMaps:
96
93
- name: {my-app-config-config-map}
97
94
----
98
-
====
99
95
+
100
-
.Mount files in the `{my-app-config-config-map}` and `rbac-policies` config maps.
101
-
====
96
+
Mount files in the `{my-app-config-config-map}` and `rbac-policies` config maps:
97
+
+
102
98
[source,yaml,subs="+attributes,+quotes"]
103
99
----
104
100
spec:
@@ -109,13 +105,12 @@ spec:
109
105
- name: {my-app-config-config-map}
110
106
- name: rbac-policies
111
107
----
112
-
====
113
108
114
109
`spec.application.extraEnvs.envs`:::
115
110
Optionally, enter your additional environment variables that are not secrets, such as xref:proc-configuring-proxy-in-operator-deployment_running-behind-a-proxy[your proxy environment variables].
116
111
+
117
-
.Inject your `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables.
118
-
====
112
+
Inject your `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables:
113
+
+
119
114
[source,yaml,subs="+attributes,+quotes"]
120
115
----
121
116
spec:
@@ -129,13 +124,12 @@ spec:
129
124
- name: NO_PROXY
130
125
value: 'localhost,example.org'
131
126
----
132
-
====
133
127
134
128
`spec.application.extraEnvs.secrets`:::
135
129
Enter your environment variables secret name list.
136
130
+
137
-
.Inject the environment variables in your {product} secret
138
-
====
131
+
Inject the environment variables in your {product} secret:
132
+
+
139
133
[source,yaml,subs="+attributes,+quotes"]
140
134
----
141
135
spec:
@@ -144,10 +138,9 @@ spec:
144
138
secrets:
145
139
- name: _<my_product_secrets>_
146
140
----
147
-
====
148
141
+
149
-
.Inject the environment variables in the {product} and `{my-product-database-secrets}` secrets
150
-
====
142
+
Inject the environment variables in the {product} and `{my-product-database-secrets}` secrets:
143
+
+
151
144
[source,yaml,subs="+attributes,+quotes"]
152
145
----
153
146
spec:
@@ -157,8 +150,7 @@ spec:
157
150
- name: _<my_product_secrets>_
158
151
- name: {my-product-database-secrets}
159
152
----
160
-
====
161
-
153
+
+
162
154
[NOTE]
163
155
====
164
156
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
@@ -167,7 +159,8 @@ spec:
167
159
`spec.application.extraFiles.secrets`:::
168
160
Enter your certificates files secret name and files list.
169
161
+
170
-
.Mount the `postgres-crt.pem`, `postgres-ca.pem`, and `postgres-key.key` files contained in the `{my-product-database-certificates-secrets}` secret
162
+
Mount the `postgres-crt.pem`, `postgres-ca.pem`, and `postgres-key.key` files contained in the `{my-product-database-certificates-secrets}` secret:
163
+
+
171
164
[source,yaml,subs="+attributes,+quotes"]
172
165
----
173
166
spec:
@@ -182,15 +175,17 @@ spec:
182
175
`spec.database.enableLocalDb`:::
183
176
Enable or disable the local PostgreSQL database.
184
177
+
185
-
.Disable the local PostgreSQL database generation to use an external postgreSQL database
178
+
Disable the local PostgreSQL database generation to use an external postgreSQL database:
179
+
+
186
180
[source,yaml,subs="+attributes,+quotes"]
187
181
----
188
182
spec:
189
183
database:
190
184
enableLocalDb: false
191
185
----
192
186
+
193
-
.On a development environment, use the local PostgreSQL database
187
+
On a development environment, use the local PostgreSQL database:
188
+
+
194
189
[source,yaml,subs="+attributes,+quotes"]
195
190
----
196
191
spec:
@@ -200,8 +195,8 @@ spec:
200
195
201
196
`spec.deployment`:::
202
197
Optionally, xref:configuring-the-deployment[enter your deployment configuration].
203
-
204
-
. Apply your {product-custom-resource-type} CR to start or update your {product-short} instance.
198
+
+
199
+
Apply your {product-custom-resource-type} CR to start or update your {product-short} instance:
0 commit comments