-
Notifications
You must be signed in to change notification settings - Fork 243
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
odo dev/deploy should display a warning about default namespace on cluster #6688
odo dev/deploy should display a warning about default namespace on cluster #6688
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
…uster Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…er or podman Signed-off-by: Parthvi Vala <pvala@redhat.com> Co-authored-by: Armel Soro <armel@rm3l.org> Signed-off-by: Parthvi Vala <pvala@redhat.com>
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.
In terms of UX, what do you think about adding an empty line between the header and the warning message? Maybe it's just me, but I currently find the warning to be too close to the logo:
$ odo deploy
__
/ \__ Running the application in Deploy mode using warning-default-ns-test Devfile
\__/ \ Namespace: default
/ \__/ odo version: v3.8.0
\__/
⚠ You are using "default" project, odo may not work as expected in the default project.
⚠ You may set a new project by running `odo create project <name>`, or set an existing one by running `odo set project <name>`
↪ Executing command:
[...]
…d of default Signed-off-by: Parthvi Vala <pvala@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Thanks for the changes!
What type of PR is this:
/kind bug
What does this PR do / why we need it:
This PR adds a warning if the user is using a default namespace.
This PR also modifies
helper.IsKubernetesCluster
to work ifKUBERNETES=true,t,1,T,true,True,TRUE
.Which issue(s) this PR fixes:
Fixes #5591
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
odo set namespace default
odo init --devfile go --starter go-starter --devfile-version latest
odo dev
should display the warning right awayPODMAN_CMD=echo odo deploy
should display the warning right away.If you are on an OpenShift cluster, it will use
project
instead ofnamespace
.