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

[nat] Allowing either CLI option or /var/run/secrets/kubernetes.io/serviceaccount/namespace detection #11

Open
wants to merge 1 commit into
base: kaleido-besu-release-24.5.2-nat-patch
Choose a base branch
from

Conversation

onelapahead
Copy link

PR description

Builds off of hyperledger#6088 and avoids the need for the new experimental namespace option.

If running within Kubernetes, Services create Endpoints for Pods in the same Namespace. So it is unnecessary to assume a Besu Pod will need to detect a LoadBalancer Service in a separate Namespace from itself (which is why it's great we're avoiding need access to all Namespaces bc that violates least privileges).

However, the Kubernetes docs mention:

You want to point your Service to a Service in a different Namespace or on another cluster
https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors

It's debatable if LoadBalancer Services even work in such a scenario, and feels simpler to just simply state that is unsupported and therefore Besu only looks for Services in its same Namespace.

As a result, we can rely on this file that should always be present since ServiceAccount is always mounted to a Pod. And we fallback to the default if not.

Fixed Issue(s)

Addresses concerns from hyperledger#6088 (comment).

…rviceaccount/namespace instead

Signed-off-by: hfuss <hayden.fuss@kaleido.io>
@onelapahead onelapahead changed the title [nat] Removing CLI option and using /var/run/secrets/kubernetes.io/serviceaccount/namespace instead [nat] CLI option and /var/run/secrets/kubernetes.io/serviceaccount/namespace support Aug 8, 2024
@onelapahead onelapahead changed the title [nat] CLI option and /var/run/secrets/kubernetes.io/serviceaccount/namespace support [nat] Allowing either CLI option or /var/run/secrets/kubernetes.io/serviceaccount/namespace detection Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant