- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NeedToAddFinalizer (0.47 sec)
-
pkg/controller/volume/protectionutil/utils.go
func IsDeletionCandidate(obj metav1.Object, finalizer string) bool { return obj.GetDeletionTimestamp() != nil && slice.ContainsString(obj.GetFinalizers(), finalizer, nil) } // NeedToAddFinalizer checks if need to add finalizer to object func NeedToAddFinalizer(obj metav1.Object, finalizer string) bool { return obj.GetDeletionTimestamp() == nil && !slice.ContainsString(obj.GetFinalizers(), finalizer, nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Mar 17 14:24:42 UTC 2019 - 1.1K bytes - Viewed (0) -
pkg/controller/volume/protectionutil/utils_test.go
{ name: "pvc has delete time and finalizer", obj: pvc, finalizer: util.PVCProtectionFinalizer, result: false, }, } for _, test := range tests { if test.result != NeedToAddFinalizer(test.obj, test.finalizer) { t.Error(test.name) } } } func TestNeedToAddFinalizerHasDeleteTime(t *testing.T) { pv := pv() pv.SetDeletionTimestamp(&metav1.Time{}) pvc := pvc()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Mar 17 14:24:42 UTC 2019 - 5.8K bytes - Viewed (0) -
pkg/controller/volume/pvprotection/pv_protection_controller.go
isUsed := c.isBeingUsed(pv) if !isUsed { return c.removeFinalizer(ctx, pv) } logger.V(4).Info("Keeping PV because it is being used", "PV", klog.KRef("", pvName)) } if protectionutil.NeedToAddFinalizer(pv, volumeutil.PVProtectionFinalizer) { // PV is not being deleted -> it should have the finalizer. The // finalizer should be added by admission plugin, this is just to add
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 6.4K bytes - Viewed (0) -
pkg/controller/volume/pvcprotection/pvc_protection_controller.go
return err } if !isUsed { return c.removeFinalizer(ctx, pvc) } logger.V(2).Info("Keeping PVC because it is being used", "PVC", klog.KObj(pvc)) } if protectionutil.NeedToAddFinalizer(pvc, volumeutil.PVCProtectionFinalizer) { // PVC is not being deleted -> it should have the finalizer. The // finalizer should be added by admission plugin, this is just to add
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 14K bytes - Viewed (0)