Components

The components section of the blueprint is where you can define the different addons that you want to install on your cluster: addons.

spec:
  components:
    addons:
      - name: example-server
        kind: chart
        enabled: true
        namespace: default
        chart:
          name: nginx
          repo: https://charts.bitnami.com/bitnami
          version: 15.1.1
          values: |
            service:
              type: ClusterIP            

Addons

Addons allow you to easily install new software on your cluster. There are two types of addons: Helm Charts and Manifests. They are defined as an array in the spec.components.addons section of a blueprint. Please refer to this example that uses both of these types in addons section.

FieldDescription
nameUsed to specify the name of the addon
enabledUsed to specify if the addon should be installed [true/false]
kindUsed to specify the type of addon [chart/manifest]
namespaceUsed to specify the namespace of the addon (optional)

Helm Charts

Any public Helm chart can be used as an add-on. Currently Helm version v3.13.0 is used to install the charts.

The following is an example to add the grafana as a chart addon:

spec:
  components:
    addons:
      - name: my-grafana
        enabled: true
        kind: chart
        namespace: monitoring
        chart:
          name: grafana
          repo: https://grafana.github.io/helm-charts
          version: 6.58.7
          values: |
            ingress:
              enabled: true            
FieldDescription
chartUsed to specify the chart info
chart.nameUsed to specify the name of the helm chart
chart.repoUsed to specify the repo of the helm chart
chart.versionUsed to specify the version of the helm chart
chart.valuesUsed to specify the configuration values of the helm chart (optional)

Manifests

The following is an example of how to add metallb using a manifest as an add-on:

spec:
  components:
    addons:
      - name: metallb
        kind: manifest
        enabled: true
        manifest:
          url: "https://raw.githubusercontent.com/metallb/metallb/v0.14.3/config/manifests/metallb-native.yaml"
FieldDescription
manifestUsed to specify manifest info
manifest.urlUsed to specify the url of the manifest
manifest.valuesUsed to specify kustomizations (Optional). More details here
manifest.failurePolicyUsed to specify the failure policy for the addon (Optional) . The failure policy can be either retry or none.
manifest.timeoutUsed to specify the timeout for the addon to become Available (Optional). Has no effect if retry policy is set to none

Example

An example blueprint that uses both Helm Charts and Manifests in addons section.

spec:
  components:
    addons:
      - name: my-grafana
        enabled: true
        kind: chart
        namespace: monitoring
        chart:
          name: grafana
          repo: https://grafana.github.io/helm-charts
          version: 6.58.7
          values: |
            ingress:
              enabled: true            
      - name: metallb
        kind: manifest
        enabled: true
        manifest:
          url: "https://raw.githubusercontent.com/metallb/metallb/v0.14.3/config/manifests/metallb-native.yaml"

Kustomize Manifest based addons

The users can now customize the static resources for URL based Manifest addons. These customization are based on Kustomize.

Following kustomize primitives are currently supported:

The inline patches and images are specified under the field, values, in the manifest spec. Please refer to this example that uses both inline patches and images in the manifest addon.

FieldDescription
manifest.values.patchesUsed to specify list of inline patches to add or override manifest objects(Optional) Example Usage
manifest.values.imagesUsed to specify list of images to be replaced in the manifest(Optional) Example Usage

Inline Patches

The users can specify one or more inline patches to add or override manifest objects.

The following example updates the failureThreshold of the metallb controller container to 2.

- name: metallb
  kind: "Manifest"
  enabled: true
  namespace: boundless-system
  manifest:
    url: "https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml"
    values:
      patches:
        - patch: |-
            apiVersion: apps/v1
            kind: Deployment
            metadata:
              name: controller
              namespace: metallb-system
            spec:
              template:
                spec:
                  containers:
                  - name: controller
                    livenessProbe:
                      failureThreshold: 2            

For more examples, please refer to Kustomize - Inline Patches

Images

To replace the name of an image in the manifest, the user must specify the image name(that is to be replaced), the new name and the new tag.

images:
- name: quay.io/metallb/speaker:v0.13.10
  newName: quay.io/metallb/speaker
  newTag: v0.13.11

In the above snippet, the image with the name quay.io/metallb/speaker:v0.13.10 in the manifest is replaced by quay.io/metallb/speaker:v0.13.11.

Manifest Addon Kustomization

The following manifest addon uses both inline patch and images.

If the metallb addon is created using this example, the metalLB instance that gets installed via BOP uses v0.13.11 images instead of v0.13.10(specified url). And as per the specified inline patch, the failureThreshold of livenessProbe for the metalLB controller container is updated to 2.

- name: metallb
  kind: "Manifest"
  enabled: true
  namespace: boundless-system
  manifest:
    url: "https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml"
    values:
      images:
        - name: quay.io/metallb/speaker:v0.13.10
          newName: quay.io/metallb/speaker
          newTag: v0.13.11
        - name: quay.io/metallb/controller:v0.13.10
          newName: quay.io/metallb/controller
          newTag: v0.13.11
      patches:
        - patch: |-
            apiVersion: apps/v1
            kind: Deployment
            metadata:
              name: controller
              namespace: metallb-system
            spec:
              template:
                spec:
                  containers:
                  - name: controller
                    livenessProbe:
                      failureThreshold: 2