Charmed-Kubernetes/kata/hooks/relations/untrusted-container-runtime
AnonSaber 59490685e6 update 2023-06-28 15:45:48 +00:00
..
.gitignore update 2023-06-28 15:45:48 +00:00
LICENSE update 2023-06-28 15:45:48 +00:00
README.md update 2023-06-28 15:45:48 +00:00
__init__.py update 2023-06-28 15:45:48 +00:00
interface.yaml update 2023-06-28 15:45:48 +00:00
provides.py update 2023-06-28 15:45:48 +00:00
requires.py update 2023-06-28 15:45:48 +00:00

README.md

interface-untrusted-container-runtime

Overview

This interface handles communication between subordinate container runtimes and this subordinate untrusted container runtime, such as containerd and kata-containers.

Usage

Provides

The providing side of the container interface provides a place for an untrusted container runtime to connect to.

Your charm should respond to the endpoint.{endpoint_name}.available state, which indicates that there is an untrusted container runtime connected.

A trivial example of handling this interface would be:

@when('endpoint.containerd.joined')
def update_kubelet_config(containerd):
    endpoint = endpoint_from_flag('endpoint.containerd.joined')
    config = endpoint.get_config()

    render(
        'config.toml',
        {
            'runtime_name': config['name'],
            'runtime_binary': config['binary_path']
        }
    )

Requires

The requiring side of the untrusted container interface requires a place for an untrusted container runtime to connect to.

Your charm should set {endpoint_name}.available state, which indicates that the container is runtime connected.

A trivial example of handling this interface would be:

@when('endpoint.containerd.joined')
def pubish_config():
    endpoint = endpoint_from_flag('endpoint.containerd.joined')
    endpoint.set_config(
        'name': 'kata',
        'binary_path': '/usr/bin/kata-runtime'
    )