Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Make logPodSeed use the current context #431

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions pkg/cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ func runCommand(args []string) {
case "addon-manager":
logsAddonManager()
case "vpn-seed":
logsVpnSeed(args[1])
if len(args) == 2 {
logsVpnSeed(args[1])
} else {
logsVpnSeed(emptyString)
}
case "vpn-shoot":
logsVpnShoot()
case "machine-controller-manager":
Expand Down Expand Up @@ -473,7 +477,6 @@ func logPodShoot(toMatch, namespace string, container string) {
Client, err = clientToTarget(TargetKindShoot)
checkError(err)
if container != emptyString {
container = " -c " + container
showLogsFromKubectl(namespace, toMatch, container)
} else {
showLogsFromKubectl(namespace, toMatch, emptyString)
Expand Down Expand Up @@ -573,9 +576,14 @@ func saveLogsControllerManager() {
}

// logsVpnSeed prints the logfile of the vpn-seed container
func logsVpnSeed(shootName string) {
func logsVpnSeed(shootTechnicalID string) {
fmt.Println("-----------------------Kube-Apiserver")
logPodSeed("kube-apiserver", shootName, "vpn-seed")
if shootTechnicalID == emptyString {
shootTechnicalID = getFromTargetInfo("shootTechnicalID")
logPodSeed("kube-apiserver", shootTechnicalID, "vpn-seed")
} else {
logPodSeed("kube-apiserver", shootTechnicalID, "vpn-seed")
}
}

// logsEtcdOpertor prints the logfile of the etcd-operator
Expand Down