Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8sSearch with a fixed searchNamespace doesn't separate services and pods by namespace #307

Open
nightkr opened this issue Aug 28, 2023 · 0 comments
Labels

Comments

@nightkr
Copy link
Member

nightkr commented Aug 28, 2023

Affected version

23.7

Current and expected behavior

When using a SecretClass with a fixed searchNamespace, such as the following:

apiVersion: secrets.stackable.tech/v1alpha1
kind: SecretClass
metadata:
  name: tls-manual
spec:
  backend:
    k8sSearch:
      searchNamespace:
        name: foo

then the service=bar scope will always search for a secret with the label secrets.stackable.tech/service=bar, with no way for the user to separate which namespace the secret should apply to.

This technically applies to all scopes, but node doesn't imply any namespaced behaviour.

Possible solution

  1. Change the format of namespace-specific labels to <name>.<namespace>.
  2. Add a new label secrets.stackable.tech/namespace=<namespace>.

Either change would be breaking. We could mitigate this by adding an opt-in property to SecretClass that enables the namespace. It could be made opt-out in v1alpha2.

Alternatively, we could declare that fixed searchNs was always unusably broken, and that it isn't worth maintaining the old behaviour at all.

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant