Skip to content

docs: add design proposal for kubernetes installer enhancement #17

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

Closed
wants to merge 3 commits into from

Conversation

hyunsun
Copy link
Contributor

@hyunsun hyunsun commented May 18, 2025

PULL DESCRIPTION

Impact Analysis

Info Please fill out this column
Root Cause Specifically for bugs, empty in case of no variants
Jira ticket Add the name to the Jira ticket eg: "NEX-". Automation will do the linking to Jira

CODE MAINTAINABILITY

  • Added required new tests relevant to the changes and the URL has been included
  • Updated Documentation as relevant to the changes
  • PR change contains code related to security
  • PR introduces changes that break compatibility with other modules/services (If YES, please provide description)

Code must act as a teacher for future developers

noProxy: localhost,127.0.0.1,10.0.0.0/8,192.168.0.0/16,.example.com
sshKey:
kubernetes:
kind: "KThreesControlPlaneTemplate"
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the CAPI CRD will just be a reference for the fields this should have and it won't need to stick to it strictly with unused fields (i.e kind: KThreesControlPlaneTemplate, apiVersion: v1)


#### Cluster Bootstrapper

A new Go-based tool, `cluster-bootstrapper`, will be introduced to generate the cloud-init configuration from the Kubernetes Configuration section of the `config-file`. This tool will leverage the [CAPI K3s bootstrap provider codebase](https://github.com/k3s-io/cluster-api-k3s/tree/main/pkg/cloudinit). The `cluster-bootstrapper` binary will be released as a Docker image and included in the `volume` section in `hook-os.yaml` for use by the `os-installer` service.
Copy link
Contributor

Choose a reason for hiding this comment

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

Transitioning to a go based installer whilst also implementing k3s might be quite difficult if there are any issues with cluster setup that take time to resolve. There appears to be a lot of overlap between k3s and rke2 in terms of configuration (e.g addon configuration seems identical) so I think it would make sense to first refactor the current installation scripts to:

  • bootstrap k3s cluster
  • accept new config fields based on KThreesControlPlaneTemplate
  • get all extensions installed and stable

Then once everything is implemented we can start on the go installer and yaml config file as a port rather than a full reimplementation

Copy link
Contributor Author

@hyunsun hyunsun May 20, 2025

Choose a reason for hiding this comment

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

Feel free to suggest implementation plan in another patch to this PR and if you think the amount of work needed spans multiple releases, we can. Also see other ADR about addons - the plan is to drop majority of previous default addons and reuse K3s built-in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Added a suggested edit. Feel free to commit if it looks ok. The plan would be to use the current installation method for 3.1, starting development if there's time and aiming to fully implement and switch to it for 3.2

@gcgirish
Copy link
Member

gcgirish commented May 19, 2025

lgtm. Few minor comments/questions.

adorney99 pushed a commit that referenced this pull request May 21, 2025
)

* standalone cloud-init changes to install cluster and proxy settings

* Update Jenkinsfile

* Update Jenkinsfile

---------

Co-authored-by: sybacharan <[email protected]>
chmod +x /mnt/etc/cloud/cloud.cfg.d/kubernetes.cfg
}
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
In 3.1 the current installation method will be used to install k3s and minimal extensions.
Outlining and development for this installer along with the yaml config file will begin in 3.1 with the goal of releasing for 3.2

Copy link

This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing PR after 15 days.

1 similar comment
Copy link

This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing PR after 15 days.

@hyunsun hyunsun closed this Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants