Skip to content

Commit

Permalink
Other fixes
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Nov 5, 2024
1 parent ab48bd2 commit b203fdb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-ocp-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
'
kubectl scale deploy "${WORKFLOW_NAME}" --replicas=0
kubectl get pod -A
kubectl wait --for=condition=Ready=true pods -l app="${WORKFLOW_NAME}" --timeout=1m
kubectl wait --for=condition=Ready=true pods -l app="${WORKFLOW_NAME}" --timeout=1m || kubectl describe pod -l app="${WORKFLOW_NAME}"
- name: Test workflow is responsive
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/greeting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
helm install greeting greeting
WORKFLOW_NAME=greeting
kubectl get pod -A
kubectl wait --for=condition=Ready=true pods -l app="${WORKFLOW_NAME}" --timeout=1m
kubectl wait --for=condition=Ready=true pods -l app="${WORKFLOW_NAME}" --timeout=1m || kubectl describe pod -l app="${WORKFLOW_NAME}"
- name: Test workflow is responsive
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mta-v7.x-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
)" charts/mta-v7.x/templates/0?-sonataflow_mta-analysis-v7.yaml
# we are on k8s, not OCP, some resources are not available
rm -rf charts/mta-v7.x/templates/00-mta-operator.yaml
rm -rf charts/mta-v7.x/templates/00-tackle-resources.yaml
K8S_INSTALL=1 MTA_HELM_REPO=charts/mta-v7.x/ TARGET_NS=default ./docs/main/mta-v7.x/install-mta-v7.sh
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions docs/main/mta-v7.x/install-mta-v7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ fi

helm install mta ${MTA_HELM_REPO} -n ${TARGET_NS}
WORKFLOW_NAME=mta-analysis-v7
"${CLUSTER_CLIENT}" -n ${TARGET_NS} patch secret "${WORKFLOW_NAME}-creds" --type merge -p '{"data": { "NOTIFICATIONS_BEARER_TOKEN": "'$("${CLUSTER_CLIENT}" get secrets -n rhdh-operator backstage-backend-auth-secret -o go-template='{{ .data.BACKEND_SECRET }}')'"}}'
if [[ -z "${K8S_INSTALL}" ]]; then
"${CLUSTER_CLIENT}" -n ${TARGET_NS} patch secret "${WORKFLOW_NAME}-creds" --type merge -p '{"data": { "NOTIFICATIONS_BEARER_TOKEN": "'$("${CLUSTER_CLIENT}" get secrets -n rhdh-operator backstage-backend-auth-secret -o go-template='{{ .data.BACKEND_SECRET }}')'"}}'
BACKSTAGE_NOTIFICATIONS_URL=http://backstage-backstage.rhdh-operator

while [[ $retry_count -lt 5 ]]; do
"${CLUSTER_CLIENT}" -n openshift-mta get route mta && break || sleep 60
retry_count=$((retry_count + 1))
done
MTA_ROUTE="https://"$("${CLUSTER_CLIENT}" -n openshift-mta get route mta -o yaml | yq -r .spec.host)
else
"${CLUSTER_CLIENT}" -n ${TARGET_NS} patch secret "${WORKFLOW_NAME}-creds" --type merge -p '{"data": { "NOTIFICATIONS_BEARER_TOKEN": "'$("${CLUSTER_CLIENT}" get secret orchestrator-auth -o jsonpath={.data.backend-secret})'"}}'
BACKSTAGE_NOTIFICATIONS_URL=http://orchestrator-backstage.default.svc.cluster.local:7007
MTA_ROUTE="http://tackle-ui.my-konveyor-operator.svc.cluster.local:8080"
fi
BACKSTAGE_NOTIFICATIONS_URL=http://backstage-backstage.rhdh-operator
"${CLUSTER_CLIENT}" -n "${TARGET_NS}" patch sonataflow mta-analysis-v7 --type merge -p '{"spec": { "podTemplate": { "container": { "env": [{"name": "BACKSTAGE_NOTIFICATIONS_URL", "value": "'${BACKSTAGE_NOTIFICATIONS_URL}'"}, {"name": "MTA_URL", "value": "'${MTA_ROUTE}'"}]}}}}'
"${CLUSTER_CLIENT}" -n "${TARGET_NS}" wait --for=condition=Ready=true pods -l app="${WORKFLOW_NAME}" --timeout=1m
4 changes: 2 additions & 2 deletions e2e/move2kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

# holds the pid of the port forward process for cleanups
export port_forward_pid=""
export M2K_INSTANCE_NS=move2kube
export M2K_INSTANCE_NS="move2kube"

function cleanup() {
echo "cleanup $?"
Expand All @@ -27,7 +27,7 @@ sleep 3
echo "Proxy Janus-idp port ✅"

echo "Proxy move2kube instance port ⏳"
kubectl -n "${M2K_INSTANCE_NS}"port-forward svc/move2kube-instance-svc 8080:8080 &
kubectl -n "${M2K_INSTANCE_NS}" port-forward svc/move2kube-instance-svc 8080:8080 &
move2kube_port_forward_pid="$!"
sleep 3
echo "Proxy move2kube instance port ✅"
Expand Down

0 comments on commit b203fdb

Please sign in to comment.