/
tinkerbell.org_workflows.yaml
353 lines (351 loc) · 15.6 KB
/
tinkerbell.org_workflows.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: workflows.tinkerbell.org
spec:
group: tinkerbell.org
names:
categories:
- tinkerbell
kind: Workflow
listKind: WorkflowList
plural: workflows
shortNames:
- wf
singular: workflow
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.templateRef
name: Template
type: string
- jsonPath: .status.state
name: State
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: Workflow is the Schema for the Workflows API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: WorkflowSpec defines the desired state of Workflow.
properties:
hardwareMap:
additionalProperties:
type: string
description: A mapping of template devices to hadware mac addresses
type: object
hardwareRef:
description: Name of the Hardware associated with this workflow.
type: string
templateRef:
description: Name of the Template associated with this workflow.
type: string
type: object
status:
description: WorkflowStatus defines the observed state of Workflow.
properties:
globalTimeout:
description: GlobalTimeout represents the max execution time
format: int64
type: integer
state:
description: State is the state of the workflow in Tinkerbell.
type: string
tasks:
description: Tasks are the tasks to be completed
items:
description: Task represents a series of actions to be completed by a worker.
properties:
actions:
items:
description: Action represents a workflow action.
properties:
command:
items:
type: string
type: array
environment:
additionalProperties:
type: string
type: object
image:
type: string
message:
type: string
name:
type: string
pid:
type: string
seconds:
format: int64
type: integer
startedAt:
format: date-time
type: string
status:
type: string
timeout:
format: int64
type: integer
volumes:
items:
type: string
type: array
type: object
type: array
environment:
additionalProperties:
type: string
type: object
name:
type: string
volumes:
items:
type: string
type: array
worker:
type: string
required:
- actions
- name
- worker
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
- additionalPrinterColumns:
- description: State of the workflow such as Pending,Running etc
jsonPath: .status.state
name: State
type: string
- description: Hardware object that runs the workflow
jsonPath: .spec.hardwareRef
name: Hardware
type: string
- description: Template to run on the associated Hardware
jsonPath: .spec.templateRef
name: Template
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: |-
Workflow describes a set of actions to be run on a specific Hardware. Workflows execute
once and should be considered ephemeral.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
properties:
hardwareRef:
description: HardwareRef is a reference to a Hardware resource this workflow will execute on.
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
templateParams:
additionalProperties:
type: string
description: |-
TemplateParams are a list of key-value pairs that are injected into templates at render
time. TemplateParams are exposed to templates using a top level .Params key.
For example, TemplateParams = {"foo": "bar"}, the foo key can be accessed via .Params.foo.
type: object
templateRef:
description: TemplateRef is a reference to a Template resource used to render workflow actions.
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
timeout:
default: 0
description: |-
TimeoutSeconds defines the time the workflow has to complete. The timer begins when the first
action is requested. When set to 0, no timeout is applied.
format: int64
minimum: 0
type: integer
type: object
status:
properties:
actions:
description: Actions is a list of action states.
items:
description: ActionStatus describes status information about an action.
properties:
failureMessage:
description: |-
FailureMessage is a free-form user friendly message describing why the Action entered the
ActionStateFailed state. Typically, this is an elaboration on the Reason.
type: string
failureReason:
description: |-
FailureReason is a short CamelCase word or phrase describing why the Action entered
ActionStateFailed.
type: string
id:
description: ID uniquely identifies the action status.
type: string
lastTransitioned:
description: LastTransition is the observed time when State transitioned last.
format: date-time
type: string
rendered:
description: Rendered is the rendered action.
properties:
args:
description: |-
Args are a set of arguments to be passed to the command executed by the container on
launch.
items:
type: string
type: array
cmd:
description: |-
Cmd defines the command to use when launching the image. It overrides the default command
of the action. It must be a unix path to an executable program.
pattern: ^(/[^/ ]*)+/?$
type: string
env:
additionalProperties:
type: string
description: Env defines environment variables used when launching the container.
type: object
image:
description: Image is an OCI image.
type: string
name:
description: Name is a name for the action.
type: string
namespaces:
description: Namespace defines the Linux namespaces this container should execute in.
properties:
network:
description: Network defines the network namespace.
type: string
pid:
description: PID defines the PID namespace
type: integer
type: object
volumes:
description: Volumes defines the volumes to mount into the container.
items:
description: "Volume is a specification for mounting a volume in an action. Volumes take the form\n{SRC-VOLUME-NAME | SRC-HOST-DIR}:TGT-CONTAINER-DIR:OPTIONS. When specifying a VOLUME-NAME that\ndoes not exist it will be created for you. Examples:\n\n\nRead-only bind mount bound to /data\n\n\n\t/etc/data:/data:ro\n\n\nWritable volume name bound to /data\n\n\n\tshared_volume:/data\n\n\nSee https://docs.docker.com/storage/volumes/ for additional details."
type: string
type: array
required:
- image
- name
type: object
startedAt:
description: |-
StartedAt is the time the action was started as reported by the client. Nil indicates the
Action has not started.
format: date-time
type: string
state:
description: State describes the current state of the action.
type: string
required:
- id
type: object
type: array
conditions:
description: Conditions details a set of observations about the Workflow.
items:
description: |-
Condition defines an observation on a resource that is generally attainable by inspecting
other status fields.
properties:
lastTransitionTime:
description: LastTransition is the last time the condition transitioned from one status to another.
format: date-time
type: string
message:
description: Message is a human readable message indicating details about the last transition.
type: string
reason:
description: Reason is a short CamelCase description for the conditions last transition.
type: string
status:
description: Status of the condition.
type: string
type:
description: Type of condition.
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
lastTransitioned:
description: LastTransition is the observed time when State transitioned last.
format: date-time
type: string
startedAt:
description: |-
StartedAt is the time the first action was requested. Nil indicates the Workflow has not
started.
format: date-time
type: string
state:
description: State describes the current state of the Workflow.
type: string
required:
- actions
type: object
type: object
served: false
storage: false
subresources:
status: {}