From 37d291abb95ef7b41547053adf10f85175dceba9 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 19 Dec 2024 17:03:45 +0100 Subject: [PATCH] Update makefile to provide proper UI link Signed-off-by: Ondra Machacek --- Makefile | 5 +++-- deploy/k8s/migration-planner.yaml | 10 ++++++++++ deploy/k8s/migration-planner.yaml.template | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 842b7ed..0af1f82 100644 --- a/Makefile +++ b/Makefile @@ -132,8 +132,9 @@ deploy-on-openshift: ls deploy/k8s | awk '/secret|service/' | xargs -I {} oc apply -n ${MIGRATION_PLANNER_NAMESPACE} -f deploy/k8s/{} oc create route edge planner --service=migration-planner-ui -n ${MIGRATION_PLANNER_NAMESPACE} || true oc expose service migration-planner-agent -n ${MIGRATION_PLANNER_NAMESPACE} --name planner-agent || true - @config_server=$$(oc get route planner-agent -o jsonpath='{.spec.host}'); \ - oc create secret generic migration-planner-secret -n ${MIGRATION_PLANNER_NAMESPACE} --from-literal=config_server=http://$$config_server || true + config_server=$$(oc get route planner-agent -o jsonpath='{.spec.host}'); \ + config_server_ui=$$(oc get route planner -o jsonpath='{.spec.host}'); \ + oc create secret generic migration-planner-secret -n ${MIGRATION_PLANNER_NAMESPACE} --from-literal=config_server=http://$$config_server --from-literal=config_server_ui=https://$$config_server_ui/migrate/wizard || true ls deploy/k8s | awk '! /secret|service|template/' | xargs -I {} oc apply -n ${MIGRATION_PLANNER_NAMESPACE} -f deploy/k8s/{} undeploy-on-openshift: diff --git a/deploy/k8s/migration-planner.yaml b/deploy/k8s/migration-planner.yaml index 78bb389..dfec1f4 100644 --- a/deploy/k8s/migration-planner.yaml +++ b/deploy/k8s/migration-planner.yaml @@ -36,6 +36,16 @@ spec: secretKeyRef: name: migration-planner-secret key: config_server + - name: CONFIG_SERVER_UI + valueFrom: + secretKeyRef: + name: migration-planner-secret + key: config_server_ui + - name: MIGRATION_PLANNER_AGENT_IMAGE + value: quay.io/kubev2v/migration-planner-agent + - name: INSECURE_REGISTRY + value: "true" + volumeMounts: volumeMounts: - name: migration-planner-config mountPath: "/.migration-planner/config.yaml" diff --git a/deploy/k8s/migration-planner.yaml.template b/deploy/k8s/migration-planner.yaml.template index 3d78205..e3f67b1 100644 --- a/deploy/k8s/migration-planner.yaml.template +++ b/deploy/k8s/migration-planner.yaml.template @@ -36,6 +36,11 @@ spec: secretKeyRef: name: migration-planner-secret key: config_server + - name: CONFIG_SERVER_UI + valueFrom: + secretKeyRef: + name: migration-planner-secret + key: config_server_ui - name: MIGRATION_PLANNER_AGENT_IMAGE value: @MIGRATION_PLANNER_AGENT_IMAGE@ - name: INSECURE_REGISTRY