-
Notifications
You must be signed in to change notification settings - Fork 715
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
Only create manifest files if they do not already exist #1679
Comments
This was a pretty quick change to make, I did it on my fork here (https://github.com/rcythr/kubernetes/compare/master...rcythr:dont_clobber_manifests) If the maintainers like this change I'll open a PR for it. |
/lifecycle active |
+1 |
just like to point out that calling the manifest/etcd phase, patching manifests and then calling init by skipping these phases is still a valid workflow. but the consistency of skipping already present files SGTM. |
I'm not sure this is the right way to proceed, or at least I need to better understand how this will impact on upgrades (see comments on the PR) |
@fabriziopandini #1379 would be great! I agree it's a more strategic way to solve this problem. Perhaps instead of preventing the recreation of manifests we should simply back them up? This would still be inconsistent with the other phases, but would be consistent with how the upgrade process handles the manifests. |
closing as the kustomize feature merged (alpha in 1.16) |
FEATURE REQUEST
Currently the certs and kubeconfig phases will skip creation of files if they already exist, preserving user changes; however, control-plane and etcd phases always recreate the manifest files.
This creates problems for my workflow because I'm currently manually patching the generated manifests in order to fix the securityContext for selinux. I can skip the preflight check for these manifest files, but my files get replaced. I work around this currently with --skip-phases.
I feel this is unexpected behavior as it is inconsistent with the other phases. I propose that the control-plane and etcd phases have the same behavior as certs and kubeconfig phases with respect to treatment of existing files.
Versions
kubeadm version (use
kubeadm version
):What happened?
When running
kubeadm init phase control-plane
orkubeadm init phase etcd local
the manifest files are always regenerated.What you expected to happen?
A log message would be printing whining about the files existence, but the existing files would not be replaced.
How to reproduce it (as minimally and precisely as possible)?
kubeadm init phase control-plane
orkubeadm init phase etcd local
The text was updated successfully, but these errors were encountered: