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

gardenctl logs tf fix #185

Merged
merged 2 commits into from
Apr 9, 2020
Merged

gardenctl logs tf fix #185

merged 2 commits into from
Apr 9, 2020

Conversation

tedteng
Copy link
Contributor

@tedteng tedteng commented Apr 9, 2020

What this PR does / why we need it:
add: gardenctl logs readme
fix: gardenctl logs tf infra result output null
add: gardenctl logs tf infra shoot-name result output display only from shoot cluster instead of all shoot clusters

Which issue(s) this PR fixes:
Fixes #183

Special notes for your reviewer:
image

Release note:

gardenctl logs tf infra output null fix and logs function README update

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 9, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 9, 2020
README.md Outdated
`gardenctl logs api | scheduler | controller-manager | etcd-main -c etcd |etcd-main -c backup-restore | vpn-seed | vpn-shoot | machine-controller-manager | prometheus |grafana | alertmanager | cluster-autoscaler`
- Show logs from garden nodes
`gardenctl target -g garden-name`
`gardenctl logs gardener-apiserver | gardener-controller-manager`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove one space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

pkg/cmd/logs.go Outdated Show resolved Hide resolved
pkg/cmd/logs.go Outdated Show resolved Hide resolved
break
}

var prefixName string = (args[02])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also check if shoot name exists and please use args[2]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my understanding, so far the logic for logs tf will fetch all podName and podNamespace from a seed node, then match infra.tf from List output to found the pod name.
It takes about at least 11M List output data when I testing, depends on the total of shoots host in the seed node.
To check shoot name whether exists, it maybe double the times for the result output. search shoot name from List output ->exist -> search infra.tf from List output to found the pod name. Let me know any concerns. thanks

https://github.com/gardener/gardenctl/blob/f68840200614710714ba6df3cdc7626ea4be7ecc/pkg/cmd/logs.go#L506-L522

@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 9, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 9, 2020
Copy link
Contributor

@DockToFuture DockToFuture left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@DockToFuture DockToFuture merged commit 988e928 into gardener-attic:master Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gardenctl logs issue
4 participants