forked from stefanprodan/timoni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimoni.cue
39 lines (33 loc) · 1.14 KB
/
timoni.cue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Code generated by timoni. DO NOT EDIT.
// Note that this file is required and should contain
// the values schema and the timoni workflow.
package main
import (
templates "timoni.sh/podinfo/templates"
)
// Define the schema for the user-supplied values.
// At runtime, Timoni injects the supplied values
// and validates them according to the Config schema.
values: templates.#Config
// Define how Timoni should build, validate and
// apply the Kubernetes resources.
timoni: {
apiVersion: "v1alpha1"
// Define the instance that outputs the Kubernetes resources.
// At runtime, Timoni builds the instance and validates
// the resulting resources according to their Kubernetes schema.
instance: templates.#Instance & {
// The user-supplied values are merged with the
// default values at runtime by Timoni.
config: values
// The instance name and namespace tag values
// are injected at runtime by Timoni.
config: metadata: {
name: string @tag(name)
namespace: string @tag(namespace)
}
}
// Pass Kubernetes resources outputted by the instance
// to Timoni's multi-step apply.
apply: all: [ for obj in instance.objects {obj}]
}