-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Respect $KUBECONFIG env var #68
Conversation
a12cd76
to
ff53a10
Compare
ff53a10
to
af761b4
Compare
af761b4
to
5eec58e
Compare
e91ad2a
to
f35c57d
Compare
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.
⭐️ This looks great. I just had some small style nits.
cli/shell/shell_test.go
Outdated
home := shell.HomeDir() | ||
expected := os.Getenv("HOME") | ||
if runtime.GOOS != "windows" && !strings.Contains(home, expected) { | ||
t.Errorf("This is a UNIX-like system, expecting home dir [%s] to contain [/home]", expected) |
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.
I think this error would make more sense as:
t.Errorf("This is a UNIX-like system, expecting home dir [%s] to contain [%s]", home, expected)
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.
cli/k8s/api.go
Outdated
|
||
"github.com/runconduit/conduit/cli/shell" | ||
"k8s.io/client-go/rest" | ||
) |
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.
Mind collapsing the blank lines here and re-saving with goimports?
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.
Weird, I configured IntelliJ to use goimports upon save automatically
cli/k8s/api_test.go
Outdated
} | ||
|
||
if actualUrl.String() != expectedUrlString { | ||
t.Fatalf("Expected generated URl to be [%s], but got [%s]", expectedUrlString, actualUrl.String()) |
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.
typo here: URl
=> URL
cli/k8s/k8s_test.go
Outdated
} | ||
}) | ||
|
||
t.Run("Return error it extra path doesn'' start with slash", func(t *testing.T) { |
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.
typo here: doesn''
=> doesn't
f35c57d
to
d50c7d6
Compare
In order to start dismantling the monolithic ctx structures, this change removes the root `ctx::Process` type. This simplifies `ctx::Proxy` such that is copyable and need not be `Arc`ed. `telemetry::metrics::labels::Direction` has been updated to decorate `ctx::Proxy` instead of modeling the same variants directly as an enum.
Following linkerd#67 and linkerd#68, the `labels::Direction` type can be replaced with an `impl FmtLabels for ctx::Proxy`.
Following linkerd#67 and linkerd#68, the `labels::TlsStatus` type can be removed in favor of extending underlying `ctx::transport::TlsStatus` type to implement `FmtLabels`.
This PR extracts some of the kube api creatin logic into its own object, and makes sure that it respects the
$KUBECONFIG
variable. It would probably be more interesting to use something like Kubernetes' own logic to deal with this, but this is not in scope for this issue.Closes #17