-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathkptfile.yaml
More file actions
484 lines (480 loc) · 19.3 KB
/
Copy pathkptfile.yaml
File metadata and controls
484 lines (480 loc) · 19.3 KB
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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
definitions:
Condition:
properties:
message:
type: string
x-go-name: Message
reason:
type: string
x-go-name: Reason
status:
$ref: '#/definitions/ConditionStatus'
type:
type: string
x-go-name: Type
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
ConditionStatus:
type: string
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Function:
properties:
configMap:
additionalProperties:
type: string
description: '`ConfigMap` is a convenient way to specify a function config of kind ConfigMap.'
type: object
x-go-name: ConfigMap
configPath:
description: |-
`ConfigPath` specifies a slash-delimited relative path to a file in the current directory
containing a KRM resource used as the function config. This resource is
excluded when resolving 'sources', and as a result cannot be operated on
by the pipeline.
type: string
x-go-name: ConfigPath
exclude:
description: |-
`Exclude` are used to specify resources on which the function should NOT be executed.
If not specified, all resources selected by `Selectors` are selected.
items:
$ref: '#/definitions/Selector'
type: array
x-go-name: Exclusions
exec:
description: |-
Exec specifies the function binary executable.
The executable can be fully qualified or it must exists in the $PATH e.g:
exec: set-namespace
exec: /usr/local/bin/my-custom-fn
type: string
x-go-name: Exec
image:
description: |-
`Image` specifies the function container image.
It can either be fully qualified, e.g.:
image: ghcr.io/kptdev/krm-functions-catalog/set-labels
Optionally, kpt can be configured to use a image
registry host-path that will be used to resolve the image path in case
the image path is missing (Defaults to ghcr.io/kptdev/krm-functions-catalog).
e.g. The following resolves to ghcr.io/kptdev/krm-functions-catalog/set-labels
image: set-labels
type: string
x-go-name: Image
name:
description: |-
`Name` is used to uniquely identify the function declaration
this is primarily used for merging function declaration with upstream counterparts
type: string
x-go-name: Name
condition:
description: |-
`Condition` is an optional CEL expression that determines whether this
function should be executed. The expression is evaluated against the list
of KRM resources passed to this function step (after `Selectors` and
`Exclude` have been applied) and should return a boolean value.
If omitted or evaluates to true, the function executes normally.
If evaluates to false, the function is skipped.
type: string
x-go-name: Condition
selectors:
description: |-
`Selectors` are used to specify resources on which the function should be executed
if not specified, all resources are selected
items:
$ref: '#/definitions/Selector'
type: array
x-go-name: Selectors
tag:
description: |-
`Tag` is an optional field for specifying/overriding the tag of the function image.
Can be a semver constraint satisfying this spec: https://github.com/Masterminds/semver?tab=readme-ov-file#checking-version-constraints
type: string
x-go-name: Tag
title: Function specifies a KRM function.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
GenericLock:
properties:
resourceID:
description: |-
ResourceID is a unique identifier of the resource.
The format depends on the underlying storage.
type: string
x-go-name: ResourceID
resourceVersion:
description: |-
ResourceVersion indicates the last fetched version of the resource.
The format depends on the underlying storage.
type: string
x-go-name: ResourceVersion
storeID:
description: |-
StoreID is a descriptor of the underlying storage type.
e.g. 'DB' for database
type: string
x-go-name: StoreID
title: GenericLock is a minimal locator for a package stored in a generic storage backend.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Git:
properties:
directory:
description: |-
Directory is the sub directory of the git repository.
e.g. 'staging/cockroachdb'
type: string
x-go-name: Directory
ref:
description: Ref can be a Git branch, tag, or a commit SHA-1.
type: string
x-go-name: Ref
repo:
description: |-
Repo is the git repository the package.
e.g. 'https://github.com/kubernetes/examples.git'
type: string
x-go-name: Repo
title: Git is the user-specified locator for a package on Git.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
GitLock:
properties:
commit:
description: |-
Commit is the SHA-1 for the last fetch of the package.
This is set by kpt for bookkeeping purposes.
type: string
x-go-name: Commit
directory:
description: |-
Directory is the sub directory of the git repository that was fetched.
e.g. 'staging/cockroachdb'
type: string
x-go-name: Directory
ref:
description: |-
Ref can be a Git branch, tag, or a commit SHA-1 that was fetched.
e.g. 'master'
type: string
x-go-name: Ref
repo:
description: |-
Repo is the git repository that was fetched.
e.g. 'https://github.com/kubernetes/examples.git'
type: string
x-go-name: Repo
title: GitLock is the resolved locator for a package on Git.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Inventory:
description: All of the the parameters are required if any are set.
properties:
annotations:
additionalProperties:
type: string
type: object
x-go-name: Annotations
inventoryID:
description: Unique label to identify inventory resource in cluster.
type: string
x-go-name: InventoryID
labels:
additionalProperties:
type: string
type: object
x-go-name: Labels
name:
description: Name of the inventory resource.
type: string
x-go-name: Name
namespace:
description: Namespace for the inventory resource.
type: string
x-go-name: Namespace
title: Inventory encapsulates the parameters for the inventory resource applied to a cluster.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Locator:
properties:
generic:
$ref: '#/definitions/GenericLock'
git:
$ref: '#/definitions/GitLock'
type:
$ref: '#/definitions/OriginType'
title: Locator is a resolved locator for the last fetch of the package.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
NameMeta:
properties:
name:
description: Name is the metadata.name field of a Resource
type: string
x-go-name: Name
namespace:
description: Namespace is the metadata.namespace field of a Resource
type: string
x-go-name: Namespace
title: NameMeta contains name information.
type: object
x-go-package: sigs.k8s.io/kustomize/kyaml/yaml
ObjectMeta:
description: ObjectMeta contains metadata about a Resource
properties:
annotations:
additionalProperties:
type: string
description: Annotations is the metadata.annotations field of a Resource.
type: object
x-go-name: Annotations
labels:
additionalProperties:
type: string
description: Labels is the metadata.labels field of a Resource
type: object
x-go-name: Labels
name:
description: Name is the metadata.name field of a Resource
type: string
x-go-name: Name
namespace:
description: Namespace is the metadata.namespace field of a Resource
type: string
x-go-name: Namespace
type: object
x-go-package: sigs.k8s.io/kustomize/kyaml/yaml
OriginType:
title: OriginType defines the type of origin for a package.
type: string
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
PackageInfo:
description: |-
These fields are not consumed by any functionality in kpt and are simply passed through.
Note that like any other KRM resource, humans and automation can also use `metadata.labels` and
`metadata.annotations` as the extension mechanism.
properties:
description:
description: Description contains a short description of the package.
type: string
x-go-name: Description
emails:
description: Email is the list of emails for the package authors.
items:
type: string
type: array
x-go-name: Emails
keywords:
description: Keywords is a list of keywords for this package.
items:
type: string
type: array
x-go-name: Keywords
license:
description: 'SPDX license identifier (e.g. "Apache-2.0"). See: https://spdx.org/licenses/'
type: string
x-go-name: License
licenseFile:
description: Relative slash-delimited path to the license file (e.g. LICENSE.txt)
type: string
x-go-name: LicenseFile
man:
description: Man is the path to documentation about the package
type: string
x-go-name: Man
readinessGates:
items:
$ref: '#/definitions/ReadinessGate'
type: array
x-go-name: ReadinessGates
site:
description: Site is the URL for package web page.
type: string
x-go-name: Site
title: PackageInfo contains optional information about the package such as license, documentation, etc.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Pipeline:
properties:
mutators:
description: Mutators defines a list of of KRM functions that mutate resources.
items:
$ref: '#/definitions/Function'
type: array
x-go-name: Mutators
validators:
description: |-
Validators defines a list of KRM functions that validate resources.
Validators are not permitted to mutate resources.
items:
$ref: '#/definitions/Function'
type: array
x-go-name: Validators
title: Pipeline declares a pipeline of functions used to mutate or validate resources.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
ReadinessGate:
properties:
conditionType:
type: string
x-go-name: ConditionType
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
ResourceMeta:
properties:
annotations:
additionalProperties:
type: string
description: Annotations is the metadata.annotations field of a Resource.
type: object
x-go-name: Annotations
apiVersion:
description: APIVersion is the apiVersion field of a Resource
type: string
x-go-name: APIVersion
kind:
description: Kind is the kind field of a Resource
type: string
x-go-name: Kind
labels:
additionalProperties:
type: string
description: Labels is the metadata.labels field of a Resource
type: object
x-go-name: Labels
name:
description: Name is the metadata.name field of a Resource
type: string
x-go-name: Name
namespace:
description: Namespace is the metadata.namespace field of a Resource
type: string
x-go-name: Namespace
title: ResourceMeta contains the metadata for a both Resource Type and Resource.
type: object
x-go-package: sigs.k8s.io/kustomize/kyaml/yaml
Selector:
description: |-
Selector specifies the selection criteria
please update IsEmpty method if more properties are added
properties:
annotations:
additionalProperties:
type: string
description: Annotations on the target resources
type: object
x-go-name: Annotations
apiVersion:
description: APIVersion of the target resources
type: string
x-go-name: APIVersion
kind:
description: Kind of the target resources
type: string
x-go-name: Kind
labels:
additionalProperties:
type: string
description: Labels on the target resources
type: object
x-go-name: Labels
name:
description: Name of the target resources
type: string
x-go-name: Name
namespace:
description: Namespace of the target resources
type: string
x-go-name: Namespace
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Status:
properties:
conditions:
items:
$ref: '#/definitions/Condition'
type: array
x-go-name: Conditions
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
TypeMeta:
description: |-
TypeMeta partially copies apimachinery/pkg/apis/meta/v1.TypeMeta
No need for a direct dependence; the fields are stable.
properties:
apiVersion:
description: APIVersion is the apiVersion field of a Resource
type: string
x-go-name: APIVersion
kind:
description: Kind is the kind field of a Resource
type: string
x-go-name: Kind
type: object
x-go-package: sigs.k8s.io/kustomize/kyaml/yaml
UpdateStrategyType:
title: UpdateStrategyType defines the strategy for updating a package from upstream.
type: string
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
Upstream:
properties:
git:
$ref: '#/definitions/Git'
type:
$ref: '#/definitions/OriginType'
updateStrategy:
$ref: '#/definitions/UpdateStrategyType'
title: Upstream is a user-specified upstream locator for a package.
type: object
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
kptfile:
properties:
annotations:
additionalProperties:
type: string
description: Annotations is the metadata.annotations field of a Resource.
type: object
x-go-name: Annotations
apiVersion:
description: APIVersion is the apiVersion field of a Resource
type: string
x-go-name: APIVersion
info:
$ref: '#/definitions/PackageInfo'
inventory:
$ref: '#/definitions/Inventory'
kind:
description: Kind is the kind field of a Resource
type: string
x-go-name: Kind
labels:
additionalProperties:
type: string
description: Labels is the metadata.labels field of a Resource
type: object
x-go-name: Labels
name:
description: Name is the metadata.name field of a Resource
type: string
x-go-name: Name
namespace:
description: Namespace is the metadata.namespace field of a Resource
type: string
x-go-name: Namespace
pipeline:
$ref: '#/definitions/Pipeline'
status:
$ref: '#/definitions/Status'
upstream:
$ref: '#/definitions/Upstream'
upstreamLock:
$ref: '#/definitions/Locator'
title: KptFile contains information about a package managed with kpt.
type: object
x-go-name: KptFile
x-go-package: github.com/kptdev/kpt/pkg/api/kptfile/v1
info:
title: Kptfile schema.
version: v1
paths: {}
swagger: "2.0"