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
25
group : cluster.x-k8s.io
20
26
version : v1beta1
@@ -29,11 +35,40 @@ patches:
29
35
pods:
30
36
cidrBlocks:
31
37
- 10.192.0.0/10
32
- - fd02::/80
33
38
services:
34
39
cidrBlocks:
35
40
- 10.96.0.0/12
36
41
- fd03::/108
42
+ - target :
43
+ group : infrastructure.cluster.x-k8s.io
44
+ version : v1alpha2
45
+ kind : LinodeMachineTemplate
46
+ patch : |-
47
+ apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
48
+ kind: LinodeMachineTemplate
49
+ metadata:
50
+ name: ${CLUSTER_NAME}-control-plane
51
+ spec:
52
+ template:
53
+ spec:
54
+ ipv6Options:
55
+ enableSLAAC: true
56
+ isPublicIPv6: true
57
+ - target :
58
+ group : infrastructure.cluster.x-k8s.io
59
+ version : v1alpha2
60
+ kind : LinodeMachineTemplate
61
+ patch : |-
62
+ apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
63
+ kind: LinodeMachineTemplate
64
+ metadata:
65
+ name: ${CLUSTER_NAME}-md-0
66
+ spec:
67
+ template:
68
+ spec:
69
+ ipv6Options:
70
+ enableSLAAC: true
71
+ isPublicIPv6: true
37
72
- target :
38
73
group : controlplane.cluster.x-k8s.io
39
74
version : v1beta2
@@ -47,9 +82,7 @@ patches:
47
82
kthreesConfigSpec:
48
83
serverConfig:
49
84
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"
85
+ - "allocate-node-cidrs=false"
53
86
- target :
54
87
group : controlplane.cluster.x-k8s.io
55
88
version : v1beta2
@@ -65,18 +98,29 @@ patches:
65
98
namespace: kube-system
66
99
spec:
67
100
targetNamespace: kube-system
68
- version: ${CILIUM_VERSION:=1.15.4 }
101
+ version: ${CILIUM_VERSION:=1.16.10 }
69
102
chart: cilium
70
103
repo: https://helm.cilium.io/
71
104
bootstrap: true
72
105
valuesContent: |-
73
106
bgpControlPlane:
74
107
enabled: true
108
+ routingMode: native
109
+ kubeProxyReplacement: true
110
+ ipv4NativeRoutingCIDR: ${VPC_NETWORK_CIDR:=10.0.0.0/8}
111
+ ipv6NativeRoutingCIDR: ::/0
112
+ tunnelProtocol: ""
113
+ enableIPv4Masquerade: true
114
+ enableIPv6Masquerade: false
75
115
policyAuditMode: ${FW_AUDIT_ONLY:=true}
76
116
hostFirewall:
77
117
enabled: true
78
118
extraConfig:
79
119
allow-localhost: policy
120
+ k8sServiceHost: 10.0.0.2
121
+ k8sServicePort: 6443
122
+ extraArgs:
123
+ - --nodeport-addresses=0.0.0.0/0
80
124
ipam:
81
125
mode: kubernetes
82
126
ipv4:
@@ -85,36 +129,68 @@ patches:
85
129
enabled: true
86
130
k8s:
87
131
requireIPv4PodCIDR: true
132
+ requireIPv6PodCIDR: true
88
133
hubble:
89
134
relay:
90
135
enabled: true
91
136
ui:
92
137
enabled: true
93
138
- 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
139
+ kind : HelmChartProxy
140
+ name : .*-linode-cloud-controller-manager
111
141
patch : |-
112
142
- 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
143
+ path: /spec/valuesTemplate
144
+ value: |
145
+ routeController:
146
+ vpcNames: {{ .InfraCluster.spec.vpcRef.name }}
147
+ clusterCIDR: ${VPC_NETWORK_CIDR:=10.192.0.0/10}
148
+ configureCloudRoutes: true
149
+ secretRef:
150
+ name: "linode-token-region"
151
+ image:
152
+ tag: v0.9.0
153
+ pullPolicy: IfNotPresent
154
+ enableNodeIPAM: true
155
+ tolerations:
156
+ # The CCM can run on Nodes tainted as masters
157
+ - key: "node-role.kubernetes.io/control-plane"
158
+ effect: "NoSchedule"
159
+ # The CCM is a "critical addon"
160
+ - key: "CriticalAddonsOnly"
161
+ operator: "Exists"
162
+ # This taint is set on all Nodes when an external CCM is used
163
+ - key: node.cloudprovider.kubernetes.io/uninitialized
164
+ value: "true"
165
+ effect: NoSchedule
166
+ - key: node.kubernetes.io/not-ready
167
+ operator: Exists
168
+ effect: NoSchedule
169
+ - key: node.kubernetes.io/unreachable
170
+ operator: Exists
171
+ effect: NoSchedule
172
+ - key: node.cilium.io/agent-not-ready
173
+ operator: Exists
174
+ effect: NoSchedule
175
+ env:
176
+ - name: LINODE_EXTERNAL_SUBNET
177
+ value: ${LINODE_EXTERNAL_SUBNET:=""}
178
+ - name: LINODE_URL
179
+ value: ${LINODE_URL:="https://api.linode.com"}
180
+ - name: SSL_CERT_DIR
181
+ value: "/tls"
182
+ - name: LINODE_API_VERSION
183
+ value: v4beta
184
+ - name: KUBERNETES_SERVICE_HOST
185
+ value: "{{ .InfraCluster.spec.controlPlaneEndpoint.host }}"
186
+ - name: KUBERNETES_SERVICE_PORT
187
+ value: "{{ .InfraCluster.spec.controlPlaneEndpoint.port }}"
188
+ volumeMounts:
189
+ - name: cacert
190
+ mountPath: /tls
191
+ readOnly: true
192
+ volumes:
193
+ - name: cacert
194
+ secret:
195
+ secretName: linode-ca
196
+ defaultMode: 420
0 commit comments