bitnami-labs / sealed-secrets

A Kubernetes controller and tool for one-way encrypted Secrets

Home Page:https://sealed-secrets.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating sealed secret throws an error: "an empty namespace may not be set when a resource name is provided"

TymenAbels opened this issue · comments

Which component:
sealed-secrets-controller:0:26.2 , 0:26.1, v0.24.4

Describe the bug
When I apply a .yaml file with kind SealedSecrets and content, The Sealed secret in CustomResourceDefinition sealedsecrets.bitnami.com is created, but the Secret is never created with message below:
an empty namespace may not be set when a resource name is provided
Event(v1.ObjectReference{Kind:"SealedSecret", Namespace:"", Name:"test", UID:"943b4000-9de3-4bb5-8207-cb29a03bffd1", APIVersion:"bitnami.com/v1alpha1", ResourceVersion:"559539446", FieldPath:""}): type: 'Warning' reason: 'ErrUpdateFailed' an empty namespace may not be set when a resource name is provided.
We have tried with multiple versions of the sealed-secrets-controller, 0.26.2, 0.26.1 and v0.24.4 but all results into the same error.
Also when defining a namespace: wihtin the metadata does not sovle this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Sealed Secrets project version 0.26.2 into AWS EKS version 1.26 using namespace sealed-secrets
  2. Verify pod is launched and image is pulled. Service exist, service accounts with roles and rolebindings.
  3. Create Secret with --dry-run on a client using kubectl
  4. Use kubeseal.exe to fetch certificate.
  5. Use kubeseal.exe to create SealedSecret file.
  6. Apply created SealedSecret to the cluster with kubectl apply -f .yaml

Expected behavior
A SealedSecret resource is created within customresourcedefinition sealedsecret.bitnami.com
kubectl get sealedsecrets will also show the sealedsecret object.
The Secret resource is not created.

Version of Kubernetes:
AWS EKS 1.26

  • Output of kubectl version:
an empty namespace may not be set when a resource name is provided
Event(v1.ObjectReference{Kind:"SealedSecret", Namespace:"", Name:"test", UID:"943b4000-9de3-4bb5-8207-cb29a03bffd1", APIVersion:"bitnami.com/v1alpha1", ResourceVersion:"559539446", FieldPath:""}): type: 'Warning' reason: 'ErrUpdateFailed' an empty namespace may not be set when a resource name is provided

Additional context
Add any other context about the problem here.

Hi @TymenAbels Can you share the exact command line flags you used with kubeseal?