Skip to content

Commit 036fa13

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Test for existence in PVC Exists function
Previously the return was "true" if the PVC did not exist.
1 parent 656bfe5 commit 036fa13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

operator/pvc/pvc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func DeleteIfExists(clientset *kubernetes.Clientset, name string, namespace stri
203203
// Exists test to see if pvc exists
204204
func Exists(clientset *kubernetes.Clientset, name string, namespace string) bool {
205205
pvc, _ := kubeapi.GetPVCIfExists(clientset, name, namespace)
206-
return pvc == nil
206+
return pvc != nil
207207
}
208208

209209
func getMatchLabels(key, value string) string {

0 commit comments

Comments
 (0)