from docker to containerd
This commit is contained in:
21
k8s/containerd.sls
Normal file
21
k8s/containerd.sls
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
---
|
||||
include:
|
||||
- .repo.debian-bullseye
|
||||
- .cri-tools
|
||||
|
||||
containerd_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- containerd
|
||||
- containernetworking-plugins
|
||||
- require:
|
||||
- pkgrepo: repo_debian-bullseye
|
||||
|
||||
/etc/containerd/config.toml:
|
||||
file.managed:
|
||||
- source: salt://k8s/files/containerd-config.toml
|
||||
- mode: 644
|
||||
- user: root
|
||||
- group: root
|
||||
15
k8s/cri-tools.sls
Normal file
15
k8s/cri-tools.sls
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
cri-tools_pkgs:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- cri-tools
|
||||
|
||||
/etc/crictl.yaml:
|
||||
file.managed:
|
||||
- mode: 644
|
||||
- user: root
|
||||
- group: root
|
||||
- contents: |
|
||||
#SALT managed
|
||||
runtime-endpoint: unix:///var/run/containerd/containerd.sock
|
||||
image-endpoint: unix:///var/run/containerd/containerd.sock
|
||||
16
k8s/files/containerd-config.toml
Normal file
16
k8s/files/containerd-config.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
version = 2
|
||||
|
||||
[debug]
|
||||
level = "warn"
|
||||
|
||||
[plugins]
|
||||
[plugins."io.containerd.grpc.v1.cri"]
|
||||
[plugins."io.containerd.grpc.v1.cri".cni]
|
||||
bin_dir = "/opt/cni/bin"
|
||||
conf_dir = "/etc/cni/net.d"
|
||||
[plugins."io.containerd.internal.v1.opt"]
|
||||
path = "/var/lib/containerd/opt"
|
||||
[plugins."io.containerd.grpc.v1.cri".registry]
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.configs."docker-registry.lan".tls]
|
||||
insecure_skip_verify = true
|
||||
|
||||
14
k8s/repo/debian-bullseye.sls
Normal file
14
k8s/repo/debian-bullseye.sls
Normal file
@@ -0,0 +1,14 @@
|
||||
{%-
|
||||
set cache_url = salt['pillar.get'](
|
||||
'services:apt-cache',
|
||||
default=''
|
||||
)
|
||||
%}
|
||||
|
||||
|
||||
repo_debian-bullseye:
|
||||
pkgrepo.managed:
|
||||
- name: 'deb http://{{ cache_url }}deb.debian.org/debian bullseye main contrib'
|
||||
- file: /etc/apt/sources.list.d/debian-bullseye.list
|
||||
- clean_file: True
|
||||
|
||||
Reference in New Issue
Block a user