-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
/reviewed ok-to-test |
gardener/gardener#2515 has been merged. |
Hi @Kristian-ZH , i see this PR is failing at https://concourse.ci.gardener.cloud/builds/67311
|
Update: per Slack conversation with @Kristian-ZH , he will fix this validation error soon |
@dansible @DockToFuture do you have any comments on this PR? if not i will go ahead merge this PR, thanks! |
I want also to discuss with @vpnachev if we need to add support for |
sure, take your time, thanks for the PR! |
I added support for |
@vlvasilev Can you please check the PR and make a review |
pkg/cmd/miscellaneous.go
Outdated
} | ||
pieces := strings.Split(apiAdress, ".") | ||
|
||
return "garden-" + pieces[2] |
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 piece 2? Is this apiAddress always be in the 2 position?
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 do not know other option how to take the project namespace from the garden cluster
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.
If you know the project name, you can retrieve the namespace out of its spec, e.g. .spec.namespace.
Also, not all project namespaces are prefixed with garden-
, and some have a trailing hash, so I advise you to get the namespace name from the project.
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.
hmm, what about when the user is targeting shoot directly.
e.g. g target garden -> seed -> shoot
. In this way I do not know the project name
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 URL of the API is not a better solution, it will even not work when the DNS is disabled and the public address of the kube-apiserver
service is used directly.
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 kubeconfig
file contains the technical name of the shoot as cluster and context name, e.g. shoot-[-]<project-name-[-]<shoot-name>
. You have the shoot name in the current target, so you can easily find the project name from the technical name.
/lgtm |
pkg/cmd/miscellaneous.go
Outdated
} | ||
pieces := strings.Split(apiAdress, ".") | ||
|
||
return "garden-" + pieces[2] |
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 kubeconfig
file contains the technical name of the shoot as cluster and context name, e.g. shoot-[-]<project-name-[-]<shoot-name>
. You have the shoot name in the current target, so you can easily find the project name from the technical name.
Sorry for the delay but we are fixing issues with the logging stack. Hope next week will finish this PR |
@Kristian-ZH , thanks! absolutely not urgent, take your time! i just regularly (as one of code owner) check the existing PR to make sure it's not blocked or forgotten ;) |
@vpnachev @neo-liang-sap Please check the latest changes |
/lgtm |
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.
Some suggestions for improvements.
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
What this PR does / why we need it:
Adapt logs command to Loki
This PR depends on this one: gardener/gardener#2515 and should wait until it is merged
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
@DockToFuture
Release note: