Skip to main content
Version: 0.38.0

Creating GitOpsTemplates Enterprise


For complete examples of widely-used templates, see the Quickstart guide.

GitOps Templates were originally introduced to enable self-service operations for the the cluster creation workflow.

We have since extended this capability to cover Terraform, Crossplane and general Kubernetes resources.

An example template could, upon merging to a GitOps repository and reconciling in a cluster, provide a running developer environment consisting of an EKS cluster, an RDS database, and a branch and revision of the current application through single template.

Templates can be loaded into the cluster by Platform Operator by adding them to the Flux-manage GitOps repository for the target cluster. Alternatively, they can be applied directly to the cluster with kubectl.


Weave GitOps will search for templates in the default namespace. This can be changed by configuring the config.capi.namespace value in the Weave GitOps Enterprise Helm Chart.

Template Type

Template types are used by Weave GitOps to group the templates nicely in the Dashboard UI.

There are 4 recommended template types:

  • application - for application templates
  • cluster - for cluster templates
  • terraform - for Terraform templates
  • pipeline - for Pipeline templates

Declare this in the object manifest by using the label and setting the value as the name of the type.

kind: GitOpsTemplate
name: example-template
namespace: default
labels: pipeline
# ...

Template Components

The rendering of certain component sections in a template can be enabled or disabled with annotations. The annotation keys are of the form and have boolean values.

Supported components:

  • profiles
  • kustomizations
  • credentials


annotations: "true" "false" "true"

In-UI Template Editing

When rendering a template, a annotation is added by default to the first resource in the resourcetemplates.

It can be added to any other resource by simply adding the annotation in empty form. This annotation holds information about which template generated the resource and the parameter values used as a json string.

If the resource type is one of the following and has this annotation, an Edit resource button will appear in the GitOps UI which allows the editing of the resource by users, after which it will be re-rendered:

  • Applications:
    • HelmRelease
    • Kustomization
  • Sources:
    • HelmRepository
    • GitRepository
  • Clusters:
    • GitopsCluster


- apiVersion: v1
kind: ConfigMap
name: my-configmap
my-key: my-value
- apiVersion:
kind: HelmRepository
# This annotation will add an `Edit resource` button in the UI for this resource
annotations: ''
name: nginx
namespace: default