Skip to content
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

Add support for different volume types #1633

Closed
skonto opened this issue Mar 16, 2022 · 6 comments · Fixed by #1679 or #1693
Closed

Add support for different volume types #1633

skonto opened this issue Mar 16, 2022 · 6 comments · Fixed by #1679 or #1693
Assignees
Labels
kind/feature New feature or request
Milestone

Comments

@skonto
Copy link

skonto commented Mar 16, 2022

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

@skonto skonto added the kind/feature New feature or request label Mar 16, 2022
@rhuss
Copy link
Contributor

rhuss commented Mar 16, 2022

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 ...

@skonto
Copy link
Author

skonto commented Mar 17, 2022

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

@vyasgun
Copy link
Contributor

vyasgun commented May 5, 2022

/assign

@dsimansk dsimansk added this to the 1.5 (0.32) milestone May 10, 2022
@dsimansk dsimansk moved this to Backlog in Client Planning May 10, 2022
@dsimansk dsimansk moved this from Backlog to Ready To Work in Client Planning May 10, 2022
Repository owner moved this from Ready To Work to Done in Client Planning Jun 24, 2022
@vyasgun
Copy link
Contributor

vyasgun commented Jun 24, 2022

/reopen

@knative-prow knative-prow bot reopened this Jun 24, 2022
@knative-prow
Copy link

knative-prow bot commented Jun 24, 2022

@vyasgun: Reopened this issue.

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.

Repository owner moved this from Done to Ready To Work in Client Planning Jun 24, 2022
@vyasgun
Copy link
Contributor

vyasgun commented Jun 24, 2022

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

@dsimansk dsimansk moved this from Ready To Work to In Progress in Client Planning Jul 1, 2022
@dsimansk dsimansk modified the milestones: 1.5 (0.32), 1.6 (0.33) Jul 1, 2022
Repository owner moved this from In Progress to Done in Client Planning Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
Status: Done
4 participants