Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 278ddec

Browse files
committed
Add documentation how to add new OS/k8s version combinations
1 parent a50cf24 commit 278ddec

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,23 @@ To see the name of the docker image that would be built, run:
208208
make image-name
209209
```
210210

211+
To push it out:
212+
213+
```
214+
make docker-push
215+
```
216+
211217
To build individual components, call its target:
212218

213219
```
220+
make manifests
214221
make manager
215222
make clusterctl
216-
make manifests
217223
```
218224

219225
As always with `make`, you can force the rebuilding of a component with `make -B <target>`.
220226

221-
## Running locally
227+
## Running manager locally
222228

223229
You can run the `manager` locally on your own laptop in order to ease and speed development, or even run it through a debugger. The steps are:
224230

@@ -236,6 +242,26 @@ In the above example:
236242

237243
Caching the CA caches the certs **and the keys**. Only do this in test mode, or if you really are sure what you are doing. The purpose, in this case, is to allow you to stop and start the process, and pick up existing certs.
238244

245+
## Supported OS and Versions
246+
247+
CAPP (Cluster API Provider for Packet) supports Ubuntu 18.04 and Kubernetes 1.14.3. To extend it to work with different combinations, you only need to edit the file [config/default/machine_configs.yaml](./config/default/machine_configs.yaml).
248+
249+
In this file, each list entry represents a combination of OS and Kubernetes version supported. Each entry is composed of the following parts:
250+
251+
* `machineParams`: list of the combination of OS image, e.g. `ubuntu_18_04`, and Kubernetes versions, both control plane and kubelet, to install. Also includes the container runtime to install.
252+
* `userdata`: the actual userdata that will be run on server instance startup.
253+
254+
When trying to install a new machine, the logic is as follows:
255+
256+
1. Take the requested image and kubernetes versions.
257+
1. Match those to an entry in `machineParams`. If it matches, use this `userdata`.
258+
259+
Important notes:
260+
261+
* There can be multiple `machineParams` entries for each `userdata`, enabling one userdata script to be used for more than one combination of OS and Kubernetes versions.
262+
* There are versions both for `controlPlane` and `kubelet`. `master` servers will match both `controlPlane` and `kubelet`; worker nodes will have no `controlPlane` entry.
263+
* The `containerRuntime` is installed as is. The value of `containerRuntime` will be passed to the userdata script as `${CR_PACKAGE}`, to be installed as desired.
264+
239265
## References
240266

241267
* [kubeadm yaml api](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2)

0 commit comments

Comments
 (0)