1
1
apiVersion : kustomize.config.k8s.io/v1beta1
2
2
kind : Kustomization
3
3
resources :
4
- - ../vpcless
4
+ - ../default
5
5
6
6
patches :
7
7
- target :
8
8
group : infrastructure.cluster.x-k8s.io
9
9
version : v1alpha2
10
- kind : LinodeCluster
10
+ kind : LinodeVPC
11
11
patch : |-
12
12
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
13
- kind: LinodeCluster
13
+ kind: LinodeVPC
14
14
metadata:
15
15
name: ${CLUSTER_NAME}
16
16
spec:
17
- nodeBalancerFirewallRef: null
17
+ ipv6Range:
18
+ - range: auto
19
+ subnets:
20
+ - ipv4: ${VPC_NETWORK_CIDR:=10.0.0.0/8}
21
+ label: default
22
+ ipv6Range:
23
+ - range: auto
18
24
- target :
19
- group : cluster.x-k8s.io
20
- version : v1beta1
21
- kind : Cluster
25
+ group : infrastructure. cluster.x-k8s.io
26
+ version : v1alpha2
27
+ kind : LinodeMachineTemplate
22
28
patch : |-
23
- apiVersion: cluster.x-k8s.io/v1beta1
24
- kind: Cluster
29
+ apiVersion: infrastructure. cluster.x-k8s.io/v1alpha2
30
+ kind: LinodeMachineTemplate
25
31
metadata:
26
- name: ${CLUSTER_NAME}
32
+ name: ${CLUSTER_NAME}-control-plane
27
33
spec:
28
- clusterNetwork:
29
- pods:
30
- cidrBlocks:
31
- - 10.192.0.0/10
32
- - fd02::/80
33
- services:
34
- cidrBlocks:
35
- - 10.96.0.0/12
36
- - fd03::/108
34
+ template:
35
+ spec:
36
+ ipv6Options:
37
+ enableSLAAC: true
38
+ isPublicIPv6: true
39
+ - target :
40
+ group : infrastructure.cluster.x-k8s.io
41
+ version : v1alpha2
42
+ kind : LinodeMachineTemplate
43
+ patch : |-
44
+ apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
45
+ kind: LinodeMachineTemplate
46
+ metadata:
47
+ name: ${CLUSTER_NAME}-md-0
48
+ spec:
49
+ template:
50
+ spec:
51
+ ipv6Options:
52
+ enableSLAAC: true
53
+ isPublicIPv6: true
37
54
- target :
38
55
group : controlplane.cluster.x-k8s.io
39
56
version : v1beta2
@@ -47,9 +64,7 @@ patches:
47
64
kthreesConfigSpec:
48
65
serverConfig:
49
66
kubeControllerManagerArgs:
50
- - "node-cidr-mask-size-ipv6=96"
51
- clusterCidr: "10.192.0.0/10,fd02::/80"
52
- serviceCidr: "10.96.0.0/12,fd03::/108"
67
+ - "allocate-node-cidrs=false"
53
68
- target :
54
69
group : controlplane.cluster.x-k8s.io
55
70
version : v1beta2
@@ -65,18 +80,29 @@ patches:
65
80
namespace: kube-system
66
81
spec:
67
82
targetNamespace: kube-system
68
- version: ${CILIUM_VERSION:=1.15.4 }
83
+ version: ${CILIUM_VERSION:=1.16.10 }
69
84
chart: cilium
70
85
repo: https://helm.cilium.io/
71
86
bootstrap: true
72
87
valuesContent: |-
73
88
bgpControlPlane:
74
89
enabled: true
90
+ routingMode: native
91
+ kubeProxyReplacement: true
92
+ ipv4NativeRoutingCIDR: ${VPC_NETWORK_CIDR:=10.0.0.0/8}
93
+ ipv6NativeRoutingCIDR: ::/0
94
+ tunnelProtocol: ""
95
+ enableIPv4Masquerade: true
96
+ enableIPv6Masquerade: false
75
97
policyAuditMode: ${FW_AUDIT_ONLY:=true}
76
98
hostFirewall:
77
99
enabled: true
78
100
extraConfig:
79
101
allow-localhost: policy
102
+ k8sServiceHost: 10.0.0.2
103
+ k8sServicePort: 6443
104
+ extraArgs:
105
+ - --nodeport-addresses=0.0.0.0/0
80
106
ipam:
81
107
mode: kubernetes
82
108
ipv4:
@@ -85,36 +111,68 @@ patches:
85
111
enabled: true
86
112
k8s:
87
113
requireIPv4PodCIDR: true
114
+ requireIPv6PodCIDR: true
88
115
hubble:
89
116
relay:
90
117
enabled: true
91
118
ui:
92
119
enabled: true
93
120
- target :
94
- group : controlplane.cluster.x-k8s.io
95
- version : v1beta2
96
- kind : KThreesControlPlane
97
- patch : |-
98
- - op: replace
99
- path: /spec/kthreesConfigSpec/preK3sCommands
100
- value:
101
- - |
102
- mkdir -p /etc/rancher/k3s/config.yaml.d/
103
- echo "node-ip: $(ip a s eth0 |grep -E 'inet ' |cut -d' ' -f6|cut -d/ -f1 | grep -E '192.168'),$(ip a s eth0 |grep -E 'inet6 ' |cut -d' ' -f6|cut -d/ -f1 | grep -vE 'fe80')" >> /etc/rancher/k3s/config.yaml.d/capi-config.yaml
104
- - sed -i '/swap/d' /etc/fstab
105
- - swapoff -a
106
- - hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
107
- - target :
108
- group : bootstrap.cluster.x-k8s.io
109
- version : v1beta2
110
- kind : KThreesConfigTemplate
121
+ kind : HelmChartProxy
122
+ name : .*-linode-cloud-controller-manager
111
123
patch : |-
112
124
- op: replace
113
- path: /spec/template/spec/preK3sCommands
114
- value:
115
- - |
116
- mkdir -p /etc/rancher/k3s/config.yaml.d/
117
- echo "node-ip: $(ip a s eth0 |grep -E 'inet ' |cut -d' ' -f6|cut -d/ -f1 | grep -E '192.168'),$(ip a s eth0 |grep -E 'inet6 ' |cut -d' ' -f6|cut -d/ -f1 | grep -vE 'fe80')" >> /etc/rancher/k3s/config.yaml.d/capi-config.yaml
118
- - sed -i '/swap/d' /etc/fstab
119
- - swapoff -a
120
- - hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
125
+ path: /spec/valuesTemplate
126
+ value: |
127
+ routeController:
128
+ vpcNames: {{ .InfraCluster.spec.vpcRef.name }}
129
+ clusterCIDR: ${VPC_NETWORK_CIDR:=10.192.0.0/10}
130
+ configureCloudRoutes: true
131
+ secretRef:
132
+ name: "linode-token-region"
133
+ image:
134
+ tag: v0.9.0
135
+ pullPolicy: IfNotPresent
136
+ enableNodeIPAM: true
137
+ tolerations:
138
+ # The CCM can run on Nodes tainted as masters
139
+ - key: "node-role.kubernetes.io/control-plane"
140
+ effect: "NoSchedule"
141
+ # The CCM is a "critical addon"
142
+ - key: "CriticalAddonsOnly"
143
+ operator: "Exists"
144
+ # This taint is set on all Nodes when an external CCM is used
145
+ - key: node.cloudprovider.kubernetes.io/uninitialized
146
+ value: "true"
147
+ effect: NoSchedule
148
+ - key: node.kubernetes.io/not-ready
149
+ operator: Exists
150
+ effect: NoSchedule
151
+ - key: node.kubernetes.io/unreachable
152
+ operator: Exists
153
+ effect: NoSchedule
154
+ - key: node.cilium.io/agent-not-ready
155
+ operator: Exists
156
+ effect: NoSchedule
157
+ env:
158
+ - name: LINODE_EXTERNAL_SUBNET
159
+ value: ${LINODE_EXTERNAL_SUBNET:=""}
160
+ - name: LINODE_URL
161
+ value: ${LINODE_URL:="https://api.linode.com"}
162
+ - name: SSL_CERT_DIR
163
+ value: "/tls"
164
+ - name: LINODE_API_VERSION
165
+ value: v4beta
166
+ - name: KUBERNETES_SERVICE_HOST
167
+ value: "{{ .InfraCluster.spec.controlPlaneEndpoint.host }}"
168
+ - name: KUBERNETES_SERVICE_PORT
169
+ value: "{{ .InfraCluster.spec.controlPlaneEndpoint.port }}"
170
+ volumeMounts:
171
+ - name: cacert
172
+ mountPath: /tls
173
+ readOnly: true
174
+ volumes:
175
+ - name: cacert
176
+ secret:
177
+ secretName: linode-ca
178
+ defaultMode: 420
0 commit comments