Skip to content

Commit a614f41

Browse files
authored
Merge branch 'main' into e2e-transitive-groups-ownership
2 parents 0461d4a + 2a9a464 commit a614f41

File tree

7 files changed

+74
-3
lines changed

7 files changed

+74
-3
lines changed

.ibm/pipelines/jobs/operator.sh

+19
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ initiate_operator_deployments() {
6262
deploy_rhdh_operator "${DIR}" "${NAME_SPACE_RBAC}"
6363
}
6464

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+
6582
handle_operator() {
6683
oc_login
6784

@@ -73,4 +90,6 @@ handle_operator() {
7390
initiate_operator_deployments
7491
check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${url}"
7592
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${rbac_url}"
93+
94+
run_operator_runtime_config_change_tests
7695
}

.ibm/pipelines/resources/postgres-db/postgres-cred.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ data:
99
POSTGRES_HOST: dG1w
1010
PGSSLMODE: cmVxdWlyZQ==
1111
NODE_EXTRA_CA_CERTS: L29wdC9hcHAtcm9vdC9zcmMvcG9zdGdyZXMtY3J0LnBlbQ==
12+
RHDH_RUNTIME_URL: dG1w
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
app:
2+
title: Red Hat Developer Hub
3+
baseUrl: ${RHDH_RUNTIME_URL}
4+
backend:
5+
auth:
6+
externalAccess:
7+
- type: legacy
8+
options:
9+
subject: legacy-default-config
10+
secret: "secret"
11+
baseUrl: ${RHDH_RUNTIME_URL}
12+
cors:
13+
origin: ${RHDH_RUNTIME_URL}
14+
database:
15+
connection: # configure Backstage DB connection parameters
16+
host: ${POSTGRES_HOST}
17+
port: ${POSTGRES_PORT}
18+
user: ${POSTGRES_USER}
19+
password: ${POSTGRES_PASSWORD}
20+
auth:
21+
environment: development
22+
providers:
23+
guest:
24+
dangerouslyAllowOutsideDevelopment: true

.ibm/pipelines/resources/rhdh-operator/rhdh-start-rbac.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: rhdh-rbac
55
spec:
66
application:
7-
image: 'quay.io/rhdh/rhdh-hub-rhel9:next'
7+
image: "quay.io/rhdh-community/rhdh:next"
88
appConfig:
99
configMaps:
1010
- name: app-config-rhdh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
kind: Backstage
2+
apiVersion: rhdh.redhat.com/v1alpha2
3+
metadata:
4+
name: rhdh
5+
spec:
6+
application:
7+
image: 'quay.io/rhdh-community/rhdh:next'
8+
appConfig:
9+
configMaps:
10+
- name: app-config-rhdh
11+
mountPath: /opt/app-root/src
12+
extraFiles:
13+
mountPath: /opt/app-root/src
14+
secrets:
15+
- name: postgres-crt
16+
key: postgres-crt.pem
17+
extraEnvs:
18+
secrets:
19+
- name: postgres-cred
20+
route:
21+
enabled: true
22+
database:
23+
enableLocalDb: false

.ibm/pipelines/resources/rhdh-operator/rhdh-start.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: rhdh
55
spec:
66
application:
7-
image: 'quay.io/rhdh/rhdh-hub-rhel9:next'
7+
image: 'quay.io/rhdh-community/rhdh:next'
88
appConfig:
99
configMaps:
1010
- name: app-config-rhdh

e2e-tests/playwright/e2e/verify-tls-config-health-check.spec.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import { KubeClient } from "../utils/kube-client";
55
test.describe
66
.serial("Verify TLS configuration with Postgres DB health check", () => {
77
const namespace = process.env.NAME_SPACE_RUNTIME || "showcase-runtime";
8-
const deploymentName = "rhdh-backstage";
8+
const job: string = process.env.JOB_NAME;
9+
let deploymentName = "rhdh-backstage";
10+
if (job.includes("operator")) {
11+
deploymentName = "backstage-rhdh";
12+
}
913
const secretName = "postgres-cred";
1014
const hostLatest2 = Buffer.from(process.env.RDS_2_HOST).toString("base64");
1115
const hostLatest3 = Buffer.from(process.env.RDS_3_HOST).toString("base64");

0 commit comments

Comments
 (0)