Make host references generic (no more server1), and iterate servers in templates, rather than hardcoding them - #94
Conversation
…n templates, rather than hardcoding them
|
I would like to add a suggestion: to RKE2/roles/add-server/templates/rke2-server-config.j2 and update else, when your first node goes down, you will get an error: on your worker nodes and they will show as not ready, when running kubectl get nodes. |
|
@wbarnard81 - while that suggestion looks useful, I generally try to maintain single-purpose PRs; Your suggestion feels like it should be it's own PR. The entire change in this PR is making the playbooks + templates generic so if someone puts different servers, or a different number of servers in the inventory file, everything just works. I can take a look at validating your change and opening a separate PR for it unless you're up to that? Question about the change you're proposing; is kube-vip already marked as critical addon, which would let it continue to run on the server nodes after your proposed change, or would there be an additional manifest change for kube-vip which should go along with what you're proposing? |
|
I added my comment here, as I wanted your changes as well and I am not sure when James is going to merge your changes, as I am sure he is a busy man. Other than that, I do not mind making my own PR. My suggestion is to mark the servers nodes as critical addons only, which kube-vip would be, so that will stay on the server nodes, as I prefer it. The changes I suggested, I already implemented in my files and deployed/tested. and the kube-vip pod is on the server nodes. |
Make all plays accessing "server1" use the first entry in "servers", rather than "server1".
In config templates which list the servers, iterate the members of the "server" group rather than hard-coding the lists.