chore: run addon enabling script on joining control plane nodes - #123
Conversation
Signed-off-by: rapour <reza.abbasalipour@canonical.com>
berkayoz
left a comment
There was a problem hiding this comment.
The changes LGTM, one question related to the design/use-case.
| // IPinIP defines whether Calico will use IPinIP mode for cluster networking. | ||
| IPinIP bool | ||
| // Addons is the list of addons to enable. | ||
| Addons []string |
There was a problem hiding this comment.
How does this handle the addon parameters? What's our strategy for that use-case?
There was a problem hiding this comment.
Let's assume the user lists the addons they want to enable as part of their manifests:
...
controlPlaneConfig:
initConfiguration:
joinTokenTTLInSecs: 9000
addons:
- dns
- ingress
...The provider used to run microk8s enable dns ingress on the first CP node of the cluster (as part of the cloud-init scripts). This change make it so it runs microk8s enable dns ingress on all the subsequent joining CP nodes. This is particularly useful for addons like cis-hardening that needs to be run on each node individually.
berkayoz
left a comment
There was a problem hiding this comment.
LGTM, we can leave addon parameters out of scope for this one.
Addresses #122
This PR suggests running
microk8s enable <addons>on control plane nodes that are joining the cluster. A few considerations:cis-hardeningto be run on each control plane node joining the clusterdnsas a default addon.