Browse Source
CI/kubevirt: Configure ignition provisioning
Flatcar does not support cloud-init
pull/11868/head
Max Gautier
4 months ago
committed by
ChengHao Yang
Failed to extract signature
2 changed files with
24 additions and
10 deletions
-
tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2
-
tests/cloud_playbooks/roles/packet-ci/vars/main.yml
|
|
@ -55,13 +55,5 @@ spec: |
|
|
|
containerDisk: |
|
|
|
image: quay.io/kubespray/vm-{{ cloud_image }} |
|
|
|
- name: cloudinitvolume |
|
|
|
cloudInitConfigDrive: |
|
|
|
userData: | |
|
|
|
#cloud-config |
|
|
|
users: |
|
|
|
- name: {{ lookup('env', 'ANSIBLE_REMOTE_USER') }} |
|
|
|
sudo: ALL=(ALL) NOPASSWD:ALL |
|
|
|
shell: /bin/bash |
|
|
|
lock_passwd: False |
|
|
|
ssh_authorized_keys: |
|
|
|
- {{ ssh_key.public_key }} |
|
|
|
cloudInit{{ 'ConfigDrive' if cloud_image.startswith('flatcar') else 'NoCloud' }}: |
|
|
|
userDataBase64: '{{ ((ignition_config | to_json) if cloud_image.startswith('flatcar') else cloudinit_config) | b64encode }}' |
|
|
@ -34,3 +34,25 @@ ci_job_id: "{{ lookup('ansible.builtin.env', 'CI_JOB_ID', default=undefined) }}" |
|
|
|
pod_name: "{{ lookup('ansible.builtin.env', 'POD_NAME', default=undefined) }}" |
|
|
|
pod_uid: "{{ lookup('ansible.builtin.env', 'POD_UID', default=undefined) }}" |
|
|
|
pod_namespace: "{{ lookup('ansible.builtin.env', 'POD_NAMESPACE', default=undefined) }}" |
|
|
|
|
|
|
|
cloudinit_config: | |
|
|
|
#cloud-config |
|
|
|
users: |
|
|
|
- name: {{ lookup('env', 'ANSIBLE_REMOTE_USER') }} |
|
|
|
sudo: ALL=(ALL) NOPASSWD:ALL |
|
|
|
shell: /bin/bash |
|
|
|
lock_passwd: False |
|
|
|
ssh_authorized_keys: |
|
|
|
- {{ ssh_key.public_key }} |
|
|
|
|
|
|
|
ignition_config: |
|
|
|
ignition: |
|
|
|
version: "3.2.0" |
|
|
|
passwd: |
|
|
|
users: |
|
|
|
- name: "{{ lookup('env', 'ANSIBLE_REMOTE_USER') }}" |
|
|
|
groups: |
|
|
|
- sudo |
|
|
|
- wheel |
|
|
|
sshAuthorizedKeys: |
|
|
|
- "{{ ssh_key.public_key }}" |