-
Notifications
You must be signed in to change notification settings - Fork 42
non operator able to target and ssh node through bastion host #263
non operator able to target and ssh node through bastion host #263
Conversation
Testing
|
9b1c33c
to
31ef9d5
Compare
31ef9d5
to
1471e8a
Compare
1471e8a
to
7bbabbe
Compare
7bbabbe
to
9112f80
Compare
9112f80
to
34349a2
Compare
pkg/cmd/ssh.go
Outdated
return nil, err | ||
if checkOperatorRole() == "user" { | ||
KUBECONFIG = getKubeConfigOfClusterType("shoot") | ||
out, err := ExecCmdReturnOutput("bash", "-c", "kubectl --kubeconfig="+KUBECONFIG+" get node") |
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.
Why haven't you used the go client but instead executed kubectl to fetch the nodes?
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.
sure I will change it
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.
at least call kubectl directly, no bash please for new code
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.
fixed
34349a2
to
048fd71
Compare
048fd71
to
43e61e4
Compare
a2804b2
to
6ceed1e
Compare
Hi let me know is the commit square ok and check it before merge PR . @gardener/gardenctl-maintainers |
/lgtm |
@tedteng could you please squash commits into one? |
you mean all the commits for just two commits from mine? |
why other people's commit exist in your PR? ideally before merge one PR should contains only one commit from your self. |
it seems not fixed the issue create new one |
51b6527
to
6ceed1e
Compare
723b039
to
6ceed1e
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.
6ceed1e
to
3ee1ac1
Compare
add temporary solution in targetShoot method add getTechnicalID Update pkg/cmd/download.go remove getShootClusterName method remove bash -c Update pkg/cmd/miscellaneous.go
3ee1ac1
to
53544d5
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.
/lgtm
however i haven't tested, confirmed with @tedteng he's fully confidence with it
What this PR does / why we need it:
allow non-operator user use project SA account in garden able to manage the shoots in their project via
gardenctl target
andgardenctl ssh
to list nodes ssh shoot nodes through bastion host.Which issue(s) this PR fixes:
Fixes #253
Fixes #233
Special notes for your reviewer:
as a request from the end-user currently the
ssh
only allow access aws provider.Release note: