Open epnaveen opened 2 months ago
Hi @epnaveen and thanks for reporting this issue. The workflow is installed with defaults value that match the RHDH installed instance by the orchestrator. For running against an existing RHDH instance, there is a need to update the configmap that points to the existing RHDH service (no need to create a dedicated service for it). See https://github.com/parodos-dev/serverless-workflows-config/blob/main/charts/create-ocp-project/templates/01-configmap_create-ocp-project-props.yaml#L5
apiVersion: v1
data:
application.properties: |
# Backstage Notifications service
quarkus.rest-client.notifications.url=${BACKSTAGE_NOTIFICATIONS_URL:http://backstage-backstage.rhdh-operator}
quarkus.openapi-generator.notifications.auth.BearerToken.bearer-token=${NOTIFICATIONS_BEARER_TOKEN:-}
...
BACKSTAGE_NOTIFICATIONS_URL is a variable to points to the existing RHDH instance. There are several options to set this variable:
http://backstage-backstage.rhdh-operator
with yourscreate-ocp-project
Sonataflow CR in sonataflow-infra
and set the env var under
podTemplate:
container:
env:
- name: NOTIFICATIONS_BEARER_TOKEN
- value: http://<existing rhdh service>
create-ocp-project-creds
secret (this resources is a good fit for credentials, but can be used for any env-var)Any of the option will make the env variable available for the existing workflow Quarkus service that serves the workflow. Pls note that same will have to be applied for other required env-vars as defined in https://github.com/parodos-dev/serverless-workflows-config/blob/main/charts/create-ocp-project/templates/01-configmap_create-ocp-project-props.yaml.
There is a place for improvement in the docs for this section and I'll make sure it is better explained.
There is a section that refers to that part: https://github.com/parodos-dev/serverless-workflows-config/blob/main/charts/create-ocp-project/INSTALL.md#environment-variables
Scenario:
RHDH already installed on OpenShift (4.15.30_1558_openshift) - This is ROKS on IBM Cloud
Installed Orchestrator by following instructions here (skipped a few steps to adjust to existing install of RHDH)
Verified Orchestrator functions by testing the
greetings
workflowInstalled
create-ocp-project
workflow by following instructions located hereA test run of the workflow failed with
Unable to invoke request: java.net.UnknownHostException: backstage-backstage.rhdh-operator: Name or service not known
errorExpectation: This error should not have occurred
Reasoning:
backstage-backstage
anywhere during the set up of any of the aforementionedcreate-ocp-project
workflow should have detected the existing servicebackstage-developer-hub
automaticallyNote: I worked around the issue by creating a new service called
backstage-backsatage
. Didn’t touch the stock service (backstage-developer-hub
) as am afraid that it may break something else. create-ocp-project-5595448f95-7cw2t-workflow.log