From 2c9fc189032290e3b879fe27a91ecb20389ff935 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 2 Mar 2021 12:57:19 +0300 Subject: [PATCH] template crun manifest (#7305) add missing else to if inline --- roles/kubernetes-apps/container_runtimes/crun/tasks/main.yaml | 4 ++-- .../crun/{files => templates}/runtimeclass-crun.yml | 2 +- .../kata_containers/templates/runtimeclass-kata-qemu.yml.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename roles/kubernetes-apps/container_runtimes/crun/{files => templates}/runtimeclass-crun.yml (82%) diff --git a/roles/kubernetes-apps/container_runtimes/crun/tasks/main.yaml b/roles/kubernetes-apps/container_runtimes/crun/tasks/main.yaml index 1d790267b..637d7beef 100644 --- a/roles/kubernetes-apps/container_runtimes/crun/tasks/main.yaml +++ b/roles/kubernetes-apps/container_runtimes/crun/tasks/main.yaml @@ -1,10 +1,10 @@ --- - name: crun | Copy runtime class manifest - copy: + template: src: runtimeclass-crun.yml dest: "{{ kube_config_dir }}/runtimeclass-crun.yml" - mode: preserve + mode: "0664" when: - inventory_hostname == groups['kube-master'][0] diff --git a/roles/kubernetes-apps/container_runtimes/crun/files/runtimeclass-crun.yml b/roles/kubernetes-apps/container_runtimes/crun/templates/runtimeclass-crun.yml similarity index 82% rename from roles/kubernetes-apps/container_runtimes/crun/files/runtimeclass-crun.yml rename to roles/kubernetes-apps/container_runtimes/crun/templates/runtimeclass-crun.yml index b3d87bfde..c16273105 100644 --- a/roles/kubernetes-apps/container_runtimes/crun/files/runtimeclass-crun.yml +++ b/roles/kubernetes-apps/container_runtimes/crun/templates/runtimeclass-crun.yml @@ -1,6 +1,6 @@ --- kind: RuntimeClass -apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') }} +apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') else '' }} metadata: name: crun handler: crun diff --git a/roles/kubernetes-apps/container_runtimes/kata_containers/templates/runtimeclass-kata-qemu.yml.j2 b/roles/kubernetes-apps/container_runtimes/kata_containers/templates/runtimeclass-kata-qemu.yml.j2 index b46e92b79..dfa734d17 100644 --- a/roles/kubernetes-apps/container_runtimes/kata_containers/templates/runtimeclass-kata-qemu.yml.j2 +++ b/roles/kubernetes-apps/container_runtimes/kata_containers/templates/runtimeclass-kata-qemu.yml.j2 @@ -1,6 +1,6 @@ --- kind: RuntimeClass -apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') }} +apiVersion: node.k8s.io/v1{{ 'beta1' if kube_version is version('v1.20.0', '<') else '' }} metadata: name: kata-qemu handler: kata-qemu