Skip to main content
New to Testkube? Unleash the power of cloud native testing in Kubernetes with Testkube. Get Started >

Templates

warning

Features described in this document are being deprecated as part of the transition to Test Workflows - Read More.

Templates allow you to store templates for other resources used in Testkube. We support a list of templates job | container | cronjob | scraper | pvc | webhook | pod. To define templates in Testkube, you'll need to provide a template body (in Golang template format) and a type of the template.

Testkube provides access to the Sprig functions library in templates.

Creating a Template

The template can be created using the API, CLI, or a Custom Resource.

If you prefer to use the API for creating a template, please visit the Core OSS API spec for templates in the doc below.

OpenAPI spec

Using Templates

You will need to refer to a template in the corresponding reference field of the resource.

Check templateReference fields in the Core OSS API spec. For example, Test -> executionRequest -> jobTemplateReference field. OpenAPI spec