mirror of https://github.com/k3s-io/k3s
Merge pull request #65429 from WanLinghao/projected_error_return_fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix a return miss bug **What this PR does / why we need it**: This PR fix a return sentence miss bug **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/8/head
commit
2a0bc7af6d
|
@ -354,13 +354,9 @@ func (c *projectedVolumeUnmounter) TearDownAt(dir string) error {
|
|||
}
|
||||
|
||||
func getVolumeSource(spec *volume.Spec) (*v1.ProjectedVolumeSource, bool, error) {
|
||||
var readOnly bool
|
||||
var volumeSource *v1.ProjectedVolumeSource
|
||||
|
||||
if spec.Volume != nil && spec.Volume.Projected != nil {
|
||||
volumeSource = spec.Volume.Projected
|
||||
readOnly = spec.ReadOnly
|
||||
return spec.Volume.Projected, spec.ReadOnly, nil
|
||||
}
|
||||
|
||||
return volumeSource, readOnly, fmt.Errorf("Spec does not reference a projected volume type")
|
||||
return nil, false, fmt.Errorf("Spec does not reference a projected volume type")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue