diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 09d574b81..5d0597942 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/utils/utils.go b/utils/utils.go index 345b298da..f35f34058 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1235,21 +1235,15 @@ func ServiceAccountPullSecretExists(ba common.BaseComponent, client client.Clien return getErr } secrets := sa.ImagePullSecrets - found := false if len(secrets) > 0 { // if this is our service account there will be one image pull secret // For others there could be more. either way, just use the first? sName := secrets[0].Name err := client.Get(context.TODO(), types.NamespacedName{Name: sName, Namespace: ns}, &corev1.Secret{}) if err != nil { - return err + saErr := errors.New("Service account " + saName + " isn't ready. Reason: " + err.Error()) + return saErr } - found = true - - } - if !found { - saErr := errors.New("Service account " + saName + " isn't ready") - return saErr } return nil }