-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add kubernetes namespace override #106
Add kubernetes namespace override #106
Conversation
When launching Hegel in Kubernetes it can default, if no Kubeconfig is specified, to using the ServiceAccount configured with the Pod. The ServiceAccount is the same as the Pod deployment namespace and consequently Hegel defaults to reading from its own namespace. This isn't always desirable as users may want to place Hardware in a different namespace and configure the necessary RBAC rules for Hegel to read. Signed-off-by: Chris Doherty <[email protected]>
f6632d3
to
ca88a0f
Compare
Codecov Report
@@ Coverage Diff @@
## main #106 +/- ##
==========================================
- Coverage 43.13% 42.90% -0.23%
==========================================
Files 8 8
Lines 575 578 +3
==========================================
Hits 248 248
- Misses 296 299 +3
Partials 31 31
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add Kubernetes namespace override. See tinkerbell/hegel#106 for more details.
When launching Hegel in Kubernetes it can default, if no Kubeconfig is specified, to using the ServiceAccount configured with the Pod. The ServiceAccount is the same as the Pod deployment namespace and consequently Hegel defaults to reading from its own namespace. This isn't always desirable as users may want to place the
Hardware
custom resource in a different namespace.By defaulting to in-cluster config and requiring an operator to configure RBAC and explicitly set the
--kube-namespace
override we have a 'secure and predictable' out of the box deployment model.