Split up common/init.sls into kubernetes common/util.sls type of file - Switch out containerd for cri-o - add nftables - make the blocks consistent by using `-require:` appropriately Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
36 lines
869 B
Plaintext
36 lines
869 B
Plaintext
# SaltStack state for installing and configuring CRI-O container runtime.
|
|
|
|
# Install CRI-O package, which is the container runtime for Kubernetes.
|
|
cri_o_pkg:
|
|
pkg.installed:
|
|
- name: cri-o
|
|
|
|
# Create CRI-O configuration directory.
|
|
cri_o_config_dir:
|
|
file.directory:
|
|
- name: /etc/crio
|
|
- mode: "0755"
|
|
- makedirs: True
|
|
- require:
|
|
- pkg: cri_o_pkg
|
|
|
|
# Modify CRI-O configuration to use systemd cgroup driver.
|
|
cri_o_systemdcgroup_true:
|
|
file.replace:
|
|
- name: /etc/crio/crio.conf
|
|
- pattern: '(?m)^cgroup_manager\s*=\s*".*"'
|
|
- repl: 'cgroup_manager = "systemd"'
|
|
- require:
|
|
- pkg: cri_o_pkg
|
|
- watch_in:
|
|
- service: crio_service
|
|
|
|
# Ensure CRI-O service is running and enabled.
|
|
crio_service:
|
|
service.running:
|
|
- name: crio
|
|
- enable: True
|
|
- watch:
|
|
- pkg: cri_o_pkg
|
|
- file: cri_o_systemdcgroup_true
|