-
Notifications
You must be signed in to change notification settings - Fork 15
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
feature request: allow overriding command without modifying checks config file #62
Comments
This seems totally reasonable to me. Thanks for taking the time to think the UX through.
I don't think this would be my default assumption. I would expect multiple files to just add more checks with potentially a different command and other config (we might want to implement this though!). Another potential API might be to match the canary validate --file tests.yaml ${IMAGE_URI} -- sh -c 'sleep 9999' |
You know, I started this because I specifically was interested in overriding the command, but it doesn't have to be limited to that. Thinking about this comment, I like the "provide multiple files and they get resolved to a single set of configuration" even more. There could be rules for resolving fields based on the nature of the field, just like Helm and Flux do. So for example:
And to be determined whether "lists are merged" means recursively... I could see a case for, for example, just wanting to update the |
I'm not sure I would expect anything to be merged though. I would probably expect each file to be run independently in sequence. For example if I provided a file for binder and for kubeflow I would expect it to run both, not merge them into some binder/kubeflow hybrid. |
If Those would just be separate invocations of the tool, like # do only the binder stuff
container-canary --file binder.yaml
# do only the kubeflow stuff
container-canary --file kubeflow.yaml I'm thinking about this manifest-merging idea specifically as a way to get more coverage from the pattern of "one location holds the source of truth for what must be true for an image to be compliant with For example, let's look at this kubeflow example: container-canary/examples/kubeflow.yaml Lines 46 to 52 in c473896
The 30-second timeout isn't really a part of the Kubeflow requirements, is it? I believe the main requirement is just that a successful response is eventually returned on requests to that URL. What if, because of some feature of my image, it sometimes takes 31 seconds to get a response on In the current state of
It'd be a shame if I ended up copying the whole All that said... my primary reason for opening this, and the thing I most immediately want to test the RAPIDS images, is customizing the I like the proposed idea from #62 (comment) of using |
I think my primary concern is user confusion. I totally hear the logic of what you're saying, but it sounds a lot like what users in the For example $ docker compose -f compose.yml -f compose.override.yml up However if you look at Kubernetes tooling like $ kubectl apply -f foo.yaml -f bar.yaml
pod/foo created
pod/bar created To achieve overriding things in the Kubernetes space you would use Given the goal of
Absolutely. Given that |
Description
container-canary
should support setting thecommand:
for running an image without modifying the file containing validation checks.Benefits of this work
Would separate details of how the validation checks are run from what is being validated, making it easier to share validation manifests across many different images. See "Motivation" below for details.
Acceptance Criteria
command:
used whencontainer-canary
starts up a container without modifying the file that check configurations are stored inApproach
This might be accomplished by adding new command-line arguments to
container-canary
, like--cmd
to set the command.The more Kubernetes-thonic (is that a word?) but also more difficult to implement approach would be to allow providing multiple files and merging them all together.
For example, something like this:
Where
override-command.yaml
just contains something like this:And where the implication is that later files are patched on top of earlier files.
Following the way that some of these other tools work:
helm
values files: https://helm.sh/docs/chart_template_guide/values_files/Notes
Motivation
container-canary
starts up a container based on the image passed to it, then run checks inside that running container.If that image's default
CMD
doesn't result in starting a process (e.g. like a webserver), thencontainer-canary
will fail to run on it.Consider the following:
That
kubeflow.yaml
file doesn't have acommand:
entry, so the container will run whatever the defaultCMD
is on the image.In this case, it's just a shell.
And as a result,
container-canary
fails to run any checks.In the current state of
container-canary
, you have the following options:CMD
to something long-running, likepython -m http.server 80
command:
block tacking on some long-running commandIf instead you could override just the
command:
but still reuse the remote config file, then that one config could be the source of truth for something like "what characteristics does a valid Kubeflow notebook image have" for many different images spread over many repositories, without them needing to manually hold their own copies of it or add unnecessaryCMD
entries in their images just for the sake of this validation.The text was updated successfully, but these errors were encountered: