@schemastore/zarf 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +14 -0
- package/index.d.ts +946 -0
- package/package.json +10 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,946 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ZarfPackage the top-level structure of a Zarf config file.
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpsGithubComZarfDevZarfSrcApiV1Alpha1ZarfPackage {
|
|
7
|
+
/**
|
|
8
|
+
* The API version of the Zarf package.
|
|
9
|
+
*/
|
|
10
|
+
apiVersion?: 'zarf.dev/v1alpha1';
|
|
11
|
+
/**
|
|
12
|
+
* The kind of Zarf package.
|
|
13
|
+
*/
|
|
14
|
+
kind: 'ZarfInitConfig' | 'ZarfPackageConfig';
|
|
15
|
+
metadata?: ZarfMetadata;
|
|
16
|
+
build?: ZarfBuildData;
|
|
17
|
+
/**
|
|
18
|
+
* List of components to deploy in this package.
|
|
19
|
+
*
|
|
20
|
+
* @minItems 1
|
|
21
|
+
*/
|
|
22
|
+
components: [ZarfComponent, ...ZarfComponent[]];
|
|
23
|
+
/**
|
|
24
|
+
* Constant template values applied on deploy for K8s resources.
|
|
25
|
+
*/
|
|
26
|
+
constants?: Constant[];
|
|
27
|
+
/**
|
|
28
|
+
* Variable template values applied on deploy for K8s resources.
|
|
29
|
+
*/
|
|
30
|
+
variables?: InteractiveVariable[];
|
|
31
|
+
/**
|
|
32
|
+
* This interface was referenced by `HttpsGithubComZarfDevZarfSrcApiV1Alpha1ZarfPackage`'s JSON-Schema definition
|
|
33
|
+
* via the `patternProperty` "^x-".
|
|
34
|
+
*/
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Package metadata.
|
|
39
|
+
*/
|
|
40
|
+
export interface ZarfMetadata {
|
|
41
|
+
/**
|
|
42
|
+
* Name to identify this Zarf package.
|
|
43
|
+
*/
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* Additional information about this package.
|
|
47
|
+
*/
|
|
48
|
+
description?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Generic string set by a package author to track the package version (Note: ZarfInitConfigs will always be versioned to the CLIVersion they were created with).
|
|
51
|
+
*/
|
|
52
|
+
version?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Link to package information when online.
|
|
55
|
+
*/
|
|
56
|
+
url?: string;
|
|
57
|
+
/**
|
|
58
|
+
* An image URL to embed in this package (Reserved for future use in Zarf UI).
|
|
59
|
+
*/
|
|
60
|
+
image?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Disable compression of this package.
|
|
63
|
+
*/
|
|
64
|
+
uncompressed?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The target cluster architecture for this package.
|
|
67
|
+
*/
|
|
68
|
+
architecture?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries.
|
|
71
|
+
*/
|
|
72
|
+
yolo?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Comma-separated list of package authors (including contact info).
|
|
75
|
+
*/
|
|
76
|
+
authors?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Link to package documentation when online.
|
|
79
|
+
*/
|
|
80
|
+
documentation?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Link to package source code when online.
|
|
83
|
+
*/
|
|
84
|
+
source?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Name of the distributing entity, organization or individual.
|
|
87
|
+
*/
|
|
88
|
+
vendor?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Checksum of a checksums.txt file that contains checksums all the layers within the package.
|
|
91
|
+
*/
|
|
92
|
+
aggregateChecksum?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Annotations contains arbitrary metadata about the package.
|
|
95
|
+
* Users are encouraged to follow OCI image-spec https://github.com/opencontainers/image-spec/blob/main/annotations.md
|
|
96
|
+
*/
|
|
97
|
+
annotations?: {
|
|
98
|
+
[k: string]: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* AllowNamespaceOverride controls whether a package's namespace may be overridden.
|
|
102
|
+
*/
|
|
103
|
+
allowNamespaceOverride?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* This interface was referenced by `ZarfMetadata`'s JSON-Schema definition
|
|
106
|
+
* via the `patternProperty` "^x-".
|
|
107
|
+
*/
|
|
108
|
+
[k: string]: unknown;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Zarf-generated package build data.
|
|
112
|
+
*/
|
|
113
|
+
export interface ZarfBuildData {
|
|
114
|
+
/**
|
|
115
|
+
* The machine name that created this package.
|
|
116
|
+
*/
|
|
117
|
+
terminal: string;
|
|
118
|
+
/**
|
|
119
|
+
* The username who created this package.
|
|
120
|
+
*/
|
|
121
|
+
user: string;
|
|
122
|
+
/**
|
|
123
|
+
* The architecture this package was created on.
|
|
124
|
+
*/
|
|
125
|
+
architecture: string;
|
|
126
|
+
/**
|
|
127
|
+
* The timestamp when this package was created.
|
|
128
|
+
*/
|
|
129
|
+
timestamp: string;
|
|
130
|
+
/**
|
|
131
|
+
* The version of Zarf used to build this package.
|
|
132
|
+
*/
|
|
133
|
+
version: string;
|
|
134
|
+
/**
|
|
135
|
+
* Any migrations that have been run on this package.
|
|
136
|
+
*/
|
|
137
|
+
migrations?: string[];
|
|
138
|
+
/**
|
|
139
|
+
* Any registry domains that were overridden on package create when pulling images.
|
|
140
|
+
*/
|
|
141
|
+
registryOverrides?: {
|
|
142
|
+
[k: string]: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Whether this package was created with differential components.
|
|
146
|
+
*/
|
|
147
|
+
differential?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Version of a previously built package used as the basis for creating this differential package.
|
|
150
|
+
*/
|
|
151
|
+
differentialPackageVersion?: string;
|
|
152
|
+
/**
|
|
153
|
+
* List of components that were not included in this package due to differential packaging.
|
|
154
|
+
*/
|
|
155
|
+
differentialMissing?: string[];
|
|
156
|
+
/**
|
|
157
|
+
* The minimum version of Zarf that does not have breaking package structure changes.
|
|
158
|
+
*/
|
|
159
|
+
lastNonBreakingVersion?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The flavor of Zarf used to build this package.
|
|
162
|
+
*/
|
|
163
|
+
flavor?: string;
|
|
164
|
+
/**
|
|
165
|
+
* This interface was referenced by `ZarfBuildData`'s JSON-Schema definition
|
|
166
|
+
* via the `patternProperty` "^x-".
|
|
167
|
+
*/
|
|
168
|
+
[k: string]: unknown;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* ZarfComponent is the primary functional grouping of assets to deploy by Zarf.
|
|
172
|
+
*/
|
|
173
|
+
export interface ZarfComponent {
|
|
174
|
+
/**
|
|
175
|
+
* The name of the component.
|
|
176
|
+
*/
|
|
177
|
+
name: string;
|
|
178
|
+
/**
|
|
179
|
+
* Message to include during package deploy describing the purpose of this component.
|
|
180
|
+
*/
|
|
181
|
+
description?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Determines the default Y/N state for installing this component on package deploy.
|
|
184
|
+
*/
|
|
185
|
+
default?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Do not prompt user to install this component.
|
|
188
|
+
*/
|
|
189
|
+
required?: boolean;
|
|
190
|
+
only?: ZarfComponentOnlyTarget;
|
|
191
|
+
/**
|
|
192
|
+
* [Deprecated] Create a user selector field based on all components in the same group. This will be removed in Zarf v1.0.0. Consider using 'only.flavor' instead.
|
|
193
|
+
*/
|
|
194
|
+
group?: string;
|
|
195
|
+
import?: ZarfComponentImport;
|
|
196
|
+
/**
|
|
197
|
+
* Kubernetes manifests to be included in a generated Helm chart on package deploy.
|
|
198
|
+
*/
|
|
199
|
+
manifests?: ZarfManifest[];
|
|
200
|
+
/**
|
|
201
|
+
* Helm charts to install during package deploy.
|
|
202
|
+
*/
|
|
203
|
+
charts?: ZarfChart[];
|
|
204
|
+
/**
|
|
205
|
+
* Datasets to inject into a container in the target cluster.
|
|
206
|
+
*/
|
|
207
|
+
dataInjections?: ZarfDataInjection[];
|
|
208
|
+
/**
|
|
209
|
+
* Files or folders to place on disk during package deployment.
|
|
210
|
+
*/
|
|
211
|
+
files?: ZarfFile[];
|
|
212
|
+
/**
|
|
213
|
+
* List of OCI images to include in the package.
|
|
214
|
+
*/
|
|
215
|
+
images?: string[];
|
|
216
|
+
/**
|
|
217
|
+
* List of git repos to include in the package.
|
|
218
|
+
*/
|
|
219
|
+
repos?: string[];
|
|
220
|
+
scripts?: DeprecatedZarfComponentScripts;
|
|
221
|
+
actions?: ZarfComponentActions;
|
|
222
|
+
/**
|
|
223
|
+
* List of resources to health check after deployment
|
|
224
|
+
*/
|
|
225
|
+
healthChecks?: NamespacedObjectKindReference[];
|
|
226
|
+
/**
|
|
227
|
+
* This interface was referenced by `ZarfComponent`'s JSON-Schema definition
|
|
228
|
+
* via the `patternProperty` "^x-".
|
|
229
|
+
*/
|
|
230
|
+
[k: string]: unknown;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Filter when this component is included in package creation or deployment.
|
|
234
|
+
*/
|
|
235
|
+
export interface ZarfComponentOnlyTarget {
|
|
236
|
+
/**
|
|
237
|
+
* Only deploy component to specified OS.
|
|
238
|
+
*/
|
|
239
|
+
localOS?: 'linux' | 'darwin' | 'windows';
|
|
240
|
+
cluster?: ZarfComponentOnlyCluster;
|
|
241
|
+
/**
|
|
242
|
+
* Only include this component when a matching '--flavor' is specified on 'zarf package create'.
|
|
243
|
+
*/
|
|
244
|
+
flavor?: string;
|
|
245
|
+
/**
|
|
246
|
+
* This interface was referenced by `ZarfComponentOnlyTarget`'s JSON-Schema definition
|
|
247
|
+
* via the `patternProperty` "^x-".
|
|
248
|
+
*/
|
|
249
|
+
[k: string]: unknown;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Only deploy component to specified clusters.
|
|
253
|
+
*/
|
|
254
|
+
export interface ZarfComponentOnlyCluster {
|
|
255
|
+
/**
|
|
256
|
+
* Only create and deploy to clusters of the given architecture.
|
|
257
|
+
*/
|
|
258
|
+
architecture?: 'amd64' | 'arm64';
|
|
259
|
+
/**
|
|
260
|
+
* A list of kubernetes distros this package works with (Reserved for future use).
|
|
261
|
+
*/
|
|
262
|
+
distros?: string[];
|
|
263
|
+
/**
|
|
264
|
+
* This interface was referenced by `ZarfComponentOnlyCluster`'s JSON-Schema definition
|
|
265
|
+
* via the `patternProperty` "^x-".
|
|
266
|
+
*/
|
|
267
|
+
[k: string]: unknown;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Import a component from another Zarf package.
|
|
271
|
+
*/
|
|
272
|
+
export interface ZarfComponentImport {
|
|
273
|
+
/**
|
|
274
|
+
* The name of the component to import from the referenced zarf.yaml.
|
|
275
|
+
*/
|
|
276
|
+
name?: string;
|
|
277
|
+
/**
|
|
278
|
+
* The path to the directory containing the zarf.yaml to import.
|
|
279
|
+
*/
|
|
280
|
+
path?: string;
|
|
281
|
+
/**
|
|
282
|
+
* [beta] The URL to a Zarf package to import via OCI.
|
|
283
|
+
*/
|
|
284
|
+
url?: string;
|
|
285
|
+
/**
|
|
286
|
+
* This interface was referenced by `ZarfComponentImport`'s JSON-Schema definition
|
|
287
|
+
* via the `patternProperty` "^x-".
|
|
288
|
+
*/
|
|
289
|
+
[k: string]: unknown;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* ZarfManifest defines raw manifests Zarf will deploy as a helm chart.
|
|
293
|
+
*/
|
|
294
|
+
export interface ZarfManifest {
|
|
295
|
+
/**
|
|
296
|
+
* A name to give this collection of manifests; this will become the name of the dynamically-created helm chart.
|
|
297
|
+
*/
|
|
298
|
+
name: string;
|
|
299
|
+
/**
|
|
300
|
+
* The namespace to deploy the manifests to.
|
|
301
|
+
*/
|
|
302
|
+
namespace?: string;
|
|
303
|
+
/**
|
|
304
|
+
* List of local K8s YAML files or remote URLs to deploy (in order).
|
|
305
|
+
*/
|
|
306
|
+
files?: string[];
|
|
307
|
+
/**
|
|
308
|
+
* Allow traversing directory above the current directory if needed for kustomization.
|
|
309
|
+
*/
|
|
310
|
+
kustomizeAllowAnyDirectory?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* List of local kustomization paths or remote URLs to include in the package.
|
|
313
|
+
*/
|
|
314
|
+
kustomizations?: string[];
|
|
315
|
+
/**
|
|
316
|
+
* Whether to not wait for manifest resources to be ready before continuing.
|
|
317
|
+
*/
|
|
318
|
+
noWait?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* This interface was referenced by `ZarfManifest`'s JSON-Schema definition
|
|
321
|
+
* via the `patternProperty` "^x-".
|
|
322
|
+
*/
|
|
323
|
+
[k: string]: unknown;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* ZarfChart defines a helm chart to be deployed.
|
|
327
|
+
*/
|
|
328
|
+
export interface ZarfChart {
|
|
329
|
+
/**
|
|
330
|
+
* The name of the chart within Zarf; note that this must be unique and does not need to be the same as the name in the chart repo.
|
|
331
|
+
*/
|
|
332
|
+
name: string;
|
|
333
|
+
/**
|
|
334
|
+
* The version of the chart to deploy; for git-based charts this is also the tag of the git repo by default (when not using the '@' syntax for 'repos').
|
|
335
|
+
*/
|
|
336
|
+
version?: string;
|
|
337
|
+
/**
|
|
338
|
+
* The URL of the OCI registry, chart repository, or git repo where the helm chart is stored.
|
|
339
|
+
*/
|
|
340
|
+
url?: string;
|
|
341
|
+
/**
|
|
342
|
+
* The name of a chart within a Helm repository (defaults to the Zarf name of the chart).
|
|
343
|
+
*/
|
|
344
|
+
repoName?: string;
|
|
345
|
+
/**
|
|
346
|
+
* (git repo only) The sub directory to the chart within a git repo.
|
|
347
|
+
*/
|
|
348
|
+
gitPath?: string;
|
|
349
|
+
/**
|
|
350
|
+
* The path to a local chart's folder or .tgz archive.
|
|
351
|
+
*/
|
|
352
|
+
localPath?: string;
|
|
353
|
+
/**
|
|
354
|
+
* The namespace to deploy the chart to.
|
|
355
|
+
*/
|
|
356
|
+
namespace?: string;
|
|
357
|
+
/**
|
|
358
|
+
* The name of the Helm release to create (defaults to the Zarf name of the chart).
|
|
359
|
+
*/
|
|
360
|
+
releaseName?: string;
|
|
361
|
+
/**
|
|
362
|
+
* Whether to not wait for chart resources to be ready before continuing.
|
|
363
|
+
*/
|
|
364
|
+
noWait?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* List of local values file paths or remote URLs to include in the package; these will be merged together when deployed.
|
|
367
|
+
*/
|
|
368
|
+
valuesFiles?: string[];
|
|
369
|
+
/**
|
|
370
|
+
* [alpha] List of variables to set in the Helm chart.
|
|
371
|
+
*/
|
|
372
|
+
variables?: ZarfChartVariable[];
|
|
373
|
+
/**
|
|
374
|
+
* Whether or not to validate the values.yaml schema, defaults to true. Necessary in the air-gap when the JSON Schema references resources on the internet.
|
|
375
|
+
*/
|
|
376
|
+
schemaValidation?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* This interface was referenced by `ZarfChart`'s JSON-Schema definition
|
|
379
|
+
* via the `patternProperty` "^x-".
|
|
380
|
+
*/
|
|
381
|
+
[k: string]: unknown;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* ZarfChartVariable represents a variable that can be set for a Helm chart overrides.
|
|
385
|
+
*/
|
|
386
|
+
export interface ZarfChartVariable {
|
|
387
|
+
/**
|
|
388
|
+
* The name of the variable.
|
|
389
|
+
*/
|
|
390
|
+
name: string;
|
|
391
|
+
/**
|
|
392
|
+
* A brief description of what the variable controls.
|
|
393
|
+
*/
|
|
394
|
+
description: string;
|
|
395
|
+
/**
|
|
396
|
+
* The path within the Helm chart values where this variable applies.
|
|
397
|
+
*/
|
|
398
|
+
path: string;
|
|
399
|
+
/**
|
|
400
|
+
* This interface was referenced by `ZarfChartVariable`'s JSON-Schema definition
|
|
401
|
+
* via the `patternProperty` "^x-".
|
|
402
|
+
*/
|
|
403
|
+
[k: string]: unknown;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* ZarfDataInjection is a data-injection definition.
|
|
407
|
+
*/
|
|
408
|
+
export interface ZarfDataInjection {
|
|
409
|
+
/**
|
|
410
|
+
* Either a path to a local folder/file or a remote URL of a file to inject into the given target pod + container.
|
|
411
|
+
*/
|
|
412
|
+
source: string;
|
|
413
|
+
target: ZarfContainerTarget;
|
|
414
|
+
/**
|
|
415
|
+
* Compress the data before transmitting using gzip. Note: this requires support for tar/gzip locally and in the target image.
|
|
416
|
+
*/
|
|
417
|
+
compress?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* This interface was referenced by `ZarfDataInjection`'s JSON-Schema definition
|
|
420
|
+
* via the `patternProperty` "^x-".
|
|
421
|
+
*/
|
|
422
|
+
[k: string]: unknown;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* The target pod + container to inject the data into.
|
|
426
|
+
*/
|
|
427
|
+
export interface ZarfContainerTarget {
|
|
428
|
+
/**
|
|
429
|
+
* The namespace to target for data injection.
|
|
430
|
+
*/
|
|
431
|
+
namespace: string;
|
|
432
|
+
/**
|
|
433
|
+
* The K8s selector to target for data injection.
|
|
434
|
+
*/
|
|
435
|
+
selector: string;
|
|
436
|
+
/**
|
|
437
|
+
* The container name to target for data injection.
|
|
438
|
+
*/
|
|
439
|
+
container: string;
|
|
440
|
+
/**
|
|
441
|
+
* The path within the container to copy the data into.
|
|
442
|
+
*/
|
|
443
|
+
path: string;
|
|
444
|
+
/**
|
|
445
|
+
* This interface was referenced by `ZarfContainerTarget`'s JSON-Schema definition
|
|
446
|
+
* via the `patternProperty` "^x-".
|
|
447
|
+
*/
|
|
448
|
+
[k: string]: unknown;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* ZarfFile defines a file to deploy.
|
|
452
|
+
*/
|
|
453
|
+
export interface ZarfFile {
|
|
454
|
+
/**
|
|
455
|
+
* Local folder or file path or remote URL to pull into the package.
|
|
456
|
+
*/
|
|
457
|
+
source: string;
|
|
458
|
+
/**
|
|
459
|
+
* (files only) Optional SHA256 checksum of the file.
|
|
460
|
+
*/
|
|
461
|
+
shasum?: string;
|
|
462
|
+
/**
|
|
463
|
+
* The absolute or relative path where the file or folder should be copied to during package deploy.
|
|
464
|
+
*/
|
|
465
|
+
target: string;
|
|
466
|
+
/**
|
|
467
|
+
* (files only) Determines if the file should be made executable during package deploy.
|
|
468
|
+
*/
|
|
469
|
+
executable?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* List of symlinks to create during package deploy.
|
|
472
|
+
*/
|
|
473
|
+
symlinks?: string[];
|
|
474
|
+
/**
|
|
475
|
+
* Local folder or file to be extracted from a 'source' archive.
|
|
476
|
+
*/
|
|
477
|
+
extractPath?: string;
|
|
478
|
+
/**
|
|
479
|
+
* This interface was referenced by `ZarfFile`'s JSON-Schema definition
|
|
480
|
+
* via the `patternProperty` "^x-".
|
|
481
|
+
*/
|
|
482
|
+
[k: string]: unknown;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* [Deprecated] (replaced by actions) Custom commands to run before or after package deployment. This will be removed in Zarf v1.0.0.
|
|
486
|
+
*/
|
|
487
|
+
export interface DeprecatedZarfComponentScripts {
|
|
488
|
+
/**
|
|
489
|
+
* Show the output of the script during package deployment.
|
|
490
|
+
*/
|
|
491
|
+
showOutput?: boolean;
|
|
492
|
+
/**
|
|
493
|
+
* Timeout in seconds for the script.
|
|
494
|
+
*/
|
|
495
|
+
timeoutSeconds?: number;
|
|
496
|
+
/**
|
|
497
|
+
* Retry the script if it fails.
|
|
498
|
+
*/
|
|
499
|
+
retry?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Scripts to run before the component is added during package create.
|
|
502
|
+
*/
|
|
503
|
+
prepare?: string[];
|
|
504
|
+
/**
|
|
505
|
+
* Scripts to run before the component is deployed.
|
|
506
|
+
*/
|
|
507
|
+
before?: string[];
|
|
508
|
+
/**
|
|
509
|
+
* Scripts to run after the component successfully deploys.
|
|
510
|
+
*/
|
|
511
|
+
after?: string[];
|
|
512
|
+
/**
|
|
513
|
+
* This interface was referenced by `DeprecatedZarfComponentScripts`'s JSON-Schema definition
|
|
514
|
+
* via the `patternProperty` "^x-".
|
|
515
|
+
*/
|
|
516
|
+
[k: string]: unknown;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Custom commands to run at various stages of a package lifecycle.
|
|
520
|
+
*/
|
|
521
|
+
export interface ZarfComponentActions {
|
|
522
|
+
onCreate?: ZarfComponentActionSet;
|
|
523
|
+
onDeploy?: ZarfComponentActionSet1;
|
|
524
|
+
onRemove?: ZarfComponentActionSet2;
|
|
525
|
+
/**
|
|
526
|
+
* This interface was referenced by `ZarfComponentActions`'s JSON-Schema definition
|
|
527
|
+
* via the `patternProperty` "^x-".
|
|
528
|
+
*/
|
|
529
|
+
[k: string]: unknown;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Actions to run during package creation.
|
|
533
|
+
*/
|
|
534
|
+
export interface ZarfComponentActionSet {
|
|
535
|
+
defaults?: ZarfComponentActionDefaults;
|
|
536
|
+
/**
|
|
537
|
+
* Actions to run at the start of an operation.
|
|
538
|
+
*/
|
|
539
|
+
before?: ZarfComponentAction[];
|
|
540
|
+
/**
|
|
541
|
+
* Actions to run at the end of an operation.
|
|
542
|
+
*/
|
|
543
|
+
after?: ZarfComponentAction[];
|
|
544
|
+
/**
|
|
545
|
+
* Actions to run if all operations succeed.
|
|
546
|
+
*/
|
|
547
|
+
onSuccess?: ZarfComponentAction[];
|
|
548
|
+
/**
|
|
549
|
+
* Actions to run if all operations fail.
|
|
550
|
+
*/
|
|
551
|
+
onFailure?: ZarfComponentAction[];
|
|
552
|
+
/**
|
|
553
|
+
* This interface was referenced by `ZarfComponentActionSet`'s JSON-Schema definition
|
|
554
|
+
* via the `patternProperty` "^x-".
|
|
555
|
+
*
|
|
556
|
+
* This interface was referenced by `ZarfComponentActionSet1`'s JSON-Schema definition
|
|
557
|
+
* via the `patternProperty` "^x-".
|
|
558
|
+
*
|
|
559
|
+
* This interface was referenced by `ZarfComponentActionSet2`'s JSON-Schema definition
|
|
560
|
+
* via the `patternProperty` "^x-".
|
|
561
|
+
*/
|
|
562
|
+
[k: string]: unknown;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Default configuration for all actions in this set.
|
|
566
|
+
*/
|
|
567
|
+
export interface ZarfComponentActionDefaults {
|
|
568
|
+
/**
|
|
569
|
+
* Hide the output of commands during execution (default false).
|
|
570
|
+
*/
|
|
571
|
+
mute?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Default timeout in seconds for commands (default to 0, no timeout).
|
|
574
|
+
*/
|
|
575
|
+
maxTotalSeconds?: number;
|
|
576
|
+
/**
|
|
577
|
+
* Retry commands given number of times if they fail (default 0).
|
|
578
|
+
*/
|
|
579
|
+
maxRetries?: number;
|
|
580
|
+
/**
|
|
581
|
+
* Working directory for commands (default CWD).
|
|
582
|
+
*/
|
|
583
|
+
dir?: string;
|
|
584
|
+
/**
|
|
585
|
+
* Additional environment variables for commands.
|
|
586
|
+
*/
|
|
587
|
+
env?: string[];
|
|
588
|
+
shell?: Shell;
|
|
589
|
+
/**
|
|
590
|
+
* This interface was referenced by `ZarfComponentActionDefaults`'s JSON-Schema definition
|
|
591
|
+
* via the `patternProperty` "^x-".
|
|
592
|
+
*/
|
|
593
|
+
[k: string]: unknown;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems.
|
|
597
|
+
*/
|
|
598
|
+
export interface Shell {
|
|
599
|
+
/**
|
|
600
|
+
* (default 'powershell') Indicates a preference for the shell to use on Windows systems (note that choosing 'cmd' will turn off migrations like touch -> New-Item)
|
|
601
|
+
*/
|
|
602
|
+
windows?: string;
|
|
603
|
+
/**
|
|
604
|
+
* (default 'sh') Indicates a preference for the shell to use on Linux systems
|
|
605
|
+
*/
|
|
606
|
+
linux?: string;
|
|
607
|
+
/**
|
|
608
|
+
* (default 'sh') Indicates a preference for the shell to use on macOS systems
|
|
609
|
+
*/
|
|
610
|
+
darwin?: string;
|
|
611
|
+
/**
|
|
612
|
+
* This interface was referenced by `Shell`'s JSON-Schema definition
|
|
613
|
+
* via the `patternProperty` "^x-".
|
|
614
|
+
*
|
|
615
|
+
* This interface was referenced by `Shell1`'s JSON-Schema definition
|
|
616
|
+
* via the `patternProperty` "^x-".
|
|
617
|
+
*/
|
|
618
|
+
[k: string]: unknown;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* ZarfComponentAction represents a single action to run during a zarf package operation.
|
|
622
|
+
*/
|
|
623
|
+
export interface ZarfComponentAction {
|
|
624
|
+
/**
|
|
625
|
+
* Hide the output of the command during package deployment (default false).
|
|
626
|
+
*/
|
|
627
|
+
mute?: boolean;
|
|
628
|
+
/**
|
|
629
|
+
* Timeout in seconds for the command (default to 0, no timeout for cmd actions and 300, 5 minutes for wait actions).
|
|
630
|
+
*/
|
|
631
|
+
maxTotalSeconds?: number;
|
|
632
|
+
/**
|
|
633
|
+
* Retry the command if it fails up to given number of times (default 0).
|
|
634
|
+
*/
|
|
635
|
+
maxRetries?: number;
|
|
636
|
+
/**
|
|
637
|
+
* The working directory to run the command in (default is CWD).
|
|
638
|
+
*/
|
|
639
|
+
dir?: string;
|
|
640
|
+
/**
|
|
641
|
+
* Additional environment variables to set for the command.
|
|
642
|
+
*/
|
|
643
|
+
env?: string[];
|
|
644
|
+
/**
|
|
645
|
+
* The command to run. Must specify either cmd or wait for the action to do anything.
|
|
646
|
+
*/
|
|
647
|
+
cmd?: string;
|
|
648
|
+
shell?: Shell1;
|
|
649
|
+
/**
|
|
650
|
+
* [Deprecated] (replaced by setVariables) (onDeploy/cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. This will be removed in Zarf v1.0.0.
|
|
651
|
+
*/
|
|
652
|
+
setVariable?: string;
|
|
653
|
+
/**
|
|
654
|
+
* (onDeploy/cmd only) An array of variables to update with the output of the command. These variables will be available to all remaining actions and components in the package.
|
|
655
|
+
*/
|
|
656
|
+
setVariables?: Variable[];
|
|
657
|
+
/**
|
|
658
|
+
* Description of the action to be displayed during package execution instead of the command.
|
|
659
|
+
*/
|
|
660
|
+
description?: string;
|
|
661
|
+
wait?: ZarfComponentActionWait;
|
|
662
|
+
/**
|
|
663
|
+
* This interface was referenced by `ZarfComponentAction`'s JSON-Schema definition
|
|
664
|
+
* via the `patternProperty` "^x-".
|
|
665
|
+
*/
|
|
666
|
+
[k: string]: unknown;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems.
|
|
670
|
+
*/
|
|
671
|
+
export interface Shell1 {
|
|
672
|
+
/**
|
|
673
|
+
* (default 'powershell') Indicates a preference for the shell to use on Windows systems (note that choosing 'cmd' will turn off migrations like touch -> New-Item)
|
|
674
|
+
*/
|
|
675
|
+
windows?: string;
|
|
676
|
+
/**
|
|
677
|
+
* (default 'sh') Indicates a preference for the shell to use on Linux systems
|
|
678
|
+
*/
|
|
679
|
+
linux?: string;
|
|
680
|
+
/**
|
|
681
|
+
* (default 'sh') Indicates a preference for the shell to use on macOS systems
|
|
682
|
+
*/
|
|
683
|
+
darwin?: string;
|
|
684
|
+
/**
|
|
685
|
+
* This interface was referenced by `Shell`'s JSON-Schema definition
|
|
686
|
+
* via the `patternProperty` "^x-".
|
|
687
|
+
*
|
|
688
|
+
* This interface was referenced by `Shell1`'s JSON-Schema definition
|
|
689
|
+
* via the `patternProperty` "^x-".
|
|
690
|
+
*/
|
|
691
|
+
[k: string]: unknown;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Variable represents a variable that has a value set programmatically
|
|
695
|
+
*/
|
|
696
|
+
export interface Variable {
|
|
697
|
+
/**
|
|
698
|
+
* The name to be used for the variable
|
|
699
|
+
*/
|
|
700
|
+
name: string;
|
|
701
|
+
/**
|
|
702
|
+
* Whether to mark this variable as sensitive to not print it in the log
|
|
703
|
+
*/
|
|
704
|
+
sensitive?: boolean;
|
|
705
|
+
/**
|
|
706
|
+
* Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_VAR_.
|
|
707
|
+
*/
|
|
708
|
+
autoIndent?: boolean;
|
|
709
|
+
/**
|
|
710
|
+
* An optional regex pattern that a variable value must match before a package deployment can continue.
|
|
711
|
+
*/
|
|
712
|
+
pattern?: string;
|
|
713
|
+
/**
|
|
714
|
+
* Changes the handling of a variable to load contents differently (i.e. from a file rather than as a raw variable - templated files should be kept below 1 MiB)
|
|
715
|
+
*/
|
|
716
|
+
type?: 'raw' | 'file';
|
|
717
|
+
/**
|
|
718
|
+
* This interface was referenced by `Variable`'s JSON-Schema definition
|
|
719
|
+
* via the `patternProperty` "^x-".
|
|
720
|
+
*/
|
|
721
|
+
[k: string]: unknown;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info.
|
|
725
|
+
*/
|
|
726
|
+
export interface ZarfComponentActionWait {
|
|
727
|
+
cluster?: ZarfComponentActionWaitCluster;
|
|
728
|
+
network?: ZarfComponentActionWaitNetwork;
|
|
729
|
+
/**
|
|
730
|
+
* This interface was referenced by `ZarfComponentActionWait`'s JSON-Schema definition
|
|
731
|
+
* via the `patternProperty` "^x-".
|
|
732
|
+
*/
|
|
733
|
+
[k: string]: unknown;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified.
|
|
737
|
+
*/
|
|
738
|
+
export interface ZarfComponentActionWaitCluster {
|
|
739
|
+
/**
|
|
740
|
+
* The kind of resource to wait for.
|
|
741
|
+
*/
|
|
742
|
+
kind: string;
|
|
743
|
+
/**
|
|
744
|
+
* The name of the resource or selector to wait for.
|
|
745
|
+
*/
|
|
746
|
+
name: string;
|
|
747
|
+
/**
|
|
748
|
+
* The namespace of the resource to wait for.
|
|
749
|
+
*/
|
|
750
|
+
namespace?: string;
|
|
751
|
+
/**
|
|
752
|
+
* The condition or jsonpath state to wait for; defaults to exist, a special condition that will wait for the resource to exist.
|
|
753
|
+
*/
|
|
754
|
+
condition?: string;
|
|
755
|
+
/**
|
|
756
|
+
* This interface was referenced by `ZarfComponentActionWaitCluster`'s JSON-Schema definition
|
|
757
|
+
* via the `patternProperty` "^x-".
|
|
758
|
+
*/
|
|
759
|
+
[k: string]: unknown;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified.
|
|
763
|
+
*/
|
|
764
|
+
export interface ZarfComponentActionWaitNetwork {
|
|
765
|
+
/**
|
|
766
|
+
* The protocol to wait for.
|
|
767
|
+
*/
|
|
768
|
+
protocol: 'tcp' | 'http' | 'https';
|
|
769
|
+
/**
|
|
770
|
+
* The address to wait for.
|
|
771
|
+
*/
|
|
772
|
+
address: string;
|
|
773
|
+
/**
|
|
774
|
+
* The HTTP status code to wait for if using http or https.
|
|
775
|
+
*/
|
|
776
|
+
code?: number;
|
|
777
|
+
/**
|
|
778
|
+
* This interface was referenced by `ZarfComponentActionWaitNetwork`'s JSON-Schema definition
|
|
779
|
+
* via the `patternProperty` "^x-".
|
|
780
|
+
*/
|
|
781
|
+
[k: string]: unknown;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Actions to run during package deployment.
|
|
785
|
+
*/
|
|
786
|
+
export interface ZarfComponentActionSet1 {
|
|
787
|
+
defaults?: ZarfComponentActionDefaults;
|
|
788
|
+
/**
|
|
789
|
+
* Actions to run at the start of an operation.
|
|
790
|
+
*/
|
|
791
|
+
before?: ZarfComponentAction[];
|
|
792
|
+
/**
|
|
793
|
+
* Actions to run at the end of an operation.
|
|
794
|
+
*/
|
|
795
|
+
after?: ZarfComponentAction[];
|
|
796
|
+
/**
|
|
797
|
+
* Actions to run if all operations succeed.
|
|
798
|
+
*/
|
|
799
|
+
onSuccess?: ZarfComponentAction[];
|
|
800
|
+
/**
|
|
801
|
+
* Actions to run if all operations fail.
|
|
802
|
+
*/
|
|
803
|
+
onFailure?: ZarfComponentAction[];
|
|
804
|
+
/**
|
|
805
|
+
* This interface was referenced by `ZarfComponentActionSet`'s JSON-Schema definition
|
|
806
|
+
* via the `patternProperty` "^x-".
|
|
807
|
+
*
|
|
808
|
+
* This interface was referenced by `ZarfComponentActionSet1`'s JSON-Schema definition
|
|
809
|
+
* via the `patternProperty` "^x-".
|
|
810
|
+
*
|
|
811
|
+
* This interface was referenced by `ZarfComponentActionSet2`'s JSON-Schema definition
|
|
812
|
+
* via the `patternProperty` "^x-".
|
|
813
|
+
*/
|
|
814
|
+
[k: string]: unknown;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Actions to run during package removal.
|
|
818
|
+
*/
|
|
819
|
+
export interface ZarfComponentActionSet2 {
|
|
820
|
+
defaults?: ZarfComponentActionDefaults;
|
|
821
|
+
/**
|
|
822
|
+
* Actions to run at the start of an operation.
|
|
823
|
+
*/
|
|
824
|
+
before?: ZarfComponentAction[];
|
|
825
|
+
/**
|
|
826
|
+
* Actions to run at the end of an operation.
|
|
827
|
+
*/
|
|
828
|
+
after?: ZarfComponentAction[];
|
|
829
|
+
/**
|
|
830
|
+
* Actions to run if all operations succeed.
|
|
831
|
+
*/
|
|
832
|
+
onSuccess?: ZarfComponentAction[];
|
|
833
|
+
/**
|
|
834
|
+
* Actions to run if all operations fail.
|
|
835
|
+
*/
|
|
836
|
+
onFailure?: ZarfComponentAction[];
|
|
837
|
+
/**
|
|
838
|
+
* This interface was referenced by `ZarfComponentActionSet`'s JSON-Schema definition
|
|
839
|
+
* via the `patternProperty` "^x-".
|
|
840
|
+
*
|
|
841
|
+
* This interface was referenced by `ZarfComponentActionSet1`'s JSON-Schema definition
|
|
842
|
+
* via the `patternProperty` "^x-".
|
|
843
|
+
*
|
|
844
|
+
* This interface was referenced by `ZarfComponentActionSet2`'s JSON-Schema definition
|
|
845
|
+
* via the `patternProperty` "^x-".
|
|
846
|
+
*/
|
|
847
|
+
[k: string]: unknown;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* NamespacedObjectKindReference is a reference to a specific resource in a namespace using its kind and API version.
|
|
851
|
+
*/
|
|
852
|
+
export interface NamespacedObjectKindReference {
|
|
853
|
+
/**
|
|
854
|
+
* API Version of the resource
|
|
855
|
+
*/
|
|
856
|
+
apiVersion: string;
|
|
857
|
+
/**
|
|
858
|
+
* Kind of the resource
|
|
859
|
+
*/
|
|
860
|
+
kind: string;
|
|
861
|
+
/**
|
|
862
|
+
* Namespace of the resource
|
|
863
|
+
*/
|
|
864
|
+
namespace: string;
|
|
865
|
+
/**
|
|
866
|
+
* Name of the resource
|
|
867
|
+
*/
|
|
868
|
+
name: string;
|
|
869
|
+
/**
|
|
870
|
+
* This interface was referenced by `NamespacedObjectKindReference`'s JSON-Schema definition
|
|
871
|
+
* via the `patternProperty` "^x-".
|
|
872
|
+
*/
|
|
873
|
+
[k: string]: unknown;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Constant are constants that can be used to dynamically template K8s resources or run in actions.
|
|
877
|
+
*/
|
|
878
|
+
export interface Constant {
|
|
879
|
+
/**
|
|
880
|
+
* The name to be used for the constant
|
|
881
|
+
*/
|
|
882
|
+
name: string;
|
|
883
|
+
/**
|
|
884
|
+
* The value to set for the constant during deploy
|
|
885
|
+
*/
|
|
886
|
+
value: string;
|
|
887
|
+
/**
|
|
888
|
+
* A description of the constant to explain its purpose on package create or deploy confirmation prompts
|
|
889
|
+
*/
|
|
890
|
+
description?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_CONST_.
|
|
893
|
+
*/
|
|
894
|
+
autoIndent?: boolean;
|
|
895
|
+
/**
|
|
896
|
+
* An optional regex pattern that a constant value must match before a package can be created.
|
|
897
|
+
*/
|
|
898
|
+
pattern?: string;
|
|
899
|
+
/**
|
|
900
|
+
* This interface was referenced by `Constant`'s JSON-Schema definition
|
|
901
|
+
* via the `patternProperty` "^x-".
|
|
902
|
+
*/
|
|
903
|
+
[k: string]: unknown;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* InteractiveVariable is a variable that can be used to prompt a user for more information
|
|
907
|
+
*/
|
|
908
|
+
export interface InteractiveVariable {
|
|
909
|
+
/**
|
|
910
|
+
* The name to be used for the variable
|
|
911
|
+
*/
|
|
912
|
+
name: string;
|
|
913
|
+
/**
|
|
914
|
+
* Whether to mark this variable as sensitive to not print it in the log
|
|
915
|
+
*/
|
|
916
|
+
sensitive?: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_VAR_.
|
|
919
|
+
*/
|
|
920
|
+
autoIndent?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* An optional regex pattern that a variable value must match before a package deployment can continue.
|
|
923
|
+
*/
|
|
924
|
+
pattern?: string;
|
|
925
|
+
/**
|
|
926
|
+
* Changes the handling of a variable to load contents differently (i.e. from a file rather than as a raw variable - templated files should be kept below 1 MiB)
|
|
927
|
+
*/
|
|
928
|
+
type?: 'raw' | 'file';
|
|
929
|
+
/**
|
|
930
|
+
* A description of the variable to be used when prompting the user a value
|
|
931
|
+
*/
|
|
932
|
+
description?: string;
|
|
933
|
+
/**
|
|
934
|
+
* The default value to use for the variable
|
|
935
|
+
*/
|
|
936
|
+
default?: string;
|
|
937
|
+
/**
|
|
938
|
+
* Whether to prompt the user for input for this variable
|
|
939
|
+
*/
|
|
940
|
+
prompt?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* This interface was referenced by `InteractiveVariable`'s JSON-Schema definition
|
|
943
|
+
* via the `patternProperty` "^x-".
|
|
944
|
+
*/
|
|
945
|
+
[k: string]: unknown;
|
|
946
|
+
}
|