Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 582 Bytes

readme.md

File metadata and controls

37 lines (28 loc) · 582 Bytes

Use Name in template

Commands

cue eval *.cue


cue export *.cue --out yaml

Explanations

In template.cue, we define a template deployments and we set values in value.cue Name is the name of the template and we can use it inside the template.

Example:

#Template
deployments: [Name=_]: {
	metadata: name: Name
	...
}

#Value
deployments: tutu: {}

In value.cue, tutu is the name of the deployment, it will use in the metadata name:

deployments: {
    tutu: {
        metadata: {
            name: "tutu"
        }
    }