-
Notifications
You must be signed in to change notification settings - Fork 1.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
bundle validate: add tool-less image validation #3222
bundle validate: add tool-less image validation #3222
Conversation
"One of: [docker, podman]") | ||
"Tool to pull and unpack bundle images. Only used when validating a bundle image. "+ | ||
"One of: [docker, podman, none]") | ||
|
||
fs.StringVarP(&c.outputFormat, "output", "o", internal.Text, |
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.
when we call the bundle validation with the --image-builder and then bundle is in the disk (created with the generated-only) it is not WARNING that the value will be ignored or raising and error telling that the flag is invalid. Could we add that?
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.
We should either fail if that flag is set or do nothing, but that's something to do in a follow-up.
"Tool to pull and unpack bundle images. Only used when validating a bundle image. "+ | ||
"One of: [docker, podman, none]") |
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.
IMO we need to make clear that it is not a valid option when the bundle was created with the flag --generate-only
. We know that when this flag is used an image is not created and in this way, it is not valid forOnly used when validating a bundle image
.
However, we can make the info more implicit and directly instead of assuming that they will come this conclusion easily.
"Tool to pull and unpack bundle images. Only used when validating a bundle image. "+ | |
"One of: [docker, podman, none]") | |
"Tool to pull and unpack bundle images. Bundles created with --generate-only has not images and this option is just useful with bundle images. "+ | |
"One of: [docker, podman, none]") |
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.
I think the original is more clear, especially considering that this command can be used with non-SDK-generated bundles.
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.
IMO we need to make clear that it is not valid for the bundle created with the flag --generate-only
explicitly, however, I am ok with any rephrase to address that.
@@ -56,7 +56,7 @@ To build and validate an image: | |||
|
|||
``` | |||
-h, --help help for validate | |||
-b, --image-builder string Tool to extract bundle image data. Only used when validating a bundle image. One of: [docker, podman] (default "docker") | |||
-b, --image-builder string Tool to pull and unpack bundle images. Only used when validating a bundle image. One of: [docker, podman, none] (default "docker") |
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.
I can use podman or docker to validate the image .. however, to create a can just use docker. Should we not be a valid option to create the bundle as well?
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 can use docker, podman, or buildah to create the bundle image (see help text of bundle create
). I think the --image-builder
name is confusing and should be changed to --container-tool
or something. Needs a follow-up.
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.
I liked --container-tool
07d4336
to
a3acb91
Compare
images, removing the need for an external image tool like docker/podman. `bundle validate` should have this functionality. cmd/operator-sdk/bundle/validate.go: add "none" option to available image builder tools
a3acb91
to
ee8ac5a
Compare
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.
/lgtm
/approve
I am ok with we move with and address the comments in follow-ups. Could you please track an issue for one of them before we merge this one to ensure that they will not get lost?
Description of the change:
Motivation for the change:
ImageValidator
can now use a containerd image ("none") tool to unpack images, removing the need for an external image tool like docker/podman./cc @hasbro17 @jmccormick2001 @joelanford
Blocked by #3221/kind feature