Skip to content

Commit 0f375ca

Browse files
author
Rahul Sharma
committed
add nodeipam-ccm flavor
1 parent c68a6c3 commit 0f375ca

File tree

5 files changed

+109
-1
lines changed

5 files changed

+109
-1
lines changed

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [rke2](./topics/flavors/rke2.md)
1818
- [vpcless](./topics/flavors/vpcless.md)
1919
- [konnectivity (kubeadm)](./topics/flavors/konnectivity.md)
20+
- [NodeIPAM CCM (kubeadm)](./topics/flavors/nodeipam-ccm.md)
2021
- [DNS based apiserver Load Balancing](./topics/flavors/dns-loadbalancing.md)
2122
- [Flatcar](./topics/flavors/flatcar.md)
2223
- [Etcd](./topics/etcd.md)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Node IPAM using CCM
2+
3+
This flavor enables linode-cloud-controller-manager to perform nodeipam allocation. Nodeipam controller is disabled within kube-controller-manager and is enabled within CCM.
4+
5+
## Specification
6+
| Supported Control Plane | CNI | Default OS | Installs ClusterClass | IPv4 | IPv6 |
7+
|-------------------------|--------|--------------|-----------------------|------|------|
8+
| kubeadm | Cilium | Ubuntu 22.04 | No | Yes | No |
9+
10+
## Prerequisites
11+
[Quickstart](../getting-started.md) completed
12+
13+
## Notes
14+
This flavor is identical to the default flavor with the exception that it disables nodeipam controller within kube-controller-manager and uses nodeipam controller within CCM to allocate pod cidrs to nodes.
15+
16+
## Usage
17+
1. Generate cluster yaml
18+
```bash
19+
clusterctl generate cluster test-cluster \
20+
--infrastructure linode-linode \
21+
--flavor <controlplane>-nodeipam-ccm > test-cluster.yaml
22+
```
23+
2. Apply cluster yaml
24+
```bash
25+
kubectl apply -f test-cluster.yaml
26+
```

docs/src/topics/linode-cloud-controller-manager.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CCM is linode specific implementation of [Cloud Controller Manager](https://kube
99
* Node Controller: used for managing node objects in k8s cluster
1010
* Service Controller: used for managing services and exposing them to outside world
1111
* Route Controller: used for managing routes when running k8s cluster within VPC
12+
* Node IPAM Controller: if enabled, it allocates pod cidrs to nodes
1213

1314
## Installing CCM in custom environments (linode specific only)
1415

templates/addons/ccm-linode/ccm-linode.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
repoURL: https://linode.github.io/linode-cloud-controller-manager/
1010
chartName: ccm-linode
1111
namespace: kube-system
12-
version: ${LINODE_CCM_VERSION:=v0.5.2}
12+
version: ${LINODE_CCM_VERSION:=v0.6.0}
1313
options:
1414
waitForJobs: true
1515
wait: true
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- ../default
5+
6+
patches:
7+
- target:
8+
kind: HelmChartProxy
9+
name: .*-linode-cloud-controller-manager
10+
patch: |-
11+
- op: replace
12+
path: /spec/valuesTemplate
13+
value: |
14+
routeController:
15+
vpcNames: {{ .InfraCluster.spec.vpcRef.name }}
16+
clusterCIDR: ${VPC_NETWORK_CIDR:=10.192.0.0/10}
17+
configureCloudRoutes: true
18+
secretRef:
19+
name: "linode-token-region"
20+
image:
21+
pullPolicy: IfNotPresent
22+
enableNodeIPAM: true
23+
tolerations:
24+
# The CCM can run on Nodes tainted as masters
25+
- key: "node-role.kubernetes.io/control-plane"
26+
effect: "NoSchedule"
27+
# The CCM is a "critical addon"
28+
- key: "CriticalAddonsOnly"
29+
operator: "Exists"
30+
# This taint is set on all Nodes when an external CCM is used
31+
- key: node.cloudprovider.kubernetes.io/uninitialized
32+
value: "true"
33+
effect: NoSchedule
34+
- key: node.kubernetes.io/not-ready
35+
operator: Exists
36+
effect: NoSchedule
37+
- key: node.kubernetes.io/unreachable
38+
operator: Exists
39+
effect: NoSchedule
40+
- key: node.cilium.io/agent-not-ready
41+
operator: Exists
42+
effect: NoSchedule
43+
env:
44+
- name: LINODE_EXTERNAL_SUBNET
45+
value: ${LINODE_EXTERNAL_SUBNET:=""}
46+
- name: LINODE_URL
47+
value: ${LINODE_URL:="https://api.linode.com"}
48+
- name: SSL_CERT_DIR
49+
value: "/tls"
50+
- name: LINODE_API_VERSION
51+
value: v4beta
52+
- name: KUBERNETES_SERVICE_HOST
53+
value: "{{ .InfraCluster.spec.controlPlaneEndpoint.host }}"
54+
- name: KUBERNETES_SERVICE_PORT
55+
value: "{{ .InfraCluster.spec.controlPlaneEndpoint.port }}"
56+
volumeMounts:
57+
- name: cacert
58+
mountPath: /tls
59+
readOnly: true
60+
volumes:
61+
- name: cacert
62+
secret:
63+
secretName: linode-ca
64+
defaultMode: 420
65+
66+
- target:
67+
group: controlplane.cluster.x-k8s.io
68+
version: v1beta1
69+
kind: KubeadmControlPlane
70+
patch: |-
71+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
72+
kind: KubeadmControlPlane
73+
metadata:
74+
name: ${CLUSTER_NAME}-control-plane
75+
spec:
76+
kubeadmConfigSpec:
77+
clusterConfiguration:
78+
controllerManager:
79+
extraArgs:
80+
allocate-node-cidrs: "false"

0 commit comments

Comments
 (0)