-
Notifications
You must be signed in to change notification settings - Fork 191
vlsingle, vmsingle, vtsingle: do not mount emptyDir if data volume is present in spec.volumes
#1489
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
base: master
Are you sure you want to change the base?
Conversation
2bc9689 to
96465ef
Compare
96465ef to
c3b6a72
Compare
73fe37c to
80f8959
Compare
| }, | ||
| RetentionPeriod: "1", | ||
| RemovePvcAfterDelete: true, | ||
| StorageDataPath: "/tmp/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be checking that StorageDataPath is listed in one of the volumes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about extending tests too:
Expect(ts.Volumes[0].EmptyDir).ToNot(BeNil())
Expect(ts.Containers[0].VolumeMounts[0].MountPath).To(Equal("/tmp/"))
and so on in other testcases too
846d359 to
de2f69b
Compare
|
Lets be careful with this change. It potentially may break exist deployments of VMSingle instances, I'd like to keep it backward-compatible. |
de2f69b to
90f6e48
Compare
088ef81 to
f9bc48f
Compare
data volume is present in spec.volumesdata volume is present in spec.volumes
f9bc48f to
3130702
Compare
|
Related to #1677 |
3130702 to
352c9d7
Compare
352c9d7 to
e6fd498
Compare
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.storageDataPathcreates PVC fromspec.storageor mounts emptyDir ifspec.storageis not set. any volume mounts that are mounted tospec.storageDataPathlead to collision. Even with this crutch pod has unneeded volume mount, also in vmsingle backup functionality becomes unavailable, since it also relies onspec.storageDataPathvalue.this PR moves method, which mounts storage volume to build package and does the following:
storageDataPathonly if volume with expected namedatais not already present inspec.volumeMountsspec.storageis definedspec.volumesdatamount path intersects with storageDataPathdatadoesn't intersect with storageDataPathfixes #784