Skip to content

Add CLI support to specify multiple containers #997

Closed

Description

@savitaashture

Feature request

Knative Serving release v0.16.0 has support for multiple containers as an alpha feature.

To propose multi container feature to beta user experience is one of the important aspects to be considered as part of CLI(kn).

The samples has been added as part of PR

For more info refer serving issue

Use case

User will get the flexibility to provide multiple containers information as part of command line tool.

UI Example

/kind proposal

Activity

  1. added
    kind/feature
    on Sep 1, 2020
  2. added
    kind/proposal
    on Sep 1, 2020
  3. rhuss commented on Sep 1, 2020

    @rhuss
    Contributor

    Good point, we definitely should add this to kn. The tricky part will be how to add this to the UX

    • Allow multiple --image parameters (but what would be then the main container ?)
    • How to add container specific options for the second container, separating them from the ones of the first container (like environment variables).

    Or maybe just support a simplified usage of adding a second container, and then delegate to full yaml usage when there are more complex needs ?

    @savitaashture are all container related fields possible for the second container, too ?

  4. savitaashture commented on Sep 1, 2020

    @savitaashture
    ContributorAuthor

    @rhuss Yes i agree with you this is bit tricky to support as part of UX

    Allow multiple --image parameters (but what would be then the main container ?)

    The main container will be the one where containerPort specified by the user

    How to add container specific options for the second container, separating them from the ones of the first container (like environment variables).

    Yes, there are few options which are not supported in sidecar but supported as part of main container (specifically Probes, ContainerPort )

    For more info here is the design doc https://docs.google.com/document/d/1XjIRnOGaq9UGllkZgYXQHuTQmhbECNAOk6TT6RNfJMw/edit?ts=5e25d093#heading=h.n8a530nnrb

    /cc @markusthoemmes

  5. skonto commented on Nov 24, 2020

    @skonto

    @rhuss @savitaashture one way to do this safely is via a configuration file directly. It should be essentially a copy of what the user would use in a ksvc and that should be validated by the existing Serving logic for consistency. For example: kn --multi-container-config-file /path/to/file. Otherwise I think it could be confusing to translate that to cli args.
    Let me know if there is some way to help here I certain try it.

  6. rhuss commented on Nov 24, 2020

    @rhuss
    Contributor

    An example could be to used the --file option that we already for something like

    kn service create mysvc --file multicontainers-service.yaml --concurrency-limit ... --scale-max ....
    
  7. dprotaso commented on Feb 9, 2021

    @dprotaso
    Member

    /label good-first-issue

  8. knative-prow-robot commented on Feb 9, 2021

    @knative-prow-robot
    Contributor

    @dprotaso: The label(s) /label good-first-issue cannot be applied. These labels are supported: proposal/0.11, proposal/0.12, proposal/0.13, proposal/0.14, proposal/0.15, proposal/0.16, proposal/0.17, proposal/0.18, proposal/0.19, channel/kafka, channel/natss, source/awssqs, source/camel, source/ceph, source/couchdb, source/github, source/kafka, source/prometheus

    Details

    In response to this:

    /label good-first-issue

    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.

  9. dprotaso commented on Feb 9, 2021

    @dprotaso
    Member

    /label 'good first issue'

  10. rhuss commented on Feb 9, 2021

    @rhuss
    Contributor

    After thinking a bit around the issue, in order to stay scalable (wrt the number of options and length of the command-line) and still being able to provide a decent UX, I think we can't avoid to make multi-container management a multi-step interaction with an intermediate file.

    Some ideas about the UX:

    • Using a new container command the builds up a list of container specs in a file (option names are just illustrative for now):
    kn container create --image foo.bar --env FOO=BAR --target container.yaml
    kn container update --image bar.foo --target container.yaml
    kn service create mysvc --image yet.another --label bla=blu --additional-containers container.yaml
    
    • Leveraging standard out / standard in for allowing a pipe-like mechanism:
    kn container create --image foo.bar | \
    kn container create --image bar.foo | \
    kn service create --image yet.another --additional-containers -
    
  11. rhuss commented on Feb 9, 2021

    @rhuss
    Contributor

    @dprotaso we are going to discuss these two alternatives above in the client WG call.

    btw, I don't think it's a 'good first issue', it touches quite a bit ;-)

  12. dprotaso commented on Mar 30, 2021

    @dprotaso
    Member

    @rhuss mentioned this has an owner - if things have changed feel free to un-assign

    /assign @dsimansk

  13. rhuss commented on Apr 15, 2021

    @rhuss
    Contributor

    It's still close to the top of the client bucket list, we just don't have a huge velocity right now .. :(

  14. evankanderson commented on Jun 15, 2021

    @evankanderson
    Member

    (This still needs a design before we can start implementation)

  15. added
    help wanted
    on Jun 15, 2021
  16. added
    triage/accepted
    and removed
    help wanted
    on Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/featurekind/proposaltriage/accepted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions