-
Notifications
You must be signed in to change notification settings - Fork 193
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
Allow passing relative root when running inCluster #383
Conversation
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.
Makes sense. Thanks for the PR. Two comments around naming and semantics.
lib/config.js
Outdated
@@ -32,16 +32,16 @@ function defaultConfigPaths () { | |||
function getInCluster () { | |||
const host = process.env.KUBERNETES_SERVICE_HOST | |||
const port = process.env.KUBERNETES_SERVICE_PORT | |||
|
|||
const root = process.env.RELATIVE_ROOT || '/' |
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.
Can we pick a kubernetes-client specific name for this environment variable? How about KUBERNETES_CLIENT_SERVICEACCOUNT_ROOT
?
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.
Sounds good, will do asap
lib/config.js
Outdated
@@ -32,16 +32,16 @@ function defaultConfigPaths () { | |||
function getInCluster () { | |||
const host = process.env.KUBERNETES_SERVICE_HOST | |||
const port = process.env.KUBERNETES_SERVICE_PORT | |||
|
|||
const root = process.env.RELATIVE_ROOT || '/' |
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.
Could we also set the default to /var/run/secrets/kubernetes.io/serviceaccount/
and update caPath
, tokenPath
, and namespacePath
to be like ${ KUBERNETES_CLIENT_SERVICEACCOUNT_ROOT }/*
? I'm guessing that would implement the behavior folks have in mind when they set the KUBERNETES_CLIENT_SERVICEACCOUNT_ROOT
value.
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.
Not sure I fully understand, can you please give an example?
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.
The updates you made were what I had in mind. 👍
…ROOT with default path to what K8S master injected
@silasbw please check this out. export KUBERNETES_CLIENT_SERVICEACCOUNT_ROOT=$TELEPRESENCE_ROOT/var/run/secrets/kubernetes.io/serviceaccount/ |
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.
🥇 🌶️
Published your change with |
Awesome, thanks |
related to #382