fix typo in CRD check

This commit is contained in:
Mauricio Poppe
2021-04-29 22:30:11 +00:00
parent 805f5c9209
commit bfd88737a0

View File

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