diff --git a/modules/installation/proc-config-rhdh-custom-resource.adoc b/modules/installation/proc-config-rhdh-custom-resource.adoc index 0691d5cb6..f5021a940 100644 --- a/modules/installation/proc-config-rhdh-custom-resource.adoc +++ b/modules/installation/proc-config-rhdh-custom-resource.adoc @@ -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. \ No newline at end of file +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--.;]`. + +[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. +====