Skip to content

Workload Template

A workload is restricted to a specific namespace and placement policy assigned to it. When a workload is used in multiple stages of a pipeline, there may be a need to use environment/stage specific overrides outside the workload definition. Workload templates do not have "namespace" and "placement" associated with it. Therefore, when a workload template is used in a stage in a pipeline, it is necessary to assign namespace and placement. These can be provided dynamically in a Stage in a pipeline.


Use Cases

Described below are some example use cases where workload templating can be extremely valuable

Developer Test Beds

Every developer in the team is provided their own "test bed". Every time there is a new version/build, the test beds for all developers need to be updated and made current automatically.

Hosted Software

ISV hosts a copy of the same workload in a "separate namespace per customer". ISV wants the software to be kept patched and updated automatically without having to manually handle the workloads one by one.


Create Workload Template

You can create a workload template imperatively using the Console or declaratively using a workload template spec YAML file and use it via the RCTL CLI.

  • Provide a unique name for the workload so that you can refer to it and find it later
  • Specify the package type (Both "Helm 3" or "YAML" formats are supported)
  • Specify how the artifacts can be accessed. You have two options

Upload Artifacts

Upload them to the controller as part of the workload template creation process

Create Workload Template

Repo Sync

Provide the location (Git or Helm repo)

Create Workload Template

Important

If your artifacts are in a private repository, ensure you configure an agent so that the controller can monitor it for updates.


Artifact Details

The artifacts associated with your workload template can either be a Helm chart or k8s YAML file. You can either provide it to the controller by uploading it or have the controller automatically retrieve it from your repository.

Upload Artifacts

Helm Chart

If you selected "upload artifacts" and your package type is "Helm", select the Helm chart (packaged as a TGZ file) and upload it.

Upload Helm Chart


k8s YAML

If you selected "upload artifacts" and your package type is "k8s YAML", select the yaml file and upload it.

Upload Helm Chart


Repository

Helm Chart

If you selected "upload artifacts" and your package type is "Helm", select the Helm chart (packaged as a TGZ file) and upload it.

Helm Chart-Repository

Users are also provided with a number of advanced options for Helm

Helm Chart-Repository - Advanced Options


k8s YAML

If you selected "upload artifacts" and your package type is "k8s YAML", select the yaml file and upload it.

k8s YAML-Repository


Use Workload Template

Once created, workload templates can be used in a Stage in a Pipeline.

  • Provide a name for the stage
  • Select "Workload Template" from Actions
  • Select the workload template you need from the dropdown

Overrides

Since a workload template does not specify the target namespace or placement, you have to specify these here.

Namespace

Either select from (a) the list of existing namespaces OR (b) create a new namespace as part of the stage.

Placement

Select placement type to determine the target clusters for deployment.

Drift Action

Specify the kind of action you wish to take wrt. drift detection (Not Set, Detect and Notify and Detect and Block are possible options)

Use Template in Stage