Skip to content

Add support for different volume types #1633

Description

@skonto

Feature request

Add support for different volume types. In Serving we have recently added two different volume types: Emptydir and PVCs.

Use case

It would be nice to extend the cli to support volumes. Users can then use the cli to add volumes as they would normally do with
a yaml file when deploying services.

UI Example

This could work similarly to the --extra-containers flag. At minimum users should be able to pass the configuration for volumes
at pod level and at container level via json/yaml data.

If it is found useful defaults could be added. For example if emptydir is used a default volume mount could be done under a predefined dir eg. /cache along with a predefined emptyDir.medium eg. memory.

Examples:

kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --emptydir-volumes-config json_data
kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --pvc-volumes-config json_data

{emptydir, pvc}-volumes-config refers to the pod voumes field. Regarding the container volume mounts these can be configured either with an extra parameter eg. --emptydir-volumemounts for the user container and rely on --extra-containers flag for the rest of the mounts targeting other containers. This should be extended in the future to support init-containers too.

/cc @rhuss

Activity

  1. added
    kind/feature
    on Mar 16, 2022
  2. rhuss commented on Mar 16, 2022

    @rhuss
    Contributor

    I think it's best to add support for extra volumes to our existing volume support for configmaps and secrets (--volume and --mount). We can extend the value syntax to add more volume specific options like in --volume emptyDir:myVolumeName:type=memory and then --mount /path/to/mount=myVolumeName. This should then also work for multi container ...

  3. skonto commented on Mar 17, 2022

    @skonto
    Author

    Sure I was looking for some existing volume support but it didnt come up in my search.

  4. vyasgun commented on May 5, 2022

    @vyasgun
    Contributor

    /assign

  5. added this to the 1.5 (0.32) milestone on May 10, 2022
  6. moved this from Backlog to Ready To Work in Client Planningon May 10, 2022
  7. Repository owner moved this from Ready To Work to Done in Client Planningon Jun 24, 2022
  8. vyasgun commented on Jun 24, 2022

    @vyasgun
    Contributor

    /reopen

  9. knative-prow commented on Jun 24, 2022

    @knative-prow

    @vyasgun: Reopened this issue.

    Details

    In response to this:

    /reopen

    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.

  10. Repository owner moved this from Done to Ready To Work in Client Planningon Jun 24, 2022
  11. vyasgun commented on Jun 24, 2022

    @vyasgun
    Contributor

    Reopening this issue as #1679 addresses only half of the requested feature.

  12. moved this from Ready To Work to In Progress in Client Planningon Jul 1, 2022
  13. modified the milestones: 1.5 (0.32), 1.6 (0.33) on Jul 1, 2022
  14. Repository owner moved this from In Progress to Done in Client Planningon Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/feature

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions