-
Notifications
You must be signed in to change notification settings - Fork 1.7k
e2e-k8s.sh drop CLUSTER_LOG_FORMAT and add versioned kubeadm config patches #4046
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c46b15a to
d530442
Compare
|
/retest |
1 similar comment
|
/retest |
|
/retest |
|
/retest |
d530442 to
9d469f5
Compare
|
Bit concerned that the non-default logging flags are loadbearing but that's not new to this PR ... |
| kubeadmConfigPatches: | ||
| # v1beta4 for the future (v1.35.0+ ?) | ||
| # https://github.com/kubernetes-sigs/kind/issues/3847 | ||
| # TODO: drop v1beta3 when we no longer need versions that use 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.
Can you add some comments about container-log-max-files and container-log-max-size? As we learned, they are required by at least one job. This is valuable information that we should preserve for the next person who needs to edit this file. Something like:
| # TODO: drop v1beta3 when we no longer need versions that use it | |
| # TODO: drop v1beta3 when we no longer need versions that use it | |
| # | |
| # container-log-max-files and container-log-max-size affect overall | |
| # performance and resource requirements of jobs. Extra care is | |
| # necessary before changing them. |
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, I suppose, but this script is frequently copied wholesale as the basis for new scripts / jobs where that may not be relevant at all. I'm currently working on cleaning up many of those scripts and some of them don't set these already. I think the real issue is this job is barely succeeding with insufficient resources and/or noisy neighbor issues.
This may or may not be true next time it is edited even for the one job, but we that is why we run an extensive set of critical jobs based on this script to any PR to this repo.
Either way, a follow up goal is to eliminate these non-default values, it appears they were desired in the context of testing structured logging but got added to all configurations.
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.
Perhaps a more detailed comment explaining that you should probably drop this from any derivative scripts, but I doubt on the other hand anyone will read 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.
it appears they were desired in the context of testing structured logging
Now I am curious, because I don't think they were added for that.
The settings got added in #3774 because of #3772, on behalf of @aojea. Then later it was updated in https://github.com/kubernetes-sigs/kind/pull/3774/files. Different commit, same PR.
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've not been involved in any of this, so I lack context. You had some concerns about not testing defaults.
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.
My takeaway from this is (once again) that explaining changes in GitHub PRs is not sufficient. It must be documented in the code for the next person who has to make changes to the file. It might even be the same person.
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'll have more time to dig and update later
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 added a warning
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.
Warning looks good, thanks!
Now only https://github.com/kubernetes-sigs/kind/pull/4046/files#r2501870491 is open as far as I can tell.
|
/cc @neolit123 @pacoxu |
neolit123
left a comment
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.
extra args diff lgtm
/lgtm
/hold
hack/ci/e2e-k8s.sh
Outdated
| kind: ClusterConfiguration | ||
| apiVersion: kubeadm.k8s.io/v1beta4 | ||
| metadata: | ||
| name: config |
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.
note that running strict validation will report this. there is no objectmeta on the kubeadm kinds.
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.
IIRC this is optionally used to match the object in the patch runtime and stripped out before reaching kubeadm to avoid this
kind/pkg/cluster/internal/create/actions/config/config.go
Lines 244 to 255 in b2b7266
| // trims out the metadata.name we put in the config for kustomize matching, | |
| // kubeadm will complain about this otherwise | |
| func removeMetadata(kustomized string) string { | |
| return strings.Replace( | |
| kustomized, | |
| `metadata: | |
| name: config | |
| `, | |
| "", | |
| -1, | |
| ) | |
| } |
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.
IIRC kustomize required these fields to match patches, so we have the code to post-process dropping them, but kind's own patch runtime doesn't require this IIRC (we should keep the post-process bit for compatibility)
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.
Yeah, our internal simplified patch runtime only matches on kind/version, it doesn't support having multiple named objects anyhow, so we can just drop this here but also all the examples ... I will leave the examples for another PR
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.
(will also leave strict validation to another PR)
5c8126c to
56265ef
Compare
|
New changes are detected. LGTM label has been removed. |
x-ref kubernetes/test-infra#35846 #3847