Skip to content

Commit

Permalink
Fix cri-o installation on Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
jorhett committed May 14, 2024
1 parent 843a4a1 commit f482274
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 30 deletions.
48 changes: 24 additions & 24 deletions manifests/install/container_runtime.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,37 @@
}

# Avoid a potential issue with some CRI-o versions
file { ['/usr/lib/cri-o-runc/sbin', '/usr/lib/cri-o-runc']:
ensure => directory,
}
#file { ['/usr/lib/cri-o-runc/sbin', '/usr/lib/cri-o-runc']:
#ensure => directory,
#}

file { '/usr/lib/cri-o-runc/sbin/runc':
ensure => link,
target => '/usr/sbin/runc',
replace => false,
}
#file { '/usr/lib/cri-o-runc/sbin/runc':
# ensure => link,
# target => '/usr/sbin/runc',
# replace => false,
#}
} else {
$pkg = pick($crio_package, 'cri-o')
}

file { '/usr/libexec/crio/conmon':
ensure => link,
target => '/usr/bin/conmon',
replace => false,
require => Package['k8s container manager'],
}
#file { '/usr/libexec/crio/conmon':
# ensure => link,
# target => '/usr/bin/conmon',
# replace => false,
# require => Package['k8s container manager'],
#}

file { '/etc/cni/net.d/100-crio-bridge.conf':
ensure => absent,
require => Package['k8s container manager'],
}
#file { '/etc/cni/net.d/100-crio-bridge.conf':
# ensure => absent,
# require => Package['k8s container manager'],
#}

file_line { 'K8s crio cgroup manager':
path => '/etc/crio/crio.conf',
line => 'cgroup_manager = "systemd"',
match => '^cgroup_manager',
require => Package['k8s container manager'],
}
#file_line { 'K8s crio cgroup manager':
# path => '/etc/crio/crio.conf',
# line => 'cgroup_manager = "systemd"',
# match => '^cgroup_manager',
# require => Package['k8s container manager'],
#}
}
'containerd': {
file { '/etc/containerd':
Expand Down
16 changes: 10 additions & 6 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,30 @@
default: {}
}

$libcontainers_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${release_name}"
$crio_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${crio_version}/${release_name}"
#$libcontainers_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${release_name}"
$libcontainers_url = "https://pkgs.k8s.io/core:/stable:/v${crio_version}/deb"
#$crio_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${crio_version}/${release_name}"
$crio_url = "https://pkgs.k8s.io/addons:/cri-o:/stable:/v${crio_version}/deb"

apt::source { 'libcontainers:stable':
#apt::source { 'libcontainers:stable':
apt::source { 'kubernetes':
location => $libcontainers_url,
repos => '/',
release => '',
key => {
id => '2472D6D0D2F66AF87ABA8DA34D64390375060AA4',
name => 'kubernetes-apt-keyring.gpg',
source => "${libcontainers_url}/Release.key",
},
}

if $manage_container_manager and $container_manager == 'crio' {
apt::source { 'libcontainers:stable:cri-o':
#apt::source { 'libcontainers:stable:cri-o':
apt::source { 'cri-o':
location => $crio_url,
repos => '/',
release => '',
key => {
id => '2472D6D0D2F66AF87ABA8DA34D64390375060AA4',
name => 'cri-o-apt-keyring.gpg',
source => "${crio_url}/Release.key",
},
}
Expand Down

0 comments on commit f482274

Please sign in to comment.