From 1039350ffbe693293a58434774443b92237a1b7b Mon Sep 17 00:00:00 2001 From: Nestor Acuna Blanco Date: Tue, 26 Nov 2024 11:37:44 +0100 Subject: [PATCH] feat: s390x Rhel enablement Signed-off-by: Nestor Acuna Blanco --- generate-templates.yaml | 4 ++-- templates/rhel8.tpl.yaml | 2 +- templates/rhel9.tpl.yaml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/generate-templates.yaml b/generate-templates.yaml index fff42ca3..7cd1a033 100644 --- a/generate-templates.yaml +++ b/generate-templates.yaml @@ -21,7 +21,7 @@ - name: Load RHEL 9 image urls set_fact: - rhel9_image_urls: "{{ rhel9_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', 'x86_64') |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" + rhel9_image_urls: "{{ rhel9_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', target_arch) |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" loop: "{{ rhel9_labels }}" - name: Generate RHEL 9 templates @@ -56,7 +56,7 @@ - name: Load RHEL 8 image urls set_fact: - rhel8_image_urls: "{{ rhel8_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', 'x86_64') |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" + rhel8_image_urls: "{{ rhel8_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', target_arch) |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" loop: "{{ rhel8_labels }}" - name: Generate RHEL 8 templates diff --git a/templates/rhel8.tpl.yaml b/templates/rhel8.tpl.yaml index 5b8f510b..dc2ee5a8 100644 --- a/templates/rhel8.tpl.yaml +++ b/templates/rhel8.tpl.yaml @@ -92,7 +92,7 @@ objects: kubevirt.io/domain: ${NAME} kubevirt.io/size: {{ item.flavor }} spec: - architecture: amd64 + architecture: "{{ 'amd64' if target_arch == 'x86_64' else target_arch }}" domain: {% if item.iothreads %} ioThreadsPolicy: shared diff --git a/templates/rhel9.tpl.yaml b/templates/rhel9.tpl.yaml index 8f8a34c6..1cf00a53 100644 --- a/templates/rhel9.tpl.yaml +++ b/templates/rhel9.tpl.yaml @@ -92,7 +92,7 @@ objects: kubevirt.io/domain: ${NAME} kubevirt.io/size: {{ item.flavor }} spec: - architecture: amd64 + architecture: "{{ 'amd64' if target_arch == 'x86_64' else target_arch }}" domain: {% if item.iothreads %} ioThreadsPolicy: shared @@ -137,12 +137,14 @@ objects: - masquerade: {} name: default model: virtio +{% if target_arch != 's390x' %} features: smm: enabled: true firmware: bootloader: efi: {} +{% endif %} terminationGracePeriodSeconds: 180 networks: - name: default