diff --git a/controllers/suite/common.go b/controllers/suite/common.go index f4b7853f3..93234a8f3 100644 --- a/controllers/suite/common.go +++ b/controllers/suite/common.go @@ -284,12 +284,6 @@ func CreateAndBootstrapCluster(ctx context.Context, k8sClient client.Client, hum } } - bootstrapToken := kubernetes.ConstructHumioBootstrapToken(key.Name, key.Namespace) - bootstrapTokenKey := types.NamespacedName{ - Namespace: bootstrapToken.Namespace, - Name: bootstrapToken.Name, - } - if os.Getenv("TEST_USE_EXISTING_CLUSTER") != "true" { // Simulate sidecar creating the secret which contains the admin token used to authenticate with humio secretData := map[string][]byte{"token": []byte("")} @@ -341,7 +335,7 @@ func CreateAndBootstrapCluster(ctx context.Context, k8sClient client.Client, hum if len(hbtList) == 0 { return fmt.Errorf("no humiobootstraptokens for cluster %s", key.Name) } - if len(hbtList) > 0 { + if len(hbtList) > 1 { return fmt.Errorf("too many humiobootstraptokens for cluster %s. found list : %+v", key.Name, hbtList) }