File tree 6 files changed +89
-1
lines changed
6 files changed +89
-1
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : machineconfiguration.openshift.io/v1
2
+ kind : KubeletConfig
3
+ metadata :
4
+ name : swap-config
5
+ spec :
6
+ machineConfigPoolSelector :
7
+ matchLabels :
8
+ pools.operator.machineconfiguration.openshift.io/master : " "
9
+ kubeletConfig :
10
+ failSwapOn : false
11
+ memorySwap :
12
+ swapBehavior : UnlimitedSwap
Original file line number Diff line number Diff line change
1
+ apiVersion : machineconfiguration.openshift.io/v1
2
+ kind : MachineConfig
3
+ metadata :
4
+ labels :
5
+ machineconfiguration.openshift.io/role : master
6
+ name : 99-kernel-swapcount-arg
7
+ spec :
8
+ config :
9
+ ignition :
10
+ version : 3.4.0
11
+ kernelArguments :
12
+ - swapaccount=1
Original file line number Diff line number Diff line change
1
+ apiVersion : machineconfiguration.openshift.io/v1
2
+ kind : MachineConfig
3
+ metadata :
4
+ labels :
5
+ machineconfiguration.openshift.io/role : master
6
+ name : 99-openshift-machineconfig-master-swap-service
7
+ spec :
8
+ config :
9
+ ignition :
10
+ version : 3.4.0
11
+ systemd :
12
+ units :
13
+ - contents : |
14
+ [Unit]
15
+ Description=Create 4GB swap partition
16
+ Before=var-crc-swapfile1.swap
17
+
18
+ [Service]
19
+ Type=oneshot
20
+ RemainAfterExit=yes
21
+ ExecStart=/usr/bin/mkdir -p /var/crc
22
+ ExecStart=/usr/bin/fallocate -l 4096m /var/crc/swapfile1
23
+ ExecStart=/usr/bin/chmod 600 /var/crc/swapfile1
24
+ ExecStart=/usr/sbin/mkswap /var/crc/swapfile1
25
+
26
+ [Install]
27
+ WantedBy=multi-user.target
28
+ enabled: false
29
+ name: swap-partition.service
30
+ - contents : |
31
+ [Unit]
32
+ Description=Turn on the swap
33
+
34
+ [Swap]
35
+ What=/var/crc/swapfile1
36
+
37
+ [Install]
38
+ WantedBy=multi-user.target
39
+ enabled: false
40
+ name: var-crc-swapfile1.swap
41
+ networkd : {}
42
+ passwd : {}
43
+ storage : {}
44
+ osImageURL : " "
Original file line number Diff line number Diff line change
1
+ apiVersion : config.openshift.io/v1
2
+ kind : FeatureGate
3
+ metadata :
4
+ name : cluster
5
+ spec :
6
+ customNoUpgrade :
7
+ enabled :
8
+ - NodeSwap
9
+ - BuildCSIVolumes
10
+ featureSet : CustomNoUpgrade
11
+ status :
12
+ featureGates : null
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ if [ ${BUNDLE_TYPE} != "microshift" ]; then
51
51
52
52
# Stop the kubelet service so it will not reprovision the pods
53
53
${SSH} core@${VM_IP} -- sudo systemctl stop kubelet
54
+ # Enable swap partition and swap service
55
+ ${SSH} core@${VM_IP} -- sudo systemctl enable swap-partition.service
56
+ ${SSH} core@${VM_IP} -- sudo systemctl enable var-crc-swapfile1.swap
54
57
fi
55
58
56
59
# Enable the system and user level podman.socket service for API V2
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ INSTALL_DIR=crc-tmp-install-data
26
26
SNC_PRODUCT_NAME=${SNC_PRODUCT_NAME:- crc}
27
27
SNC_CLUSTER_MEMORY=${SNC_CLUSTER_MEMORY:- 14336}
28
28
SNC_CLUSTER_CPUS=${SNC_CLUSTER_CPUS:- 6}
29
- CRC_VM_DISK_SIZE=${CRC_VM_DISK_SIZE:- 31 }
29
+ CRC_VM_DISK_SIZE=${CRC_VM_DISK_SIZE:- 35 }
30
30
BASE_DOMAIN=${CRC_BASE_DOMAIN:- testing}
31
31
CRC_PV_DIR=" /mnt/pv-data"
32
32
SSH=" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_ecdsa_crc"
@@ -147,6 +147,11 @@ cp cluster-network-03-config.yaml ${INSTALL_DIR}/manifests/
147
147
cp 99_master-chronyd-mask.yaml $INSTALL_DIR /openshift/
148
148
# Add dummy network unit file
149
149
cp 99-openshift-machineconfig-master-dummy-networks.yaml $INSTALL_DIR /openshift/
150
+ cp 99-openshift-machineconfig-master-swap-count.yaml $INSTALL_DIR /openshift/
151
+ cp 99-openshift-machineconfig-master-swap-service.yaml $INSTALL_DIR /openshift/
152
+ cp 99-kubelet-config.yaml $INSTALL_DIR /openshift/
153
+ cp 99_feature-gate.yaml $INSTALL_DIR /openshift/
154
+
150
155
# Add kubelet config resource to make change in kubelet
151
156
DYNAMIC_DATA=$( base64 -w0 node-sizing-enabled.env) envsubst < 99_master-node-sizing-enabled-env.yaml.in > $INSTALL_DIR /openshift/99_master-node-sizing-enabled-env.yaml
152
157
# Add codeReadyContainer as invoker to identify it with telemeter
You can’t perform that action at this time.
0 commit comments