Skip to content

Commit

Permalink
Return err in namespace creation error
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
  • Loading branch information
rsevilla87 committed Apr 1, 2021
1 parent 0105eaa commit b27b00c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/burner/namespaces.go
Expand Up @@ -31,7 +31,7 @@ func createNamespace(clientset *kubernetes.Clientset, namespaceName string, nsLa
ns := v1.Namespace{
ObjectMeta: metav1.ObjectMeta{Name: namespaceName, Labels: nsLabels},
}
RetryWithExponentialBackOff(func() (done bool, err error) {
return RetryWithExponentialBackOff(func() (done bool, err error) {
_, err = clientset.CoreV1().Namespaces().Create(context.TODO(), &ns, metav1.CreateOptions{})
if errors.IsForbidden(err) {
log.Fatalf("Authorization error creating namespace %s: %s", ns.Name, err)
Expand All @@ -47,7 +47,6 @@ func createNamespace(clientset *kubernetes.Clientset, namespaceName string, nsLa
log.Infof("Created namespace: %s", ns.Name)
return true, err
})
return nil
}

// CleanupNamespaces deletes namespaces with the given selector
Expand Down

0 comments on commit b27b00c

Please sign in to comment.