-
Notifications
You must be signed in to change notification settings - Fork 244
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
Updates environment variable output #2213
Updates environment variable output #2213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to make changes at: https://github.com/openshift/odo/blob/92ff85440599b15e89f21c109cf8dafe2277cbb7/tests/integration/servicecatalog/cmd_link_unlink_test.go#L202 and: https://github.com/openshift/odo/blob/92ff85440599b15e89f21c109cf8dafe2277cbb7/tests/integration/servicecatalog/cmd_link_unlink_test.go#L208
bd14112
to
99ff50b
Compare
Thanks @dharmit :) fixed! |
/test v4.2-integration |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharmit The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Bolds the info message for outputting the environment variables as well as changes the grammar.
99ff50b
to
d9d2835
Compare
Changed the output a bit, let me know what you think @kadel @girishramnani ~/nodejs-ex master ✗ 351d ◒ ⍉
▶ odo unlink dh-mysql-apb
✓ Service dh-mysql-apb has been successfully unlinked from the component frontend
The below secret environment variables were removed from the 'frontend' component:
· DB_USER
· DB_HOST
· DB_NAME
· DB_PASSWORD
· DB_PORT
· DB_TYPE
~/nodejs-ex master ✗ 351d ◒
▶ odo link dh-mysql-apb
✓ Service dh-mysql-apb has been successfully linked from the component frontend
The below secret environment variables were added to the 'frontend' component:
· DB_PASSWORD
· DB_PORT
· DB_TYPE
· DB_USER
· DB_HOST
· DB_NAME
You can now access the environment variables from within the component pod, for example:
$DB_NAME is now available within component dh-mysql-apb |
IMHO, this will be confusing to the users who're not familiar with OpenShift terminology. I think we're trying to abstract most things about OpenShift/oc via odo. A user who's not aware of what a Besides that, |
It will now look like this: You can now access the environment variables from within the component pod, for example:
$DB_NAME is now available within component dh-mysql-apb |
The last statement is not true. /hold |
@cdrage the issue mentioned by tomas seems to be happening because the first argument is taken as component name so you might have to get the component name from the localConfigInfo or a better option might be to make |
The output was actually incorrect.. some copy-and-paste foo must of messed it up, but here is the correct output: ▶ odo link mongodb-persistent
✓ Service mongodb-persistent has been successfully linked from the component nodejs-nodejs-ex-eapl
The below secret environment variables were added to the 'nodejs-nodejs-ex-eapl' component:
· admin_password
· database_name
· password
· uri
· username
You can now access the environment variables from within the component pod, for example:
$username is now available as a variable within component nodejs-nodejs-ex-eapl |
ca31d89
to
083bf18
Compare
From the code, it seemed that component name was populated from the first arg, I could be wrong |
/hold cancel |
/lgtm |
@girishramnani See line: https://github.com/openshift/odo/blob/083bf1852627793927304f24a61cf21b3011f6ca/pkg/odo/cli/component/common_link.go#L118 previously used in the code for Was simply a bad copy and paste from me. The code is correct :) |
/retest Please review the full test history for this PR and help us cut down flakes. |
Bolds the info message for outputting the environment variables as well
as changes the grammar.