Unverified Commit c8f0af2a authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #68680 from benoitf/fix-chown

Fix chown on distributed flex volumes (like gluster)
parents 40c7c837 6584df59
......@@ -223,6 +223,7 @@ type DriverCapabilities struct {
Attach bool `json:"attach"`
SELinuxRelabel bool `json:"selinuxRelabel"`
SupportsMetrics bool `json:"supportsMetrics"`
FSGroup bool `json:"fsGroup"`
}
func defaultCapabilities() *DriverCapabilities {
......@@ -230,6 +231,7 @@ func defaultCapabilities() *DriverCapabilities {
Attach: true,
SELinuxRelabel: true,
SupportsMetrics: false,
FSGroup: true,
}
}
......
......@@ -92,7 +92,9 @@ func (f *flexVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
}
if !f.readOnly {
volume.SetVolumeOwnership(f, fsGroup)
if f.plugin.capabilities.FSGroup {
volume.SetVolumeOwnership(f, fsGroup)
}
}
return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment