From 1c6756a93ad9379a81f739436403f80b0694f054 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 31 Aug 2023 14:19:30 +0200 Subject: [PATCH 1/3] Adding necessary components for SUSE support This is tested with a local openSUSE 15.6 install --- manifests/install/container_runtime.pp | 4 ++++ manifests/node/kubelet.pp | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/manifests/install/container_runtime.pp b/manifests/install/container_runtime.pp index 48dda32..ff28af1 100644 --- a/manifests/install/container_runtime.pp +++ b/manifests/install/container_runtime.pp @@ -33,6 +33,10 @@ target => '/usr/sbin/runc', replace => false, } + } elsif fact('os.family') == 'Suse' { + file { '/usr/libexec/crio': + ensure => directory, + } } $pkg = pick($crio_package, 'cri-o') diff --git a/manifests/node/kubelet.pp b/manifests/node/kubelet.pp index 2d05278..04dc3fa 100644 --- a/manifests/node/kubelet.pp +++ b/manifests/node/kubelet.pp @@ -262,6 +262,17 @@ enable => true, } + if fact('os.family') == 'Suse' { + # Remove pre-packaged kubeadmin-built kubelet configuration on SUSE + file { + default: + ensure => absent; + + '/usr/lib/systemd/system/kubelet.service':; + '/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf':; + } + } + Class['k8s::install::container_runtime'] -> Service['kubelet'] Package <| title == 'containernetworking-plugins' |> -> Service['kubelet'] From 79d0417515eb8a3ff9d17de5be71311adea917fc Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Mon, 16 Sep 2024 10:09:19 +0200 Subject: [PATCH 2/3] Add SUSE to metadata.json --- metadata.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metadata.json b/metadata.json index 659faac..ac13dd2 100644 --- a/metadata.json +++ b/metadata.json @@ -59,6 +59,12 @@ "20.10", "22.04" ] + }, + { + "operatingsystem": "openSUSE", + "operatingsystemrelease": [ + "15" + ] } ], "requirements": [ From 98af73f2b2301d5524195303b0c3326bd96fec68 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Mon, 16 Sep 2024 10:57:22 +0200 Subject: [PATCH 3/3] Use the correct openSUSE version scheme --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index ac13dd2..453c908 100644 --- a/metadata.json +++ b/metadata.json @@ -63,7 +63,7 @@ { "operatingsystem": "openSUSE", "operatingsystemrelease": [ - "15" + "15.6" ] } ],