Addon Repositories
Konvoy uses a cluster.yaml
file to configure the ClusterProvisioner
(infrastruture configuration) and the ClusterConfiguration
(Kubernetes configuration).
The ClusterConfiguration
consists of several parts, including the configuration of the kubernetes version and the addons
configuration.
Addons are configured by referencing an addon repository. Konvoy comes configured with the kubernetes-base-addons repository. This repository provides all the addons that make Konvoy an enterprise grade distribution, ready for day two operations.
Konvoy partners and users can create their own addon repositories. For example, a storage partner can create an addon repository to provide their CSI storage provisioner. A user can create an addon repository to meet the requirement that all clusters created, in their organization, run specific services.
This topic describes the following:
- The
structure
of an addon repository - How to
configure
an addon repository in the Konvoycluster.yaml
- The
addon yaml configuration
for different kinds of addons. For example, storage and workload addons.
Addon Repository Structure
The following shows the layout and structure of an addon repository. This example contains one addon for cockroachdb
.
The folders in the addon repository have the following roles:
addons/
- Contains the actual manifests for addon resources.metadata/
- Contains the static metadata for each addon inaddons/
.deployments/
- Contains the default addons specific to the version of Kubernetes in use.
Here is a link to a sample repository you can experiment with and use as a template for your own addon repository. It contains two addons awsebscsiprovisioner2
and cockroachdb
.
Configure an Addon Repository in cluster.yaml
The following example shows how to configure an additional addon repository in the Konvoy cluster.yaml
file. In the configuration below, the awsebscsiprovisioner2 addon is of kind ClusterAddon
described in the Storage Provider Addons section. The cockroachdb addon is of kind Addon
described in the Workload Addons section. The configVersion
(in this case, configVersion: stable-0.1
) points to the tagged release in your additional addon repository.
The second repository configured, in the example above, is our sample docs-addon-repo. It contains the two addons awsebscsiprovisioner2
and cockroachdb
. awsebscsiprovisioner2
is a copy of the awsebscsiprovisioner
from the kubernetes-base-addons
repository. This example shows you can turn the storage provisioner in the kubernetes-base-addons
repository off and provide a storage provisioner with another addon repository.
When you run konvoy up
with the above cluster.yaml
configuration you see the following output. All addons requiring persistent storage get installed after awsebscsiprovisioner2
providing a default StorageClass
. For example, cockroachdb, elasticsearch, and velero.
Addons
In this section we look at different addon configurations.
Storage Provider Addons
This is a link to a sample storage provider addon that would get created in a partner’s external repository. This is of kind ClusterAddon
. This means there can only be one per Kubernetes cluster. The addons chartReference
points to the helm chart
of the storage provider.
metadata.labels
kubeaddons.mesosphere.io/name
- Addon namekubeaddons.mesosphere.io/provides
- Addon functionality. For example, storageclass.
metadata.annotations
catalog.kubeaddons.mesosphere.io/addon-revision
-appVersion-<revison>
appversion.kubeaddons.mesosphere.io/awsebscsiprovisioner
- Helm chartappVersion
values.chart.helm.kubeaddons.mesosphere.io/awsebscsiprovisioner
- URI to helm chartvalues.yaml
file
spec.requires[].matchLabels
kubeaddons.mesosphere.io/name: defaultstorageclass-protection
- Requires thedefaulstorageclass-protection
addon
Workload Addons
This is a sample for a workload addon that would get created in a partner’s external repository. This is of kind Addon
. The addons chartReference
points to the helm chart
of the workload.
metadata.labels
kubeaddons.mesosphere.io/name
- Addon namekubeaddons.mesosphere.io/hack-requires-defaultstorageclass
- Set totrue
if this addon requires adefault StorageClass
metadata.annotations
catalog.kubeaddons.mesosphere.io/addon-revision
-appVersion-<revison>
appversion.kubeaddons.mesosphere.io/awsebscsiprovisioner
- Helm chartappVersion
values.chart.helm.kubeaddons.mesosphere.io/awsebscsiprovisioner
- URI to helm chartvalues.yaml
file