Closed hashnao closed 4 years ago
@hashnao Thanks for the pull request. Currently, it is possible to mark the control-plane unschedulable by putting this file https://github.com/noseka1/openshift-auto-upi/blob/master/docs/examples/ignition/filetranspiler/bootstrap/opt/openshift/manifests/cluster-scheduler-01-config.yml in the right place so that it's applied by the filetranspiler.
I like the more straight forward approach suggested by your pull request. I will need to think about it a bit more.
I didn't realize that mastersSchedulable
can be set in the scheduler policy file. I agree with your idea as the scheduler is more flexible than directly modifying the manifest file, so I think it is enough to add documentation about cluster-scheduler-01-config.yml. I'll do that later.
@hashnao Sounds great. I created a card https://github.com/noseka1/openshift-auto-upi/projects/3#card-46038094 for adding the documentation. If you can implement it that would be awesome.
@noseka1 I've drafted the doc, so can you move it to In Progress?
@hashnao Great! I moved the card to "In Progress". Let me know when ready for the review. Thanks.
@noseka1 Thanks, I'm ready for the review!
@noseka1 Hi, can you review the commits, if you haven't?
@hashnao I verified that the method you described in this pull request works, i.e. one can drop the yaml files into the manifests directory and it will be picked up by the installer when generating the ignition file. I have to say that I didn't know about this method before, don't know if this method is documented anywhere.
I was suggesting an alternative method which is already implemented in openshift-auto-upi. This method leverages the filetranspiler tool https://github.com/ashcrow/filetranspiler. The filetranspiler must be installed on the helper node, https://github.com/noseka1/openshift-auto-upi/blob/master/docs/customizing_ignition_configs.md. After that:
$ mkdir -p files/ignition/filetranspiler/bootstrap/opt/openshift/manifests
$ cp docs/examples/ignition/filetranspiler/bootstrap/opt/openshift/manifests/cluster-scheduler-01-config.yml files/ignition/filetranspiler/bootstrap/opt/openshift/manifests/cluster-scheduler-01-config.yml
To enable the ignition modification for the boostrap node, add to the openshift_cluster_hosts.yml file:
openshift_cluster_hosts:
- hostname: bootstrap
ignition_transform:
filetranspiler_roots:
- files/ignition/filetranspiler/bootstrap
Then run the installation as usual, for example:
$ ansible-playbook openshift_libvirt_fwcfg.yml
The non-schedulable master configuration will be included in the ignition file and applied to the cluster.
The filetranspiler method is able to add files to an arbitrary location on the node. In contrast, the method described in this pull request is able to only add files to the manifest directory if my understanding is correct. The filetranspiler method as being more powerful is hence preferred.
Let me know your thoughts.
@noseka1 Thanks, I totally missed adding the filetranspiler tool, so I added it.
I also left the comment about modifying the <installation_directory>/manifests/cluster-scheduler-02-config.yml file
after generating the Kubernetes manifests using openshift-install create manifests
because I think this method is simpler than the filetranspiler method and some may prefer it as it's described in the official doc.
@hashnao Regarding the filetranspiler method, the instructions in the commit differ from the commands I posted above. Note that the transpiler method is not touching the files in openshift-auto-upi-workspace. Could you please update the commit to match the instructions I provided above?
The second method of manually modifying the generated manifests sounds good to me. I would put the two options into two separate sections each with its own title, though. That could make the distinction even more clear.
@noseka1 My apologies, I thought the filetranspiler uses the workspace directory, so updated the path you provided. Thanks for the advice about making the two options clearer. I updated the instruction as well.
@hashnao Thanks a lot for the great work! I merged it in.
Fixes noseka1/openshift-auto-upi#20