Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLS-1232 - Adding consoleURL to results of get credentials #1617

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ This StepAction queries the EaaS hub cluster to get the kubeconfig for an epheme
|name|description|
|---|---|
|kubeconfig|Relative path to the kubeconfig in the mounted volume|
|username|The username for the cluster|
|passwordPath|Relative path to the password file in the mounted volume|
|apiServerURL|API server URL of the cluster|
|consoleURL|Console URL of the cluster|

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ spec:
description: Relative path to the password file in the mounted volume
- name: apiServerURL
description: API server URL of the cluster
- name: consoleURL
description: Console URL of the cluster
env:
- name: CLUSTER_NAME
value: "$(params.clusterName)"
Expand Down Expand Up @@ -76,3 +78,7 @@ spec:
API_SERVER_URL=$("${OC[@]}" get cti "$CLUSTER_NAME" -o=jsonpath='{.status.apiServerURL}')
echo "API Server URL: $API_SERVER_URL"
echo -n "$API_SERVER_URL" > "$(step.results.apiServerURL.path)"
export KUBECONFIG=$CLUSTER_KUBECONFIG
CONSOLE_URL=https://$(oc get route console -n openshift-console -o go-template --template="{{.spec.host}}")
echo "Console URL: $CONSOLE_URL"
echo -n "$CONSOLE_URL" > "$(step.results.consoleURL.path)"