Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new "mlab/managed" label to physical k8s nodes (#261)
* Adds new mlab/managed label key to physical nodes Minimal sites do not have switches, yet today the Disco DaemonSet deploys to every physical machine. On minimal sites Disco crashloops because there is no switch. This commit adds a new node label named "mlab/managed", which has the same meaning and possible values as the "managed" metadata field. Indeed, the value is taken directly from /var/local/metadata/managed. This script gets run by epoxy_client as part of the setup-after-boot.service. This service is configured to run _after_ the write-metadata.service, which should ensure that the file is properly populated with the appropriate value. * Converts comma in managed value to a dash For "full" physical sites the content of /var/local/metadata/managed is "switch,machine". The plan was to use the value of this file as the value of a new "mlab/managed" node label. However, kubernetes node label values cannot contain commas. As a workaround, this commit changes any commas to dashes, which are valid. * Adds a new MANAGED variable to setup_k8s.sh This may make the NODE_LABELS variable assignment a bit more readable.
- Loading branch information