-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc create doesn't honour -o json in same way that oc new-app does. #11242
Comments
So, this is an important issue because we are very inconsistent today. The way upstream commands (like
Problem is, we have a number of commands where But there's backwards compatibility. @juanvallejo can you link the |
Sure:
|
We will not break back compact on create or new-app for a long time, so
let's find work arounds.
|
The only way to avoid backward compatibility issues would be to keep that if |
Also related PR (adds |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle frozen |
This should be fixed by now |
@soltysh: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When you run
oc new-app
and use the-o json
option it will run checks to see if the application creation might work, but doesn't actually do it, instead outputting what would be created in the format requested by the-o
option, JSON in this case.If you use
oc create
, qualifying it with the type of resource you want to create, such as aroute
and use-o json
, then it goes off and creates the resource anyway and doesn't output anything.I would expect, and I believe it would be much more useful, if
-o json
worked the same was asoc new-app
when when usingoc create
to create specific resources. Thus for example, running:should do nothing except output the JSON definition of what would be created.
This would be useful for validating what gets created is what you intend to be created before you do it, but also that it provides a good way of creating definitions for specific scenarios, which you could then cut and paste what would be created, into a template.
I use
route
here as an example but expect that this could be applied to all resourcesoc create
can explicitly create.I can't see that this would conflict with existing usage of
-o
option and in fact-o
onoc new-app
already seems to be overloaded in that can bename
for succinct output of what would be created, andjson
oryaml
to give definition of what would be created but don't do anything.The text was updated successfully, but these errors were encountered: