Add variables to configure Containerd default runtime, untrusted runt… (#5497)

* Add variables to configure Containerd default runtime, untrusted runtime and additional runtimes

* Add containerd settings to sample inventory

* Empty commit
This commit is contained in:
Pasquale Toscano 2020-03-16 11:48:36 +01:00 committed by GitHub
parent ceab27c97a
commit 4b5299bb7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 3 deletions

View file

@ -171,6 +171,32 @@ dns_domain: "{{ cluster_name }}"
## docker for docker, crio for cri-o and containerd for containerd. ## docker for docker, crio for cri-o and containerd for containerd.
container_manager: docker container_manager: docker
## Settings for containerd runtimes (only used when container_manager is set to containerd)
#
# Settings for default containerd runtime
# containerd_default_runtime:
# type: io.containerd.runtime.v1.linux
# engine: ''
# root: ''
#
# Settings for additional runtimes for containerd configuration
# containerd_runtimes:
# - name: ""
# type: ""
# engine: ""
# root: ""
# Example for Kata Containers as additional runtime:
# containerd_runtimes:
# - name: kata
# type: io.containerd.kata.v2
# engine: ""
# root: ""
#
# Settings for untrusted containerd runtime
# containerd_untrusted_runtime_type: ''
# containerd_untrusted_runtime_engine: ''
# containerd_untrusted_runtime_root: ''
## Settings for containerized control plane (kubelet/secrets) ## Settings for containerized control plane (kubelet/secrets)
kubelet_deployment_type: host kubelet_deployment_type: host
helm_deployment_type: host helm_deployment_type: host

View file

@ -48,3 +48,22 @@ containerd_debian_repo_base_url: 'https://download.docker.com/linux/debian'
containerd_debian_repo_gpgkey: 'https://download.docker.com/linux/debian/gpg' containerd_debian_repo_gpgkey: 'https://download.docker.com/linux/debian/gpg'
containerd_debian_repo_repokey: '9DC858229FC7DD38854AE2D88D81803C0EBFCD88' containerd_debian_repo_repokey: '9DC858229FC7DD38854AE2D88D81803C0EBFCD88'
containerd_debian_repo_component: 'stable' containerd_debian_repo_component: 'stable'
containerd_default_runtime:
type: io.containerd.runtime.v1.linux
engine: ''
root: ''
# Additional runtimes for containerd configuration
#
# Example for Kata Containers:
# containerd_runtimes:
# - name: kata
# type: io.containerd.kata.v2
# engine: ""
# root: ""
containerd_runtimes: []
containerd_untrusted_runtime_type: ''
containerd_untrusted_runtime_engine: ''
containerd_untrusted_runtime_root: ''

View file

@ -31,10 +31,23 @@ disabled_plugins = ["restart"]
{{ param }} = {{ value }} {{ param }} = {{ value }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
[plugins.cri.containerd.default_runtime]
runtime_type = "{{ containerd_default_runtime.type }}"
runtime_engine = "{{ containerd_default_runtime.engine }}"
runtime_root = "{{ containerd_default_runtime.root }}"
{% for runtime in containerd_runtimes %}
[plugins.cri.containerd.runtimes.{{ runtime.name }}]
runtime_type = "{{ runtime.type }}"
runtime_engine = "{{ runtime.engine }}"
runtime_root = "{{ runtime.root }}"
{% endfor %}
[plugins.cri.containerd.untrusted_workload_runtime] [plugins.cri.containerd.untrusted_workload_runtime]
runtime_type = "" runtime_type = "{{ containerd_untrusted_runtime_type }}"
runtime_engine = "" runtime_engine = "{{ containerd_untrusted_runtime_engine }}"
runtime_root = "" runtime_root = "{{ containerd_untrusted_runtime_root }}"
{% if 'registries' in containerd_config %} {% if 'registries' in containerd_config %}
[plugins.cri.registry] [plugins.cri.registry]