This repository is the home of Microk8s addons specifically for usage with Openstack.
3rd party addons repositories are supported on MicroK8s v1.24 and onwards. To add a repository on an already installed MicroK8s you have to use the microk8s addons repo command and provide a user friendly repo name, the path to the repository and optionally a branch within the repository. For example:
microk8s addons repo add openstack https://github.com/canonical/microk8s-openstack-addons --reference main
As long as you have a local copy of a repository and that repository is also a git one in can also be added to a MicroK8s installation with:
microk8s.addons repo add openstack ./microk8s-openstack-addons
The addons of all repositories are shown in microk8s status along with the repo they came from. microk8s enable and microk8s disable are used to enable and disable the addons respectively. The repo name can be used to disambiguate between addons with the same name. For example:
microk8s enable openstack/<addon>
Adding a repository to MicroK8s (via mcirok8s addons repo add) creates a copy of the repository under $SNAP_COMMON/addons (typically under /var/snap/microk8s/common/addons/). Authorized users are able to edit the addons to match their need. In case the upstream repository changes and you need to pull in any updates with:
microk8s addons repo update openstack
Removing repositories is done with:
microk8s addons repo remove openstack
An addons repository has the following structure:
addons.yaml Authoritative list of addons included in this repository. See format below.
addons/
<addon1>/
enable Executable script that runs when enabling the addon
disable Executable script that runs when disabling the addon
<addon2>/
enable
disable
...
At the root of the addons repository the addons.yaml file lists all the addons included. This file is of the following format:
microk8s-addons:
# A short description for the addons in this repository.
description: Core addons of the MicroK8s project
# Revision number. Increment when there are important changes.
revision: 1
# List of addons.
addons:
- name: addon1
description: My awesome addon
# Addon version.
version: "1.0.0"
# Test to check that addon has been enabled. This may be:
# - A path to a file. For example, "${SNAP_DATA}/var/lock/myaddon.enabled"
# - A Kubernetes resource, in the form `resourceType/resourceName`, just
# as it would appear in the output of the `kubectl get all -A` command.
# For example, "deployment.apps/registry".
#
# The addon is assumed to be enabled when the specified file or Kubernetes
# resource exists.
check_status: "deployment.apps/addon1"
# List of architectures supported by this addon.
# MicroK8s supports "amd64", "arm64" and "s390x".
supported_architectures:
- amd64
- arm64
- s390x
- name: addon2
description: My second awesome addon, supported for amd64 only
version: "1.0.0"
check_status: "pod/addon2"
supported_architectures:
- amd64See HACKING.md for instructions on how to develop custom MicroK8s addons.