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

oc create should support creating buildconfigs #14138

Closed
soltysh opened this issue May 11, 2017 · 9 comments
Closed

oc create should support creating buildconfigs #14138

soltysh opened this issue May 11, 2017 · 9 comments
Assignees

Comments

@soltysh
Copy link
Contributor

soltysh commented May 11, 2017

Our oc create supports several resources, but no buildConfigs, as of yet. The only CLI for creating BC is oc new-app or oc new-build which aside from the BC creates a few additional resources.

@bparees
Copy link
Contributor

bparees commented May 11, 2017

this is going to require a huge number of flags to be useful (even worse than new-build/new-app today).... can you give me a use case for why new-build/new-app are not the right answer?

@soltysh
Copy link
Contributor Author

soltysh commented May 11, 2017

Simplicity of usage, I want to create BC and only that, without any other accompanying resources. I don't want to create BC by hand because I don't remember the yaml structure and I'm lazy to do it everytime I want to create a BC. With reasonable flags I should be able to create a sketch of a BC with oc create buildconfig and pick from there to do more when I need.

@bparees
Copy link
Contributor

bparees commented May 11, 2017

With reasonable flags I should be able to create a sketch of a BC with oc create buildconfig and pick from there to do more when I need.

i disagree that this is possible with anything less than a half dozen flags.

for a minimal buildconfig you need:

  1. a source repo
  2. a builder image
    a) is it an imagestream or a dockerimage reference?
  3. a destination for the output
    a) is it an imagestream or a dockerimage reference?
  4. a build strategy

i'll create the card, but i'm worried we're just creating another version of new-app where every person who goes to use it is going to come back and say "can you add a flag so i can specify X on my buildconfig? i don't want to edit it afterwards".

@bparees
Copy link
Contributor

bparees commented May 11, 2017

trello'd https://trello.com/c/vqI6QomG

@bparees bparees closed this as completed May 11, 2017
@soltysh
Copy link
Contributor Author

soltysh commented May 11, 2017

From what you've pointed out is just 4 flags where source repo is the required param. By definition oc create should be simple, that's the whole point, if you need more use oc new-app/new-build :)

@bparees
Copy link
Contributor

bparees commented May 11, 2017

From what you've pointed out is just 4 flags where source repo is the required param.

they're all required parameters. just the source repo is not sufficient for us to do anything.

And it's 6 flags because for flag (2) and (3) we either need:

--from-image-stream/--from-docker-image
--to-image-stream/--to-docker-image

or --from-image --as-imagestream/--as-dockerimage

or some other disambiguation as to whether the user is pointing us to a docker image, or an imagestream, for both the --to and --from fields. Otherwise you get into the searching/matching/guessing madness that new-app currently does.

Unless you're proposing that when creating a buildconfig you can only reference imagestreams (or only reference dockerimages).

@soltysh
Copy link
Contributor Author

soltysh commented May 11, 2017

Only docker images, if you care about IS you'd use oc new-app.

@bparees
Copy link
Contributor

bparees commented May 11, 2017

Only docker images, if you care about IS you'd use oc new-app.

that seems silly. I don't want to introduce a command that creates buildconfigs that follow a structure we'd never recommend. imagestreams are the right tool for the job. Buildconfigs that don't use imagestreams are painful:

  1. you can't imagechangetrigger them
  2. you almost certainly need to add docker credential secrets because you're not going to be able to push the output anywhere

@bparees
Copy link
Contributor

bparees commented May 11, 2017

The most likely combination is:

from a docker image
to an imagestream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants