Skip to main content

Object Template Plugin

The rigdev.object_template patches a YAML spec to a Kubernetes object defined by a Group, Kind and Name.

The config can be templated with standard Go templating and has

.capsule
.current

as its templating context where .current refers to the current version of the object being modified.

If the name is empty, it defaults to the capsule name. If it is '*' it will execute the object template on all objects of the given Group and Kind. For each object, .current will refer to that specific object when templating.

Example

Config:

Helm values - Operator
config:
pipeline:
steps:
- plugins:
- plugin: rigdev.object_template
config: |
object: |
spec:
externalName: some-name
group: core
kind: Service
name: {{ .capsule.metadata.name }}

The resulting Service resource of the Capsule, if the Capsule is named my-capsule

kind: Service
metadata:
name: my-capsule
...
spec:
externalName: some-name
...

Config

Configuration for the object_template plugin

FieldDescription
object stringThe yaml to apply to the object. The yaml can be templated.
group stringGroup to match, for which objects to apply the patch to.
kind stringKind to match, for which objects to apply the patch to.
name stringName of the object to match. Default to Capsule-name. If '*' will execute the object template
on all objects of the given group and kind.