-
Notifications
You must be signed in to change notification settings - Fork 28
[feat] templates: add Flatcar template #394
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5cd3776
api: add InstanceConfiguration
tormath1 540add4
controller/machine: set the Kernel configuration before booting
tormath1 32daff2
templates: add Flatcar template
tormath1 2a7fa40
docs/flavors: add Flatcar
tormath1 641aba9
e2e: add Flatcar test
tormath1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Flatcar | ||
|
||
This flavor supports provisioning k8s clusters outside of VPC using [Flatcar][flatcar] as a base OS. It uses kubeadm for | ||
setting up control plane and uses cilium with VXLAN for pod networking. | ||
|
||
## Specification | ||
| Supported Control Plane | CNI | Default OS | Installs ClusterClass | IPv4 | IPv6 | | ||
|-------------------------|--------|--------------|-----------------------|------|------| | ||
| kubeadm | Cilium | Flatcar | No | Yes | No | | ||
|
||
## Notes | ||
This flavor is identical to the default flavor with the exception that it provisions | ||
k8s clusters without VPC using [Flatcar][flatcar] as a base OS. Since it runs outside of VPC, native routing is not | ||
supported in this flavor and it uses VXLAN for pod to pod communication. | ||
|
||
## Usage | ||
|
||
### Initialization | ||
|
||
Before generating the cluster configuration, it is required to initialize the management cluster with [Ignition][ignition] support to provision Flatcar nodes: | ||
|
||
```bash | ||
export EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION=true | ||
clusterctl init --infrastructure linode-linode --addon helm | ||
``` | ||
|
||
### Import the Flatcar image | ||
|
||
Flatcar is not officially provided by Akamai/Linode so it is required to import a Flatcar image. Akamai support is available on Flatcar since the release [4012.0.0][release-4012]: all releases equal or greater than this major release will fit. | ||
|
||
To import the image, it is recommended to follow this documentation: https://www.flatcar.org/docs/latest/installing/community-platforms/akamai/#importing-an-image | ||
|
||
By following this import step, you will get the Flatcar image ID stored into `IMAGE_ID`. | ||
|
||
### Configure and deploy the workload cluster | ||
|
||
1. Set the Flatcar image name from the previous step: | ||
```bash | ||
export FLATCAR_IMAGE_NAME="${IMAGE_ID}" | ||
``` | ||
|
||
2. Generate cluster yaml | ||
```bash | ||
clusterctl generate cluster test-cluster \ | ||
tormath1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--kubernetes-version v1.29.1 \ | ||
--infrastructure linode-linode \ | ||
--flavor kubeadm-flatcar > test-cluster.yaml | ||
``` | ||
2. Apply cluster yaml | ||
```bash | ||
kubectl apply -f test-cluster.yaml | ||
``` | ||
|
||
[flatcar]: https://www.flatcar.org/ | ||
[ignition]: https://coreos.github.io/ignition/ | ||
[release-4012]: https://www.flatcar.org/releases#release-4012.0.0 |
39 changes: 39 additions & 0 deletions
39
e2e/capl-cluster-flavors/kubeadm-flatcar-vpcless-capl-cluster/assert-capi-resources.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: capi-controller-manager | ||
namespace: capi-system | ||
status: | ||
availableReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: capl-controller-manager | ||
namespace: capl-system | ||
status: | ||
availableReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: capi-kubeadm-bootstrap-controller-manager | ||
namespace: kubeadm-bootstrap-system | ||
status: | ||
availableReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: capi-kubeadm-control-plane-controller-manager | ||
namespace: kubeadm-control-plane-system | ||
status: | ||
availableReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: caaph-controller-manager | ||
namespace: caaph-system | ||
status: | ||
availableReplicas: 1 |
35 changes: 35 additions & 0 deletions
35
...cluster-flavors/kubeadm-flatcar-vpcless-capl-cluster/assert-child-cluster-daemonsets.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: ccm-linode | ||
namespace: kube-system | ||
status: | ||
currentNumberScheduled: 1 | ||
desiredNumberScheduled: 1 | ||
numberAvailable: 1 | ||
numberMisscheduled: 0 | ||
numberReady: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: cilium | ||
namespace: kube-system | ||
status: | ||
currentNumberScheduled: 2 | ||
desiredNumberScheduled: 2 | ||
numberAvailable: 2 | ||
numberMisscheduled: 0 | ||
numberReady: 2 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: csi-linode-node | ||
namespace: kube-system | ||
status: | ||
currentNumberScheduled: 2 | ||
desiredNumberScheduled: 2 | ||
numberAvailable: 2 | ||
numberMisscheduled: 0 | ||
numberReady: 2 |
26 changes: 26 additions & 0 deletions
26
...luster-flavors/kubeadm-flatcar-vpcless-capl-cluster/assert-child-cluster-deployments.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cilium-operator | ||
namespace: kube-system | ||
status: | ||
availableReplicas: 2 | ||
readyReplicas: 2 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/part-of: cilium | ||
namespace: kube-system | ||
status: | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coredns | ||
namespace: kube-system | ||
status: | ||
availableReplicas: 2 | ||
readyReplicas: 2 |
61 changes: 61 additions & 0 deletions
61
...-cluster-flavors/kubeadm-flatcar-vpcless-capl-cluster/assert-child-cluster-resources.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | ||
kind: LinodeMachine | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: ($cluster) | ||
spec: | ||
region: (env('LINODE_REGION')) | ||
type: g6-standard-2 | ||
status: | ||
ready: true | ||
instanceState: running | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: ($cluster) | ||
spec: | ||
clusterName: ($cluster) | ||
status: | ||
bootstrapReady: true | ||
infrastructureReady: true | ||
--- | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: ($cluster) | ||
spec: | ||
clusterName: ($cluster) | ||
replicas: 1 | ||
status: | ||
readyReplicas: 1 | ||
unavailableReplicas: 0 | ||
availableReplicas: 1 | ||
--- | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmControlPlane | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: ($cluster) | ||
status: | ||
readyReplicas: 1 | ||
unavailableReplicas: 0 | ||
ready: true | ||
--- | ||
apiVersion: addons.cluster.x-k8s.io/v1alpha1 | ||
kind: HelmReleaseProxy | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: ($cluster) | ||
status: | ||
conditions: | ||
- type: Ready | ||
status: "True" | ||
- type: ClusterAvailable | ||
status: "True" | ||
- type: HelmReleaseReady | ||
status: "True" | ||
status: deployed |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.