Closed fersarr closed 4 years ago
I am trying to use kubespawner_override to mount a volume with readOnly set to true. But I cannot seem to get it right after trying different possibilities:
kubespawner_override
readOnly
true
c.KubeSpawner.profile_list.append({ 'kubespawner_override': { 'volumes': [ { 'name': 'mytest', 'hostPath': { 'path': '/my/path', 'type': 'Directory', 'readOnly': 'true' # tried True, 'true', 1, etc. } } ], volume_mounts: [ { 'name': 'mytest', 'mountPath': '/my/path', } ] } })
readOnly is one of the options mentioned in the kubernetes docs
According to kubespawner_override docs, these options are passed to kubernetes but how exactly should this be done?
The error I keep getting is:
spec.containers[0].volumeMounts[1].readOnly: Invalid value: false: must be read-only
Indicating that the True value is not being set.
True
Hm, this might not be the correct place for this issue, I created it again in the kubespawner repo: https://github.com/jupyterhub/kubespawner/issues/344
Feel free to delete it if that's the case. Sorry
I am trying to use
kubespawner_override
to mount a volume withreadOnly
set totrue
. But I cannot seem to get it right after trying different possibilities:readOnly is one of the options mentioned in the kubernetes docs
According to kubespawner_override docs, these options are passed to kubernetes but how exactly should this be done?
The error I keep getting is:
Indicating that the
True
value is not being set.