fix typo in CRD check
@@ -68,7 +68,7 @@ func ensureCustomResourceDefinitionsExist(kubeClient *kubernetes.Clientset, clie
condition := func() (bool, error) {
var err error
_, err = kubeClient.CoreV1().Namespaces().Get(context.TODO(), "kube-system", metav1.GetOptions{})
- if err != nil {
+ if err == nil {
// only execute list VolumeSnapshots if the kube-system namespace exists
_, err = client.SnapshotV1().VolumeSnapshots("kube-system").List(context.TODO(), metav1.ListOptions{})
if err != nil {
