generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RHIDP-2384: Move procedural steps to Configuring the RHDH CR section
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
- Loading branch information
Showing
1 changed file
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,53 @@ | ||
[id="proc-config-rhdh-custom-resource_{context}"] | ||
= Configuring the {product-short} Custom Resource | ||
|
||
Updates to the Backstage custom resource (CR) are automatically handled by the {product} Operator. However, updates to resources referenced by the CR, such as ConfigMaps or Secrets, are not updated automatically unless the CR itself is updated. If you want to update resources referenced by the CR, then you must manually delete the Backstage Deployment so that the Operator can re-create it with the updated resources. | ||
You can change the configuration of the Custom Resource (CR) for your {product} instance. | ||
// Explain why a user would want/need to do this. | ||
|
||
[NOTE] | ||
==== | ||
Updates to the Backstage CR are automatically handled by the {product} Operator. However, updates to resources referenced by the CR, such as ConfigMaps or Secrets, are not updated automatically unless the CR itself is updated. If you want to update resources referenced by the CR, then you must manually delete the Backstage Deployment so that the Operator can re-create it with the updated resources. | ||
==== | ||
|
||
// .Prerequisites | ||
// You have an administrative role in {product} | ||
|
||
.Procedure | ||
|
||
To configure your {product-short} CR file, complete the following steps: | ||
|
||
. Add a custom application configuration file to {ocp-short} and reference it in the CR. In {ocp-short}, you can use the following example as a base template to create a ConfigMap, such as `app-config-rhdh.yaml`: | ||
+ | ||
[source,yaml,subs="attributes+"] | ||
---- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: app-config-rhdh | ||
data: | ||
"app-config-rhdh.yaml": | | ||
app: | ||
title: {product} | ||
baseUrl: https://backstage-developer-hub-my-ns.apps.ci-ln-vtkzr22-72292.origin-ci-int-gce.dev.rhcloud.com | ||
backend: | ||
auth: | ||
keys: | ||
- secret: "${BACKEND_SECRET}" | ||
baseUrl: https://backstage-backstage-sample-my-ns.apps.ci-ln-vtkzr22-72292.origin-ci-int-gce.dev.rhcloud.com | ||
cors: | ||
origin: https://backstage-backstage-sample-my-ns.apps.ci-ln-vtkzr22-72292.origin-ci-int-gce.dev.rhcloud.com | ||
---- | ||
+ | ||
. Use the mandatory backend authentication key for {product} to reference an environment variable defined in an {ocp-short} Secret. | ||
. Set the external URL of your {product} instance in the `app.baseUrl`, `backend.baseUrl` and `backend.cors.origin` fields of the application configuration. By default, the URL is similar to the following example: | ||
`pass:c[https://backstage-<CUSTOM_RESOURCE_NAME>-<NAMESPACE_NAME>.<OPENSHIFT_INGRESS_DOMAIN>;]`. | ||
|
||
[NOTE] | ||
==== | ||
You can use the `oc get ingresses.config/cluster -o jsonpath='{.spec.domain}'` command to display your ingress domain. If you want to use a different host or sub-domain, customize the `Custom Resource spec.application.route field` and adjust the application configuration accordingly. | ||
==== | ||
|
||
[NOTE] | ||
==== | ||
You are responsible for protecting your {product} installation from external and unauthorized access. Manage the backend auth key like any other secret. Meet strong password requirements, do not expose it in any configuration files, and only inject it into configuration files as an environment variable. | ||
==== |