vlsingle, vmsingle: do not mount emptyDir if data
volume is present in spec.volumes
#1489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
currently it's only possible to set external PVC for vlsingle and vmsingle only with crutches: storageDataPath should be set using
spec.extraArgs
, since default or one, which is controlled byspec.storageDataPath
creates PVC fromspec.storage
or mounts emptyDir ifspec.storage
is not set. any volume mounts that are mounted tospec.storageDataPath
lead to collision. Even with this crutch pod has unneeded volume mount, also in vmsingle backup functionality becomes unavailable, since it also relies onspec.storageDataPath
value.this PR moves method, which mounts storage volume to build package and does the following:
storageDataPath
only if volume with expected name is not already present inspec.volumeMounts
spec.storage
is definedspec.volumes
Understand that it may cause restart for vlsingle and vmsingle pods, if there are any values defined at
spec.volumeMounts
orspec.volumes
, but didn't want to make function signature too heavy also not sure if this is a common case