Skip to content

Commit bfd8873

Browse files
committed
fix typo in CRD check
1 parent 805f5c9 commit bfd8873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/snapshot-controller/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func ensureCustomResourceDefinitionsExist(kubeClient *kubernetes.Clientset, clie
6868
condition := func() (bool, error) {
6969
var err error
7070
_, err = kubeClient.CoreV1().Namespaces().Get(context.TODO(), "kube-system", metav1.GetOptions{})
71-
if err != nil {
71+
if err == nil {
7272
// only execute list VolumeSnapshots if the kube-system namespace exists
7373
_, err = client.SnapshotV1().VolumeSnapshots("kube-system").List(context.TODO(), metav1.ListOptions{})
7474
if err != nil {

0 commit comments

Comments
 (0)