Skip to content
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

Retrieve the first log lines from failed kube-apiserver when k8s version <1.19 #4050

Merged
merged 1 commit into from
May 17, 2021

Conversation

vpnachev
Copy link
Member

@vpnachev vpnachev commented May 12, 2021

How to categorize this PR?
/area ops-productivity quality robustness
/kind enhancement

What this PR does / why we need it:
In some cases the kube-apiserver reports the wrong the configuration at the beginning and then the error is not observed in the last 10 lines. To improve ops productivity, we can read also the first lines (actually there is no concept for lines, but bytes) from the log.

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

Special notes for your reviewer:

Release note:

Some shoot clusters try to wrongly configure the `kube-apiserver` and it fails to start. Since some time, Gardener shows the last 10 log lines for such kube-apiservers in the `shoot..status.lastOperation.description', but error message with the useful information might not be in those lines. Therefore, for shoots clusters running on k8s <1.19 now also the first 1KiB of logs will be shown.

@vpnachev vpnachev requested a review from a team as a code owner May 12, 2021 18:15
@gardener-robot gardener-robot added area/ops-productivity Operator productivity related (how to improve operations) area/quality Output qualification (tests, checks, scans, automation in general, etc.) related area/robustness Robustness, reliability, resilience related kind/enhancement Enhancement, improvement, extension needs/review size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 12, 2021
@gardener-robot gardener-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 14, 2021
@gardener-robot gardener-robot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 14, 2021
Copy link
Member

@ialidzhikov ialidzhikov left a comment

Choose a reason for hiding this comment

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

/lgtm

@ialidzhikov ialidzhikov merged commit 98b5f82 into gardener:master May 17, 2021
@vpnachev vpnachev deleted the shoots/pod-recent-logs branch May 17, 2021 06:25
@ialidzhikov ialidzhikov added this to the v1.23 milestone May 17, 2021
krgostev pushed a commit to krgostev/gardener that referenced this pull request Apr 21, 2022
krgostev pushed a commit to krgostev/gardener that referenced this pull request Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ops-productivity Operator productivity related (how to improve operations) area/quality Output qualification (tests, checks, scans, automation in general, etc.) related area/robustness Robustness, reliability, resilience related kind/enhancement Enhancement, improvement, extension size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing log line when KAS is configured with unsupported feature gate
5 participants