kuttl icon indicating copy to clipboard operation
kuttl copied to clipboard

kuttl test flag --kind-containers

Open esatterwhite opened this issue 4 years ago • 4 comments

What would you like to be added: A command line flag for kindContainers

Why is this needed: During a CI build process Docker tags are generated and have a random component and it isn't easily possible to include this in a static config file. It would be much easier to generate a command to execute.

esatterwhite avatar Aug 26 '21 12:08 esatterwhite

@esatterwhite could you provide more detail or acceptance criteria? It isn't clear what the ask is here. thanks for your involvement!

kensipe avatar Sep 02 '21 19:09 kensipe

Our build process generates a dynamic image tag and renders kubernetes manifests that are loaded into kuttl for testing. Not able to load that image directly in to kind using the static config because I don't really know what it is until it is running.

So We're not able to assert that replicas are ready because they are all stuck in an image pull back off

      state:                                                                                                                                                   
        waiting:                                                                                                                                               
          message: Back-off pulling image "us.gcr.io/logdna-k8s/kong:2.5.0-alpine.20210924T165522Z"      #<--- doesn't exist yet                   
          reason: ImagePullBackOff  

if it were a command line flag, I could build that image locally and generate that command to load it into kind and avoid image pull backoff. It is apart of our CI so it doesn't make sense to always push the image to the registry if it might be broken

kubectl kuttl test --config=kuttl.yaml --kind-containers=us.gcr.io/logdna-k8s/kong:2.5.0-alpine.20210924T165522Z

being able to specify the flag multiple times for multiple containers would be nice

esatterwhite avatar Sep 24 '21 19:09 esatterwhite

@kensipe does this answer your question?

esatterwhite avatar Sep 28 '21 17:09 esatterwhite

Actually, I think I figured this out. you can specify the image name w/o a tag, And that generally works fine.

kindConfig: kuttl-kind.yaml
artifactsDir: coverage
kindContainers:
- a-local-image
- another-local-image

All though a repeatable cli flag would still be a nice addition

esatterwhite avatar Oct 18 '21 14:10 esatterwhite