Merge pull request #690 from humblec/rbac
replace serviceAccountName key, rbac and cleanup in the code
This commit is contained in:
@@ -77,8 +77,10 @@ import (
|
||||
// bi-directional binding is complete and readyToUse becomes true. Error field
|
||||
// in the snapshot status will be updated accordingly when failure occurs.
|
||||
|
||||
const snapshotKind = "VolumeSnapshot"
|
||||
const snapshotAPIGroup = crdv1.GroupName
|
||||
const (
|
||||
snapshotKind = "VolumeSnapshot"
|
||||
snapshotAPIGroup = crdv1.GroupName
|
||||
)
|
||||
|
||||
const controllerUpdateFailMsg = "snapshot controller failed to update"
|
||||
|
||||
@@ -829,7 +831,6 @@ func (ctrl *csiSnapshotCommonController) updateSnapshotErrorStatusWithEvent(snap
|
||||
|
||||
// addContentFinalizer adds a Finalizer for VolumeSnapshotContent.
|
||||
func (ctrl *csiSnapshotCommonController) addContentFinalizer(content *crdv1.VolumeSnapshotContent) error {
|
||||
|
||||
var patches []utils.PatchOp
|
||||
if len(content.Finalizers) > 0 {
|
||||
// Add to the end of the finalizers if we have any other finalizers
|
||||
@@ -838,7 +839,6 @@ func (ctrl *csiSnapshotCommonController) addContentFinalizer(content *crdv1.Volu
|
||||
Path: "/metadata/finalizers/-",
|
||||
Value: utils.VolumeSnapshotContentFinalizer,
|
||||
})
|
||||
|
||||
} else {
|
||||
// Replace finalizers with new array if there are no other finalizers
|
||||
patches = append(patches, utils.PatchOp{
|
||||
|
Reference in New Issue
Block a user