Skip to content

Commit

Permalink
Update makefile to provide proper UI link
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Machacek <[email protected]>
  • Loading branch information
machacekondra committed Dec 19, 2024
1 parent 0a8401b commit 37d291a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions deploy/k8s/migration-planner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions deploy/k8s/migration-planner.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37d291a

Please sign in to comment.