Skip to content

Commit 4ff7793

Browse files
authored
Merge pull request #507 from mauriciopoppe/volumesnapshot-crd-check
Fix typo in CRD check
2 parents 805f5c9 + bfd8873 commit 4ff7793

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)