skupper.v2.system module – Manages the lifecycle of non-kube namespaces

Note

This module is part of the skupper.v2 collection (version 2.0.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install skupper.v2. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: skupper.v2.system.

New in skupper.v2 2.0.0

Synopsis

  • Manages the lifecycle of non-kube namespaces.

  • Executes the provided action for a non-kube site definition on a given namespace

  • It can be used to setup, reload, start, stop and teardown a namespace definition

  • It has the ability to produce a self-extracting or a tarball bundle

  • Runs with podman (default) or docker binaries

  • Only valid for platforms “podman”, “docker” and “linux”

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9

  • PyYAML >= 3.11

Parameters

Parameter

Comments

action

string

The action to perform against a given namespace definition

setup - a new site is initialized and started (no-op if namespace is already initialized)

reload - a site is created or re-initialized (Certificate Authorities are preserved)

start - components are started

stop - components are stopped

teardown - stops and removes a site definition

bundle - generates a self-extracting bundle

tarball - generates a tarball bundle

Choices:

  • "setup" ← (default)

  • "reload"

  • "start"

  • "stop"

  • "teardown"

  • "bundle"

  • "tarball"

context

string

The name of a context found in the config file.

engine

string

The container engine used to manage a namespace or produce a bundle

The default value is podman, but if platform is set to docker, it will use docker as the engine as well

It is also used when the platform is set to systemd or when action is bundle or tarball (otherwise the platform value is used)

Choices:

  • "podman" ← (default)

  • "docker"

image

string

The image used to initialize your site or bundle

Default: "quay.io/skupper/cli:2.0.0"

kubeconfig

string

Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default configuration file from ~/.kube/config.

namespace

string

Use to specify an object namespace.

platform

string

The platform to use when manipulating resources

Choices:

  • "kubernetes" ← (default)

  • "podman"

  • "docker"

  • "linux"

Examples

# Initializes the default namespace based on existing resources
- name: Initialize the default namespace using podman
  skupper.v2.system:

# Initializes the west namespace using docker
- name: Initialize the west namespace using docker
  skupper.v2.system:
    platform: docker
    namespace: west

# Reloads the definitions for the west namespace
- name: Initialize the west namespace
  skupper.v2.system:
    action: reload
    namespace: west

# Removes a site definition from the west namespace
- name: Removes the west namespace
  skupper.v2.system:
    action: teardown
    namespace: west

# Stops the skupper components on a given namespace
- name: Stops the components on the east namespace
  skupper.v2.system:
    action: stop
    namespace: east

# Starts the skupper components on a given namespace
- name: Starts the components on the east namespace
  skupper.v2.system:
    action: start
    namespace: east

# Produces a self-extracting site bundle based on the default namespace definitions
- name: Generate a self-extracting site bundle
  skupper.v2.system:
    action: bundle
    register: result

# Produces a tarball bundle based on the west namespace definitions
- name: Generate a tarball bundle based on west namespace definitions
  skupper.v2.system:
    action: tarball
    namespace: west
    register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

bundle

string

Base 64 encoded content of the generated bundle or tarball

Only populated when action is bundle or tarball

Returned: success

dictionary

Static links generated for non-kube sites with a RouterAccess

Dictionary keys are the target hostname or ip of the link

Each value has a valid link that can be applied to another site

Returned: when platform in (‘podman’, ‘docker’, ‘linux’) and a RouterAccess is defined

Sample: {"my.host": "---\\napiVersion: skupper.io/v2alpha1..."}

path

string

Path to the generated namespace or to a produced site bundle

Returned: success

Authors

  • Fernando Giorgetti (@fgiorgetti)