mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
CI: use a dedicated disk for releases (#12692)
This should make 'no space left on device' problems easier to handle Use /tmp/releases as local_release_dir CI created machine, while keeping the same folder on the runner (needed for gitlab-ci runner pods)
This commit is contained in:
@@ -5,6 +5,7 @@ vm_cpu_cores: 2
|
|||||||
vm_cpu_sockets: 1
|
vm_cpu_sockets: 1
|
||||||
vm_cpu_threads: 2
|
vm_cpu_threads: 2
|
||||||
vm_memory: 2048
|
vm_memory: 2048
|
||||||
|
releases_disk_size: 2Gi
|
||||||
|
|
||||||
# Request/Limit allocation settings
|
# Request/Limit allocation settings
|
||||||
cpu_allocation_ratio: 0.25
|
cpu_allocation_ratio: 0.25
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ spec:
|
|||||||
- disk:
|
- disk:
|
||||||
bus: virtio
|
bus: virtio
|
||||||
name: cloudinitvolume
|
name: cloudinitvolume
|
||||||
|
- disk:
|
||||||
|
bus: virtio
|
||||||
|
name: releases
|
||||||
|
serial: '2825A83CBDC8A32D5E'
|
||||||
interfaces:
|
interfaces:
|
||||||
- name: default
|
- name: default
|
||||||
bridge: {}
|
bridge: {}
|
||||||
@@ -59,3 +63,6 @@ spec:
|
|||||||
- name: cloudinitvolume
|
- name: cloudinitvolume
|
||||||
cloudInit{{ 'ConfigDrive' if cloud_image.startswith('flatcar') else 'NoCloud' }}:
|
cloudInit{{ 'ConfigDrive' if cloud_image.startswith('flatcar') else 'NoCloud' }}:
|
||||||
userDataBase64: '{{ ((ignition_config | to_json) if cloud_image.startswith('flatcar') else cloudinit_config) | b64encode }}'
|
userDataBase64: '{{ ((ignition_config | to_json) if cloud_image.startswith('flatcar') else cloudinit_config) | b64encode }}'
|
||||||
|
- name: releases
|
||||||
|
emptyDisk:
|
||||||
|
capacity: '{{ releases_disk_size }}'
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ cloudinit_config: |
|
|||||||
lock_passwd: False
|
lock_passwd: False
|
||||||
ssh_authorized_keys:
|
ssh_authorized_keys:
|
||||||
- {{ ssh_key.public_key }}
|
- {{ ssh_key.public_key }}
|
||||||
|
fs_setup:
|
||||||
|
- device: '/dev/disk/by-id/virtio-2825A83CBDC8A32D5E'
|
||||||
|
filesystem: 'ext4'
|
||||||
|
partition: 'none'
|
||||||
|
mounts:
|
||||||
|
- ['/dev/disk/by-id/virtio-2825A83CBDC8A32D5E', '/tmp/releases']
|
||||||
|
|
||||||
ignition_config:
|
ignition_config:
|
||||||
ignition:
|
ignition:
|
||||||
@@ -56,3 +62,9 @@ ignition_config:
|
|||||||
- wheel
|
- wheel
|
||||||
sshAuthorizedKeys:
|
sshAuthorizedKeys:
|
||||||
- "{{ ssh_key.public_key }}"
|
- "{{ ssh_key.public_key }}"
|
||||||
|
storage:
|
||||||
|
filesystems:
|
||||||
|
- device: '/dev/disk/by-id/virtio-2825A83CBDC8A32D5E'
|
||||||
|
format: ext4
|
||||||
|
path: /tmp/releases
|
||||||
|
wipeFilesystem: true
|
||||||
|
|||||||
@@ -36,3 +36,5 @@ nginx_image_repo: "{{ quay_image_repo }}/kubespray/nginx"
|
|||||||
|
|
||||||
flannel_image_repo: "{{ quay_image_repo }}/kubespray/flannel"
|
flannel_image_repo: "{{ quay_image_repo }}/kubespray/flannel"
|
||||||
flannel_init_image_repo: "{{ quay_image_repo }}/kubespray/flannel-cni-plugin"
|
flannel_init_image_repo: "{{ quay_image_repo }}/kubespray/flannel-cni-plugin"
|
||||||
|
|
||||||
|
local_release_dir: "{{ '/tmp/releases' if inventory_hostname != 'localhost' else (lookup('env', 'PWD') + '/downloads') }}"
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ shift
|
|||||||
ansible-playbook \
|
ansible-playbook \
|
||||||
-e @tests/common_vars.yml \
|
-e @tests/common_vars.yml \
|
||||||
-e @tests/${TESTCASE_FILE} \
|
-e @tests/${TESTCASE_FILE} \
|
||||||
-e local_release_dir=${PWD}/downloads \
|
|
||||||
"$@" \
|
"$@" \
|
||||||
${playbook}
|
${playbook}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user