File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 10
10
version : ${KUBERNETES_VERSION}
11
11
nodeName : ' {{ ds.meta_data.label }}'
12
12
cisProfile : ${CIS_PROFILE:-"cis-1.23"}
13
+ protectKernelDefaults : true
13
14
# TODO: use MDS to get public and private IP instead because hostname ordering can't always be assumed
14
15
preRKE2Commands :
15
16
- |
18
19
- sed -i '/swap/d' /etc/fstab
19
20
- swapoff -a
20
21
- hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
22
+ - cp -f /usr/local/share/rke2/rke2-cis-sysctl.conf /etc/sysctl.d/60-rke2-cis.conf
23
+ - systemctl restart systemd-sysctl
24
+ - useradd -r -c "etcd user" -s /sbin/nologin -M etcd -U
Original file line number Diff line number Diff line change @@ -34,11 +34,15 @@ spec:
34
34
version : ${KUBERNETES_VERSION}
35
35
nodeName : ' {{ ds.meta_data.label }}'
36
36
cisProfile : ${CIS_PROFILE:-"cis-1.23"}
37
+ protectKernelDefaults : true
37
38
preRKE2Commands :
38
39
- |
39
40
mkdir -p /etc/rancher/rke2/config.yaml.d/
40
41
echo "node-ip: $(hostname -I | grep -oE 192\.168\.[0-9]+\.[0-9]+)" >> /etc/rancher/rke2/config.yaml.d/capi-config.yaml
41
42
- sed -i '/swap/d' /etc/fstab
42
43
- swapoff -a
43
44
- hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
45
+ - cp -f /usr/local/share/rke2/rke2-cis-sysctl.conf /etc/sysctl.d/60-rke2-cis.conf
46
+ - systemctl restart systemd-sysctl
47
+ - useradd -r -c "etcd user" -s /sbin/nologin -M etcd -U
44
48
replicas : ${CONTROL_PLANE_MACHINE_COUNT}
You can’t perform that action at this time.
0 commit comments