@@ -62,6 +62,23 @@ initiate_operator_deployments() {
62
62
deploy_rhdh_operator " ${DIR} " " ${NAME_SPACE_RBAC} "
63
63
}
64
64
65
+ run_operator_runtime_config_change_tests () {
66
+ # Deploy `showcase-runtime` to run tests that require configuration changes at runtime
67
+ configure_namespace " ${NAME_SPACE_RUNTIME} "
68
+ local runtime_url=" https://backstage-${RELEASE_NAME} -${NAME_SPACE_RUNTIME} .${K8S_CLUSTER_ROUTER_BASE} "
69
+ sed -i " s|POSTGRES_USER:.*|POSTGRES_USER: $RDS_USER |g" " ${DIR} /resources/postgres-db/postgres-cred.yaml"
70
+ sed -i " s|POSTGRES_PASSWORD:.*|POSTGRES_PASSWORD: $( echo -n $RDS_PASSWORD | base64 -w 0) |g" " ${DIR} /resources/postgres-db/postgres-cred.yaml"
71
+ sed -i " s|POSTGRES_HOST:.*|POSTGRES_HOST: $( echo -n $RDS_1_HOST | base64 -w 0) |g" " ${DIR} /resources/postgres-db/postgres-cred.yaml"
72
+ sed -i " s|RHDH_RUNTIME_URL:.*|RHDH_RUNTIME_URL: $( echo -n $runtime_url | base64 -w 0) |g" " ${DIR} /resources/postgres-db/postgres-cred.yaml"
73
+ oc apply -f " $DIR /resources/postgres-db/postgres-crt-rds.yaml" -n " ${NAME_SPACE_RUNTIME} "
74
+ oc apply -f " $DIR /resources/postgres-db/postgres-cred.yaml" -n " ${NAME_SPACE_RUNTIME} "
75
+ oc apply -f " $DIR /resources/postgres-db/dynamic-plugins-root-PVC.yaml" -n " ${NAME_SPACE_RUNTIME} "
76
+ create_app_config_map " $DIR /resources/postgres-db/rds-app-config.yaml" " ${NAME_SPACE_RUNTIME} "
77
+ local runtime_url=" https://backstage-${RELEASE_NAME} -${NAME_SPACE_RUNTIME} .${K8S_CLUSTER_ROUTER_BASE} "
78
+ oc apply -f " $DIR /resources/rhdh-operator/rhdh-start-runtime.yaml" -n " ${NAME_SPACE_RUNTIME} "
79
+ check_and_test " ${RELEASE_NAME} " " ${NAME_SPACE_RUNTIME} " " ${runtime_url} "
80
+ }
81
+
65
82
handle_operator () {
66
83
oc_login
67
84
@@ -73,4 +90,6 @@ handle_operator() {
73
90
initiate_operator_deployments
74
91
check_and_test " ${RELEASE_NAME} " " ${NAME_SPACE} " " ${url} "
75
92
check_and_test " ${RELEASE_NAME_RBAC} " " ${NAME_SPACE_RBAC} " " ${rbac_url} "
93
+
94
+ run_operator_runtime_config_change_tests
76
95
}
0 commit comments