diff --git a/internal/controller/supervisorconfig/generator/supervisor_secrets.go b/internal/controller/supervisorconfig/generator/supervisor_secrets.go index dae032b3..b9e0cc5e 100644 --- a/internal/controller/supervisorconfig/generator/supervisor_secrets.go +++ b/internal/controller/supervisorconfig/generator/supervisor_secrets.go @@ -206,7 +206,6 @@ func generateSecret(namespace, name string, labels map[string]string, secretData Kind: "Deployment", } - blockOwnerDeletion := true isController := false return &corev1.Secret{ @@ -215,12 +214,11 @@ func generateSecret(namespace, name string, labels map[string]string, secretData Namespace: namespace, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: deploymentGVK.GroupVersion().String(), - Kind: deploymentGVK.Kind, - Name: owner.GetName(), - UID: owner.GetUID(), - BlockOwnerDeletion: &blockOwnerDeletion, - Controller: &isController, + APIVersion: deploymentGVK.GroupVersion().String(), + Kind: deploymentGVK.Kind, + Name: owner.GetName(), + UID: owner.GetUID(), + Controller: &isController, }, }, Labels: labels, diff --git a/internal/controller/supervisorconfig/generator/supervisor_secrets_test.go b/internal/controller/supervisorconfig/generator/supervisor_secrets_test.go index f2844c7d..19fd6d1b 100644 --- a/internal/controller/supervisorconfig/generator/supervisor_secrets_test.go +++ b/internal/controller/supervisorconfig/generator/supervisor_secrets_test.go @@ -268,20 +268,18 @@ func TestSupervisorSecretsControllerSync(t *testing.T) { generatedSymmetricKey = []byte("some-neato-32-byte-generated-key") otherGeneratedSymmetricKey = []byte("some-funio-32-byte-generated-key") - blockOwnerDeletion = true - isController = false - generatedSecret = &corev1.Secret{ + isController = false + generatedSecret = &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: generatedSecretName, Namespace: generatedSecretNamespace, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: ownerGVK.GroupVersion().String(), - Kind: ownerGVK.Kind, - Name: owner.GetName(), - UID: owner.GetUID(), - BlockOwnerDeletion: &blockOwnerDeletion, - Controller: &isController, + APIVersion: ownerGVK.GroupVersion().String(), + Kind: ownerGVK.Kind, + Name: owner.GetName(), + UID: owner.GetUID(), + Controller: &isController, }, }, Labels: labels, @@ -298,12 +296,11 @@ func TestSupervisorSecretsControllerSync(t *testing.T) { Namespace: generatedSecretNamespace, OwnerReferences: []metav1.OwnerReference{ { - APIVersion: ownerGVK.GroupVersion().String(), - Kind: ownerGVK.Kind, - Name: owner.GetName(), - UID: owner.GetUID(), - BlockOwnerDeletion: &blockOwnerDeletion, - Controller: &isController, + APIVersion: ownerGVK.GroupVersion().String(), + Kind: ownerGVK.Kind, + Name: owner.GetName(), + UID: owner.GetUID(), + Controller: &isController, }, }, Labels: labels,