Skip to content
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

Custom bootstrap configuration Documentation #935

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

louiseschmidtgen
Copy link
Contributor

Custom bootstrap configuration Documentation

This PR adds the custom bootstrap configuration documentation which includes bootstrapping with the interactive mode and through a configuration file.

@louiseschmidtgen louiseschmidtgen requested a review from a team as a code owner January 8, 2025 14:51
Copy link
Contributor

@nhennigan nhennigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. 😸

docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/index.md Outdated Show resolved Hide resolved
Copy link
Member

@berkayoz berkayoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, great work! A few points I'd like to bring up

@louiseschmidtgen
Copy link
Contributor Author

LGTM overall, great work! A few points I'd like to bring up

* IIRC All features are disabled by default when a config file is used unless `enabled: true` is set exclusively for desired features. I feel like we should mention this somewhere here. See https://github.com/canonical/k8s-snap/blob/main/tests/integration/templates/bootstrap-all.yaml for example

* Another point is we can pass a "bootstrap file" to the `join-cluster` command as well, which is mostly used to adjust per-node config. Should we make this into another page like join config or mention it here? @nhennigan

Just double checking: according to the bootstrap reference guide the network, dns and gateway are by default enabled and the rest disabled. Is that wrong?

Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @louiseschmidtgen, thanks a lot! LGTM overall, just some minor nits.

docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, added a couple of comments.
Great work @louiseschmidtgen

docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
docs/src/snap/howto/custom-bootstrap-config.md Outdated Show resolved Hide resolved
When creating a {{ product }} cluster that differs from the default
configuration you can choose to use a custom bootstrap configuration.
The CLI's interactive mode or a custom bootstrap configuration file allow you
to modify the configuration of the first node that will join your cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first node will always be control plane yes? Join the cluster implies it already exists. Suggestion: the first node of your cluster.

@nhennigan
Copy link
Contributor

nhennigan commented Jan 9, 2025

I think it is important to add the line about providing a config file disabling the features by default. The user should be aware of exactly the implications of using a custom config file.

  • Another point is we can pass a "bootstrap file" to the join-cluster command as well, which is mostly used to adjust per-node config. Should we make this into another page like join config or mention it here? @nhennigan

Mateo also did a similar page for the charms here where the worker nodes custom config join was a separate page. I liked how he had different workers configs for different workloads. It is not a massive deal whether this is two separate pages or one but I would lean towards two.

@berkayoz
Copy link
Member

Agreed @nhennigan , we should definitely mention it. I recall a user hitting this case and getting confused.

And for @louiseschmidtgen to verify that features are disabled unless specified you can bootstrap a cluster with

pod-cidr: 10.100.0.0/16
service-cidr: 10.200.0.0/16

as the config file and check k8s status and k8s kubectl get all -A.

@louiseschmidtgen
Copy link
Contributor Author

@nhennigan and @berkayoz I've corrected the default feature settings reference.
+1 on a separate page for the join config.

Copy link
Contributor

@nhennigan nhennigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Small nit and then good to merge 😄


``` {note}
By default all features including network, dns, gateway, ingress, load-balancer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add when using a custom bootstrap configuration file. They are not set disabled by default if you use the generic bootstrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants