You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 ...
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.
Activity
rhuss commentedon Mar 16, 2022
I think it's best to add support for extra volumes to our existing volume support for configmaps and secrets (
--volumeand--mount). We can extend the value syntax to add more volume specific options like in--volume emptyDir:myVolumeName:type=memoryand then--mount /path/to/mount=myVolumeName. This should then also work for multi container ...skonto commentedon Mar 17, 2022
Sure I was looking for some existing volume support but it didnt come up in my search.
vyasgun commentedon May 5, 2022
/assign
vyasgun commentedon Jun 24, 2022
/reopen
knative-prow commentedon Jun 24, 2022
@vyasgun: Reopened this issue.
Details
In response to this:
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.
vyasgun commentedon Jun 24, 2022
Reopening this issue as #1679 addresses only half of the requested feature.