INNER CODE UNIT · Python

to_socket

pixiu-io/kubez-ansible · ansible/filter_plugins/to_socket.py:34

def to_socket(ctx, *args, **kwargs):
    kube_group = kwargs.get('kube_group')

    if kube_group.startswith('dokcer'):
        runtime_type = 'docker'
    elif kube_group.startswith('containerd'):
        runtime_type = 'containerd'
    else:
        runtime_type = ''

    if not runtime_type:
        return ctx

    return ' '.join([ctx, SOCKET_MAP[runtime_type]])


def get_runtime_type(ctx, *args, **kwargs):
    kube_group = kwargs.get('kube_group')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…