Merge pull request #507 from mauriciopoppe/volumesnapshot-crd-check

Fix typo in CRD check
This commit is contained in:
Kubernetes Prow Robot
2021-04-29 17:39:57 -07:00
committed by GitHub

View File

@@ -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 {