Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
aws/0.0.1 Nodeless support (#70) Nov 14, 2019
calico/3.9.1 Plugins (#116) Nov 26, 2019
contour/0.14.0 Plugins (#116) Nov 26, 2019
fluentd/1.7.4 FIX busybox and hardcode removal Dec 21, 2019
kotsadm change kotsadm installer from 1.11.0 onwards, not 1.10.2 Jan 17, 2020
nodeless kotsadm 1.10.3 Jan 17, 2020
prometheus Plugins (#116) Nov 26, 2019
registry/2.7.1 Plugins (#116) Nov 26, 2019
rook/1.0.4 Plugins (#116) Nov 26, 2019
velero/1.2.0 install velero CLI on all masters (#141) Dec 17, 2019
weave/2.5.2 Plugins (#116) Nov 26, 2019
README.md addon to add-on Nov 18, 2019

README.md

Add-ons

Structure

Each available add-on has a directory with subdirectories for each available version of the add-on. Each subdirectory must have two files: install.sh and Manifest.

The Manifest file specifies a list of images required for the add-on. These will be pulled during CI and saved to the directory //images/.

The install.sh script must provide a function matching the add-on that should install the add-on by generating yaml in kustomize/addon and applying it.

Any other files in the / subdirectory will be included in the package built for the add-on. The package will be built and uploaded to s3://kurl-sh/dist/-.tar.gz during CI.

Runtime

The addon function in Kurl will first load all images from the add-on's images/ directory and create the directory <KURL_ROOT>/kustomize/<addon>. It will then dynamically source the install.sh script and execute the function named .

Example for Weave 2.5.2

The Kurl install script would call the addon function to install Weave 2.5.2:

addon weave 2.5.2

That would fetch the package https://kurl-sh.s3.amazonaws.com/dist/weave-2.5.2.tar.gz and extract it to the Kurl install directory. The Kurl addon function would then load the images in <KURL_ROOT>/addons/weave/2.5.2/images into docker, create the directory <KURL_ROOT>/kustomize/weave, source <KURL_ROOT>/addons/weave/2.5.2/install.sh and call weave. The weave function should generate yaml and patches and place them in the directory <KURL_ROOT>/kustomize/weave and apply them with kubectl apply -k.

Developing Add-ons

The DIR env var will be defined to the install root. Any yaml that is ready to be applied unmodified should be copied from the addon directory to the kustomize directory.

cp "$DIR/addons/weave/2.5.2/kustomization.yaml" "$DIR/kustomize/weave/kustomization.yaml"

The insert_resources function can be used to add an item to the resources object of a kustomization.yaml:

insert_resources "$DIR/kustomize/weave/kustomization.yaml" secret.yaml

The insert_patches_strategic_merge function can be used to add an item to the patchesStrategicMerge object of a kustomization.yaml:

insert_patches_strategic_merge "$DIR/kustomize/weave/kustomization.yaml" ip-alloc-range.yaml

The render_yaml_file function can be used to substitute env vars in a yaml file at runtime:

render_yaml_file "$DIR/addons/weave/2.5.2/tmpl-secret.yaml" > "$DIR/kustomize/weave/secret.yaml"

After the kustomize directory has been prepared with resources and patches and the kustomization.yaml file has been updated, the add-on should call kubectl apply -k.

You can’t perform that action at this time.