-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
improve kubeconfig file modification time #67093
improve kubeconfig file modification time #67093
Conversation
@juanvallejo /sig api-machinery |
It looks like this works. Please confirm there is test coverage on this. |
Trades runtime complexity for spacial complexity when modifying large amounts of contexts on a kubeconfig. In cases where there are few destination filenames for a given amount of contexts, but a large amount of contexts, this patch prevents reading and writing to the same file (or small number of files) over and over again needlessly.
2c05e89
to
d565194
Compare
Added a test for context modification |
/lgtm |
/assign @yliaog |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, juanvallejo, yliaog 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 |
Automatic merge from submit-queue (batch tested with PRs 67161, 67093, 67077). If you want to cherry-pick this change to another branch, please follow the instructions here. |
…fig-tests Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. use temp file for kubeconfig in test Followup to #67093 Updates client_config_test to use a temporary file for kubeconfig. **Release note**: ```release-note NONE ``` cc @deads2k @soltysh
…fig-tests Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. use temp file for kubeconfig in test Followup to kubernetes/kubernetes#67093 Updates client_config_test to use a temporary file for kubeconfig. **Release note**: ```release-note NONE ``` cc @deads2k @soltysh Kubernetes-commit: 46bfa1ab17afaffc584f560ee5c752ecbbad4f61
…fig-tests Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. use temp file for kubeconfig in test Followup to kubernetes/kubernetes#67093 Updates client_config_test to use a temporary file for kubeconfig. **Release note**: ```release-note NONE ``` cc @deads2k @soltysh Kubernetes-commit: 46bfa1ab17afaffc584f560ee5c752ecbbad4f61
…fig-tests Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. use temp file for kubeconfig in test Followup to kubernetes/kubernetes#67093 Updates client_config_test to use a temporary file for kubeconfig. **Release note**: ```release-note NONE ``` cc @deads2k @soltysh Kubernetes-commit: 46bfa1ab17afaffc584f560ee5c752ecbbad4f61
In cases where there are few destination filenames for a given
amount of contexts, but a large amount of contexts, this patch
prevents reading and writing to the same file (or small number
of files) over and over again needlessly.
Release note:
cc @deads2k