Merge "Update default CRI and cgroup driver"

This commit is contained in:
Zuul 2021-05-25 16:50:18 +00:00 committed by Gerrit Code Review
commit 9f4b5b82bd
6 changed files with 36 additions and 15 deletions

View File

@ -130,4 +130,4 @@ stringData:
- mkdir -p /var/lib/docker-engine /mnt/ephemeral/var/lib/docker-engine
- mount --bind /mnt/ephemeral/var/lib/docker-engine /var/lib/docker-engine
- mkdir -p /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/
- mount --bind /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/
- mount --bind /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/

View File

@ -14,29 +14,41 @@ spec:
apiServer:
timeoutForControlPlane: 1000s
files:
- path: "/etc/systemd/system/docker.service.d/http-proxy.conf"
- path: "/etc/systemd/system/containerd.service.d/http-proxy.conf"
content: |
[Service]
Environment="HTTP_PROXY=REPLACEMENT_HTTP_PROXY"
Environment="HTTPS_PROXY=REPLACEMENT_HTTPS_PROXY"
Environment="NO_PROXY=REPLACEMENT_NO_PROXY"
# Since we are using containerd as a default CRI, we do not need
# any adjustments and settings for docker anymore. However, if for
# some reason docker has to be presented in the system, we need to
# create http-proxy.conf.
# TODO: add download sources to the versions catalogue
preKubeadmCommands:
# Restart docker to apply any proxy settings
- export HOME=/root
- mkdir -p /etc/containerd
- containerd config default | sed -r -e '/\[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc\]$/a\ SystemdCgroup = true' | tee /etc/containerd/config.toml
- systemctl daemon-reload
- systemctl restart docker
- systemctl restart containerd
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.local_hostname }}'
kubeletExtraArgs:
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }},node-type=controlplane'
cgroup-driver: "systemd"
container-runtime: remote
criSocket: "unix:///run/containerd/containerd.sock"
joinConfiguration:
controlPlane: {}
nodeRegistration:
name: '{{ ds.meta_data.local_hostname }}'
kubeletExtraArgs:
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }},node-type=controlplane'
cgroup-driver: "systemd"
container-runtime: remote
criSocket: "unix:///run/containerd/containerd.sock"
ntp:
servers:
- 0.pool.ntp.org

View File

@ -19,7 +19,7 @@ replacements:
name: cluster-controlplane
fieldrefs:
- "spec.kubeadmConfigSpec.preKubeadmCommands%REPLACEMENT_HTTP_PROXY%"
- "spec.kubeadmConfigSpec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTP_PROXY%"
- "{.spec.kubeadmConfigSpec.files[:].content}%REPLACEMENT_HTTP_PROXY%"
- source:
objref:
name: env-vars-catalogue
@ -30,7 +30,7 @@ replacements:
name: cluster-controlplane
fieldrefs:
- "spec.kubeadmConfigSpec.preKubeadmCommands%REPLACEMENT_HTTPS_PROXY%"
- "spec.kubeadmConfigSpec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTPS_PROXY%"
- "{.spec.kubeadmConfigSpec.files[:].content}%REPLACEMENT_HTTPS_PROXY%"
- source:
objref:
name: env-vars-catalogue
@ -41,4 +41,4 @@ replacements:
name: cluster-controlplane
fieldrefs:
- "spec.kubeadmConfigSpec.preKubeadmCommands%REPLACEMENT_NO_PROXY%"
- "spec.kubeadmConfigSpec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_NO_PROXY%"
- "{.spec.kubeadmConfigSpec.files[:].content}%REPLACEMENT_NO_PROXY%"

View File

@ -12,18 +12,27 @@ spec:
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }}'
provider-id: 'metal3://{{ ds.meta_data.uuid }}'
feature-gates: "IPv6DualStack=true"
cgroup-driver: "systemd"
container-runtime: remote
criSocket: "unix:///run/containerd/containerd.sock"
files:
- path: "/etc/systemd/system/docker.service.d/http-proxy.conf"
- path: "/etc/systemd/system/containerd.service.d/http-proxy.conf"
content: |
[Service]
Environment="HTTP_PROXY=REPLACEMENT_HTTP_PROXY"
Environment="HTTPS_PROXY=REPLACEMENT_HTTPS_PROXY"
Environment="NO_PROXY=REPLACEMENT_NO_PROXY"
# Since we are using containerd as a default CRI, we do not need
# any adjustments and settings for docker anymore. However, if for
# some reason docker has to be presented in the system, we need to
# create http-proxy.conf.
preKubeadmCommands:
# Restart docker to apply any proxy settings
# Restart docker and containerd to apply any proxy settings
- export HOME=/root
- mkdir -p /etc/containerd
- containerd config default | sed -r -e '/\[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc\]$/a\ SystemdCgroup = true' | tee /etc/containerd/config.toml
- systemctl daemon-reload
- systemctl restart docker
- systemctl restart containerd
users:
- name: deployer
sshAuthorizedKeys:

View File

@ -18,7 +18,7 @@ replacements:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTP_PROXY%"
- "{.spec.template.spec.files[:].content}%REPLACEMENT_HTTP_PROXY%"
- source:
objref:
name: env-vars-catalogue
@ -28,7 +28,7 @@ replacements:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_HTTPS_PROXY%"
- "{.spec.template.spec.files[:].content}%REPLACEMENT_HTTPS_PROXY%"
- source:
objref:
name: env-vars-catalogue
@ -38,4 +38,4 @@ replacements:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs:
- "spec.template.spec.files[path=/etc/systemd/system/docker.service.d/http-proxy.conf].content%REPLACEMENT_NO_PROXY%"
- "{.spec.template.spec.files[:].content}%REPLACEMENT_NO_PROXY%"

View File

@ -88,16 +88,16 @@
airship_gate_flavors:
medium:
disk_format: qcow2
ephemeral_disk_size: 20G
ephemeral_disk_size: 30G
ephemeral_vm_cfg: "{{ ephemeral_vm_cfg }}"
ephemeral_vm_memory_mb: 6144
ephemeral_vm_vcpus: 4
target_disk_size: 20G
target_disk_size: 30G
target_vm_cfg: "{{ target_vm_cfg }}"
target_vm_memory_mb: 7168
target_vm_vcpus: 2
target_vms_count: 1
worker_disk_size: 20G
worker_disk_size: 30G
worker_vm_cfg: "{{ worker_vm_cfg }}"
worker_vm_memory_mb: 7168
worker_vm_vcpus: 2