CI: use a dedicated disk for releases (#12721)

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)

Co-authored-by: Max Gautier <mg@max.gautier.name>
This commit is contained in:
k8s-infra-cherrypick-robot
2025-11-18 03:29:39 -08:00
committed by GitHub
parent 932025fbd6
commit 084c2be8b9
5 changed files with 22 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ vm_cpu_cores: 2
vm_cpu_sockets: 1
vm_cpu_threads: 2
vm_memory: 2048
releases_disk_size: 2Gi
# Request/Limit allocation settings
cpu_allocation_ratio: 0.25

View File

@@ -32,6 +32,10 @@ spec:
- disk:
bus: virtio
name: cloudinitvolume
- disk:
bus: virtio
name: releases
serial: '2825A83CBDC8A32D5E'
interfaces:
- name: default
bridge: {}
@@ -57,3 +61,6 @@ spec:
- name: cloudinitvolume
cloudInit{{ 'ConfigDrive' if cloud_image.startswith('flatcar') else 'NoCloud' }}:
userDataBase64: '{{ ((ignition_config | to_json) if cloud_image.startswith('flatcar') else cloudinit_config) | b64encode }}'
- name: releases
emptyDisk:
capacity: '{{ releases_disk_size }}'

View File

@@ -44,6 +44,12 @@ cloudinit_config: |
lock_passwd: False
ssh_authorized_keys:
- {{ 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:
@@ -56,3 +62,9 @@ ignition_config:
- wheel
sshAuthorizedKeys:
- "{{ ssh_key.public_key }}"
storage:
filesystems:
- device: '/dev/disk/by-id/virtio-2825A83CBDC8A32D5E'
format: ext4
path: /tmp/releases
wipeFilesystem: true

View File

@@ -36,3 +36,5 @@ nginx_image_repo: "{{ quay_image_repo }}/kubespray/nginx"
flannel_image_repo: "{{ quay_image_repo }}/kubespray/flannel"
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') }}"

View File

@@ -43,7 +43,6 @@ shift
ansible-playbook \
-e @tests/common_vars.yml \
-e @tests/${TESTCASE_FILE} \
-e local_release_dir=${PWD}/downloads \
"$@" \
${playbook}
}