paulbsd-salt/states/kubernetes/prepare.sls
Paul Lecuq de1a1e826f
All checks were successful
continuous-integration/drone/push Build is passing
added initial state for kubernetes
2022-08-26 20:15:09 +02:00

29 lines
837 B
Plaintext

---
{%- from "kubernetes/map.jinja" import kubernetes with context %}
kubernetes-prepare-containerd-conf:
file.managed:
- name: /etc/containerd/config.toml
- source: salt://kubernetes/templates/config.toml.j2
- template: jinja
kubernetes-prepare-reset-cni:
file.absent:
- name: /etc/cni/net.d/10-flannel.conflist
{% for module in kubernetes.required_modules %}
kubernetes-modules-load-{{ module }}:
cmd.run:
- name: modprobe {{ module }}
{% endfor %}
kubernetes-modules-loadatstartup-{{ module }}:
file.managed:
- name: /etc/sysctl.d/10-kube.conf
- source: salt///kubernetes/templates/sysctl.conf.j2
- template: jinja
{% for name in ['iptables', 'ip6tables'] %}
kubernetes-alternatives-{{ name }}:
cmd.run:
- name: "update-alternatives --set {{ name }} /usr/sbin/{{ name }}"
{% endfor %}