k8ts 0.4.22 → 0.5.0

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.
Files changed (81) hide show
  1. package/dist/.imports.tsbuildinfo +1 -1
  2. package/dist/_imports/helm.toolkit.fluxcd.io.d.ts +4894 -0
  3. package/dist/_imports/helm.toolkit.fluxcd.io.d.ts.map +1 -0
  4. package/dist/_imports/helm.toolkit.fluxcd.io.js +2430 -0
  5. package/dist/_imports/helm.toolkit.fluxcd.io.js.map +1 -0
  6. package/dist/_imports/kustomize.toolkit.fluxcd.io.d.ts +2367 -0
  7. package/dist/_imports/kustomize.toolkit.fluxcd.io.d.ts.map +1 -0
  8. package/dist/_imports/kustomize.toolkit.fluxcd.io.js +1285 -0
  9. package/dist/_imports/kustomize.toolkit.fluxcd.io.js.map +1 -0
  10. package/dist/_imports/notification.toolkit.fluxcd.io.d.ts +2005 -0
  11. package/dist/_imports/notification.toolkit.fluxcd.io.d.ts.map +1 -0
  12. package/dist/_imports/notification.toolkit.fluxcd.io.js +1575 -0
  13. package/dist/_imports/notification.toolkit.fluxcd.io.js.map +1 -0
  14. package/dist/_imports/source.toolkit.fluxcd.io.d.ts +4158 -0
  15. package/dist/_imports/source.toolkit.fluxcd.io.d.ts.map +1 -0
  16. package/dist/_imports/source.toolkit.fluxcd.io.js +2739 -0
  17. package/dist/_imports/source.toolkit.fluxcd.io.js.map +1 -0
  18. package/dist/_type/prefix$.d.ts +4 -0
  19. package/dist/_type/prefix$.d.ts.map +1 -0
  20. package/dist/_type/prefix$.js +3 -0
  21. package/dist/_type/prefix$.js.map +1 -0
  22. package/dist/file/factory.d.ts +1 -1
  23. package/dist/file/factory.d.ts.map +1 -1
  24. package/dist/file/factory.js +3 -3
  25. package/dist/file/factory.js.map +1 -1
  26. package/dist/resources/deployment/deployment.d.ts +2 -2
  27. package/dist/resources/deployment/deployment.d.ts.map +1 -1
  28. package/dist/resources/deployment/deployment.js +3 -3
  29. package/dist/resources/deployment/deployment.js.map +1 -1
  30. package/dist/resources/http-route/http-route.d.ts +3 -3
  31. package/dist/resources/http-route/http-route.d.ts.map +1 -1
  32. package/dist/resources/http-route/http-route.js +5 -5
  33. package/dist/resources/http-route/http-route.js.map +1 -1
  34. package/dist/resources/persistent/claim/pvc.d.ts +5 -4
  35. package/dist/resources/persistent/claim/pvc.d.ts.map +1 -1
  36. package/dist/resources/persistent/claim/pvc.js +6 -6
  37. package/dist/resources/persistent/claim/pvc.js.map +1 -1
  38. package/dist/resources/persistent/volume/pv.d.ts +4 -4
  39. package/dist/resources/persistent/volume/pv.d.ts.map +1 -1
  40. package/dist/resources/persistent/volume/pv.js +6 -6
  41. package/dist/resources/persistent/volume/pv.js.map +1 -1
  42. package/dist/resources/pod/container/container.d.ts +7 -5
  43. package/dist/resources/pod/container/container.d.ts.map +1 -1
  44. package/dist/resources/pod/container/container.js +11 -10
  45. package/dist/resources/pod/container/container.js.map +1 -1
  46. package/dist/resources/pod/pod-template.d.ts +1 -5
  47. package/dist/resources/pod/pod-template.d.ts.map +1 -1
  48. package/dist/resources/pod/pod-template.js +2 -2
  49. package/dist/resources/pod/pod-template.js.map +1 -1
  50. package/dist/resources/pod/volume/devices.d.ts +1 -1
  51. package/dist/resources/pod/volume/devices.d.ts.map +1 -1
  52. package/dist/resources/pod/volume/devices.js +2 -2
  53. package/dist/resources/pod/volume/devices.js.map +1 -1
  54. package/dist/resources/pod/volume/volumes.d.ts +3 -3
  55. package/dist/resources/pod/volume/volumes.d.ts.map +1 -1
  56. package/dist/resources/pod/volume/volumes.js +6 -6
  57. package/dist/resources/pod/volume/volumes.js.map +1 -1
  58. package/dist/resources/service/service.d.ts +3 -3
  59. package/dist/resources/service/service.d.ts.map +1 -1
  60. package/dist/resources/service/service.js +6 -6
  61. package/dist/resources/service/service.js.map +1 -1
  62. package/dist/resources/utils/adapters.js +1 -1
  63. package/dist/resources/utils/adapters.js.map +1 -1
  64. package/dist/src.tsbuildinfo +1 -1
  65. package/package.json +3 -3
  66. package/src/_imports/helm.toolkit.fluxcd.io.ts +6748 -0
  67. package/src/_imports/kustomize.toolkit.fluxcd.io.ts +3369 -0
  68. package/src/_imports/notification.toolkit.fluxcd.io.ts +2848 -0
  69. package/src/_imports/source.toolkit.fluxcd.io.ts +6054 -0
  70. package/src/_type/prefix$.ts +3 -0
  71. package/src/file/factory.ts +4 -4
  72. package/src/resources/deployment/deployment.ts +6 -6
  73. package/src/resources/http-route/http-route.ts +8 -8
  74. package/src/resources/persistent/claim/pvc.ts +11 -10
  75. package/src/resources/persistent/volume/pv.ts +10 -10
  76. package/src/resources/pod/container/container.ts +18 -15
  77. package/src/resources/pod/pod-template.ts +5 -8
  78. package/src/resources/pod/volume/devices.ts +3 -3
  79. package/src/resources/pod/volume/volumes.ts +9 -9
  80. package/src/resources/service/service.ts +9 -9
  81. package/src/resources/utils/adapters.ts +1 -1
@@ -0,0 +1,3369 @@
1
+ // generated by cdk8s
2
+ import { ApiObject, ApiObjectMetadata, GroupVersionKind } from 'cdk8s';
3
+ import { Construct } from 'constructs';
4
+
5
+
6
+ /**
7
+ * Kustomization is the Schema for the kustomizations API.
8
+ *
9
+ * @schema Kustomization
10
+ */
11
+ export class Kustomization extends ApiObject {
12
+ /**
13
+ * Returns the apiVersion and kind for "Kustomization"
14
+ */
15
+ public static readonly GVK: GroupVersionKind = {
16
+ apiVersion: 'kustomize.toolkit.fluxcd.io/v1',
17
+ kind: 'Kustomization',
18
+ }
19
+
20
+ /**
21
+ * Renders a Kubernetes manifest for "Kustomization".
22
+ *
23
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
24
+ *
25
+ * @param props initialization props
26
+ */
27
+ public static manifest(props: KustomizationProps = {}): any {
28
+ return {
29
+ ...Kustomization.GVK,
30
+ ...toJson_KustomizationProps(props),
31
+ };
32
+ }
33
+
34
+ /**
35
+ * Defines a "Kustomization" API object
36
+ * @param scope the scope in which to define this object
37
+ * @param id a scope-local name for the object
38
+ * @param props initialization props
39
+ */
40
+ public constructor(scope: Construct, id: string, props: KustomizationProps = {}) {
41
+ super(scope, id, {
42
+ ...Kustomization.GVK,
43
+ ...props,
44
+ });
45
+ }
46
+
47
+ /**
48
+ * Renders the object to Kubernetes JSON.
49
+ */
50
+ public toJson(): any {
51
+ const resolved = super.toJson();
52
+
53
+ return {
54
+ ...Kustomization.GVK,
55
+ ...toJson_KustomizationProps(resolved),
56
+ };
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Kustomization is the Schema for the kustomizations API.
62
+ *
63
+ * @schema Kustomization
64
+ */
65
+ export interface KustomizationProps {
66
+ /**
67
+ * @schema Kustomization#metadata
68
+ */
69
+ readonly metadata?: ApiObjectMetadata;
70
+
71
+ /**
72
+ * KustomizationSpec defines the configuration to calculate the desired state
73
+ * from a Source using Kustomize.
74
+ *
75
+ * @schema Kustomization#spec
76
+ */
77
+ readonly spec?: KustomizationSpec;
78
+
79
+ }
80
+
81
+ /**
82
+ * Converts an object of type 'KustomizationProps' to JSON representation.
83
+ */
84
+ /* eslint-disable max-len, quote-props */
85
+ export function toJson_KustomizationProps(obj: KustomizationProps | undefined): Record<string, any> | undefined {
86
+ if (obj === undefined) { return undefined; }
87
+ const result = {
88
+ 'metadata': obj.metadata,
89
+ 'spec': toJson_KustomizationSpec(obj.spec),
90
+ };
91
+ // filter undefined values
92
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
93
+ }
94
+ /* eslint-enable max-len, quote-props */
95
+
96
+ /**
97
+ * KustomizationSpec defines the configuration to calculate the desired state
98
+ * from a Source using Kustomize.
99
+ *
100
+ * @schema KustomizationSpec
101
+ */
102
+ export interface KustomizationSpec {
103
+ /**
104
+ * CommonMetadata specifies the common labels and annotations that are
105
+ * applied to all resources. Any existing label or annotation will be
106
+ * overridden if its key matches a common one.
107
+ *
108
+ * @schema KustomizationSpec#commonMetadata
109
+ */
110
+ readonly commonMetadata?: KustomizationSpecCommonMetadata;
111
+
112
+ /**
113
+ * Components specifies relative paths to specifications of other Components.
114
+ *
115
+ * @schema KustomizationSpec#components
116
+ */
117
+ readonly components?: string[];
118
+
119
+ /**
120
+ * Decrypt Kubernetes secrets before applying them on the cluster.
121
+ *
122
+ * @schema KustomizationSpec#decryption
123
+ */
124
+ readonly decryption?: KustomizationSpecDecryption;
125
+
126
+ /**
127
+ * DeletionPolicy can be used to control garbage collection when this
128
+ * Kustomization is deleted. Valid values are ('MirrorPrune', 'Delete',
129
+ * 'Orphan'). 'MirrorPrune' mirrors the Prune field (orphan if false,
130
+ * delete if true). Defaults to 'MirrorPrune'.
131
+ *
132
+ * @default MirrorPrune'.
133
+ * @schema KustomizationSpec#deletionPolicy
134
+ */
135
+ readonly deletionPolicy?: KustomizationSpecDeletionPolicy;
136
+
137
+ /**
138
+ * DependsOn may contain a meta.NamespacedObjectReference slice
139
+ * with references to Kustomization resources that must be ready before this
140
+ * Kustomization can be reconciled.
141
+ *
142
+ * @schema KustomizationSpec#dependsOn
143
+ */
144
+ readonly dependsOn?: KustomizationSpecDependsOn[];
145
+
146
+ /**
147
+ * Force instructs the controller to recreate resources
148
+ * when patching fails due to an immutable field change.
149
+ *
150
+ * @schema KustomizationSpec#force
151
+ */
152
+ readonly force?: boolean;
153
+
154
+ /**
155
+ * HealthCheckExprs is a list of healthcheck expressions for evaluating the
156
+ * health of custom resources using Common Expression Language (CEL).
157
+ * The expressions are evaluated only when Wait or HealthChecks are specified.
158
+ *
159
+ * @schema KustomizationSpec#healthCheckExprs
160
+ */
161
+ readonly healthCheckExprs?: KustomizationSpecHealthCheckExprs[];
162
+
163
+ /**
164
+ * A list of resources to be included in the health assessment.
165
+ *
166
+ * @schema KustomizationSpec#healthChecks
167
+ */
168
+ readonly healthChecks?: KustomizationSpecHealthChecks[];
169
+
170
+ /**
171
+ * Images is a list of (image name, new name, new tag or digest)
172
+ * for changing image names, tags or digests. This can also be achieved with a
173
+ * patch, but this operator is simpler to specify.
174
+ *
175
+ * @schema KustomizationSpec#images
176
+ */
177
+ readonly images?: KustomizationSpecImages[];
178
+
179
+ /**
180
+ * The interval at which to reconcile the Kustomization.
181
+ * This interval is approximate and may be subject to jitter to ensure
182
+ * efficient use of resources.
183
+ *
184
+ * @schema KustomizationSpec#interval
185
+ */
186
+ readonly interval: string;
187
+
188
+ /**
189
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
190
+ * When used in combination with KustomizationSpec.ServiceAccountName,
191
+ * forces the controller to act on behalf of that Service Account at the
192
+ * target cluster.
193
+ * If the --default-service-account flag is set, its value will be used as
194
+ * a controller level fallback for when KustomizationSpec.ServiceAccountName
195
+ * is empty.
196
+ *
197
+ * @schema KustomizationSpec#kubeConfig
198
+ */
199
+ readonly kubeConfig?: KustomizationSpecKubeConfig;
200
+
201
+ /**
202
+ * NamePrefix will prefix the names of all managed resources.
203
+ *
204
+ * @schema KustomizationSpec#namePrefix
205
+ */
206
+ readonly namePrefix?: string;
207
+
208
+ /**
209
+ * NameSuffix will suffix the names of all managed resources.
210
+ *
211
+ * @schema KustomizationSpec#nameSuffix
212
+ */
213
+ readonly nameSuffix?: string;
214
+
215
+ /**
216
+ * Strategic merge and JSON patches, defined as inline YAML objects,
217
+ * capable of targeting objects based on kind, label and annotation selectors.
218
+ *
219
+ * @schema KustomizationSpec#patches
220
+ */
221
+ readonly patches?: KustomizationSpecPatches[];
222
+
223
+ /**
224
+ * Path to the directory containing the kustomization.yaml file, or the
225
+ * set of plain YAMLs a kustomization.yaml should be generated for.
226
+ * Defaults to 'None', which translates to the root path of the SourceRef.
227
+ *
228
+ * @default None', which translates to the root path of the SourceRef.
229
+ * @schema KustomizationSpec#path
230
+ */
231
+ readonly path?: string;
232
+
233
+ /**
234
+ * PostBuild describes which actions to perform on the YAML manifest
235
+ * generated by building the kustomize overlay.
236
+ *
237
+ * @schema KustomizationSpec#postBuild
238
+ */
239
+ readonly postBuild?: KustomizationSpecPostBuild;
240
+
241
+ /**
242
+ * Prune enables garbage collection.
243
+ *
244
+ * @schema KustomizationSpec#prune
245
+ */
246
+ readonly prune: boolean;
247
+
248
+ /**
249
+ * The interval at which to retry a previously failed reconciliation.
250
+ * When not specified, the controller uses the KustomizationSpec.Interval
251
+ * value to retry failures.
252
+ *
253
+ * @schema KustomizationSpec#retryInterval
254
+ */
255
+ readonly retryInterval?: string;
256
+
257
+ /**
258
+ * The name of the Kubernetes service account to impersonate
259
+ * when reconciling this Kustomization.
260
+ *
261
+ * @schema KustomizationSpec#serviceAccountName
262
+ */
263
+ readonly serviceAccountName?: string;
264
+
265
+ /**
266
+ * Reference of the source where the kustomization file is.
267
+ *
268
+ * @schema KustomizationSpec#sourceRef
269
+ */
270
+ readonly sourceRef: KustomizationSpecSourceRef;
271
+
272
+ /**
273
+ * This flag tells the controller to suspend subsequent kustomize executions,
274
+ * it does not apply to already started executions. Defaults to false.
275
+ *
276
+ * @default false.
277
+ * @schema KustomizationSpec#suspend
278
+ */
279
+ readonly suspend?: boolean;
280
+
281
+ /**
282
+ * TargetNamespace sets or overrides the namespace in the
283
+ * kustomization.yaml file.
284
+ *
285
+ * @schema KustomizationSpec#targetNamespace
286
+ */
287
+ readonly targetNamespace?: string;
288
+
289
+ /**
290
+ * Timeout for validation, apply and health checking operations.
291
+ * Defaults to 'Interval' duration.
292
+ *
293
+ * @default Interval' duration.
294
+ * @schema KustomizationSpec#timeout
295
+ */
296
+ readonly timeout?: string;
297
+
298
+ /**
299
+ * Wait instructs the controller to check the health of all the reconciled
300
+ * resources. When enabled, the HealthChecks are ignored. Defaults to false.
301
+ *
302
+ * @default false.
303
+ * @schema KustomizationSpec#wait
304
+ */
305
+ readonly wait?: boolean;
306
+
307
+ }
308
+
309
+ /**
310
+ * Converts an object of type 'KustomizationSpec' to JSON representation.
311
+ */
312
+ /* eslint-disable max-len, quote-props */
313
+ export function toJson_KustomizationSpec(obj: KustomizationSpec | undefined): Record<string, any> | undefined {
314
+ if (obj === undefined) { return undefined; }
315
+ const result = {
316
+ 'commonMetadata': toJson_KustomizationSpecCommonMetadata(obj.commonMetadata),
317
+ 'components': obj.components?.map(y => y),
318
+ 'decryption': toJson_KustomizationSpecDecryption(obj.decryption),
319
+ 'deletionPolicy': obj.deletionPolicy,
320
+ 'dependsOn': obj.dependsOn?.map(y => toJson_KustomizationSpecDependsOn(y)),
321
+ 'force': obj.force,
322
+ 'healthCheckExprs': obj.healthCheckExprs?.map(y => toJson_KustomizationSpecHealthCheckExprs(y)),
323
+ 'healthChecks': obj.healthChecks?.map(y => toJson_KustomizationSpecHealthChecks(y)),
324
+ 'images': obj.images?.map(y => toJson_KustomizationSpecImages(y)),
325
+ 'interval': obj.interval,
326
+ 'kubeConfig': toJson_KustomizationSpecKubeConfig(obj.kubeConfig),
327
+ 'namePrefix': obj.namePrefix,
328
+ 'nameSuffix': obj.nameSuffix,
329
+ 'patches': obj.patches?.map(y => toJson_KustomizationSpecPatches(y)),
330
+ 'path': obj.path,
331
+ 'postBuild': toJson_KustomizationSpecPostBuild(obj.postBuild),
332
+ 'prune': obj.prune,
333
+ 'retryInterval': obj.retryInterval,
334
+ 'serviceAccountName': obj.serviceAccountName,
335
+ 'sourceRef': toJson_KustomizationSpecSourceRef(obj.sourceRef),
336
+ 'suspend': obj.suspend,
337
+ 'targetNamespace': obj.targetNamespace,
338
+ 'timeout': obj.timeout,
339
+ 'wait': obj.wait,
340
+ };
341
+ // filter undefined values
342
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
343
+ }
344
+ /* eslint-enable max-len, quote-props */
345
+
346
+ /**
347
+ * CommonMetadata specifies the common labels and annotations that are
348
+ * applied to all resources. Any existing label or annotation will be
349
+ * overridden if its key matches a common one.
350
+ *
351
+ * @schema KustomizationSpecCommonMetadata
352
+ */
353
+ export interface KustomizationSpecCommonMetadata {
354
+ /**
355
+ * Annotations to be added to the object's metadata.
356
+ *
357
+ * @schema KustomizationSpecCommonMetadata#annotations
358
+ */
359
+ readonly annotations?: { [key: string]: string };
360
+
361
+ /**
362
+ * Labels to be added to the object's metadata.
363
+ *
364
+ * @schema KustomizationSpecCommonMetadata#labels
365
+ */
366
+ readonly labels?: { [key: string]: string };
367
+
368
+ }
369
+
370
+ /**
371
+ * Converts an object of type 'KustomizationSpecCommonMetadata' to JSON representation.
372
+ */
373
+ /* eslint-disable max-len, quote-props */
374
+ export function toJson_KustomizationSpecCommonMetadata(obj: KustomizationSpecCommonMetadata | undefined): Record<string, any> | undefined {
375
+ if (obj === undefined) { return undefined; }
376
+ const result = {
377
+ 'annotations': ((obj.annotations) === undefined) ? undefined : (Object.entries(obj.annotations).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
378
+ 'labels': ((obj.labels) === undefined) ? undefined : (Object.entries(obj.labels).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
379
+ };
380
+ // filter undefined values
381
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
382
+ }
383
+ /* eslint-enable max-len, quote-props */
384
+
385
+ /**
386
+ * Decrypt Kubernetes secrets before applying them on the cluster.
387
+ *
388
+ * @schema KustomizationSpecDecryption
389
+ */
390
+ export interface KustomizationSpecDecryption {
391
+ /**
392
+ * Provider is the name of the decryption engine.
393
+ *
394
+ * @schema KustomizationSpecDecryption#provider
395
+ */
396
+ readonly provider: KustomizationSpecDecryptionProvider;
397
+
398
+ /**
399
+ * The secret name containing the private OpenPGP keys used for decryption.
400
+ *
401
+ * @schema KustomizationSpecDecryption#secretRef
402
+ */
403
+ readonly secretRef?: KustomizationSpecDecryptionSecretRef;
404
+
405
+ }
406
+
407
+ /**
408
+ * Converts an object of type 'KustomizationSpecDecryption' to JSON representation.
409
+ */
410
+ /* eslint-disable max-len, quote-props */
411
+ export function toJson_KustomizationSpecDecryption(obj: KustomizationSpecDecryption | undefined): Record<string, any> | undefined {
412
+ if (obj === undefined) { return undefined; }
413
+ const result = {
414
+ 'provider': obj.provider,
415
+ 'secretRef': toJson_KustomizationSpecDecryptionSecretRef(obj.secretRef),
416
+ };
417
+ // filter undefined values
418
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
419
+ }
420
+ /* eslint-enable max-len, quote-props */
421
+
422
+ /**
423
+ * DeletionPolicy can be used to control garbage collection when this
424
+ * Kustomization is deleted. Valid values are ('MirrorPrune', 'Delete',
425
+ * 'Orphan'). 'MirrorPrune' mirrors the Prune field (orphan if false,
426
+ * delete if true). Defaults to 'MirrorPrune'.
427
+ *
428
+ * @default MirrorPrune'.
429
+ * @schema KustomizationSpecDeletionPolicy
430
+ */
431
+ export enum KustomizationSpecDeletionPolicy {
432
+ /** MirrorPrune */
433
+ MIRROR_PRUNE = "MirrorPrune",
434
+ /** Delete */
435
+ DELETE = "Delete",
436
+ /** Orphan */
437
+ ORPHAN = "Orphan",
438
+ }
439
+
440
+ /**
441
+ * NamespacedObjectReference contains enough information to locate the referenced Kubernetes resource object in any
442
+ * namespace.
443
+ *
444
+ * @schema KustomizationSpecDependsOn
445
+ */
446
+ export interface KustomizationSpecDependsOn {
447
+ /**
448
+ * Name of the referent.
449
+ *
450
+ * @schema KustomizationSpecDependsOn#name
451
+ */
452
+ readonly name: string;
453
+
454
+ /**
455
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
456
+ *
457
+ * @schema KustomizationSpecDependsOn#namespace
458
+ */
459
+ readonly namespace?: string;
460
+
461
+ }
462
+
463
+ /**
464
+ * Converts an object of type 'KustomizationSpecDependsOn' to JSON representation.
465
+ */
466
+ /* eslint-disable max-len, quote-props */
467
+ export function toJson_KustomizationSpecDependsOn(obj: KustomizationSpecDependsOn | undefined): Record<string, any> | undefined {
468
+ if (obj === undefined) { return undefined; }
469
+ const result = {
470
+ 'name': obj.name,
471
+ 'namespace': obj.namespace,
472
+ };
473
+ // filter undefined values
474
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
475
+ }
476
+ /* eslint-enable max-len, quote-props */
477
+
478
+ /**
479
+ * CustomHealthCheck defines the health check for custom resources.
480
+ *
481
+ * @schema KustomizationSpecHealthCheckExprs
482
+ */
483
+ export interface KustomizationSpecHealthCheckExprs {
484
+ /**
485
+ * APIVersion of the custom resource under evaluation.
486
+ *
487
+ * @schema KustomizationSpecHealthCheckExprs#apiVersion
488
+ */
489
+ readonly apiVersion: string;
490
+
491
+ /**
492
+ * Current is the CEL expression that determines if the status
493
+ * of the custom resource has reached the desired state.
494
+ *
495
+ * @schema KustomizationSpecHealthCheckExprs#current
496
+ */
497
+ readonly current: string;
498
+
499
+ /**
500
+ * Failed is the CEL expression that determines if the status
501
+ * of the custom resource has failed to reach the desired state.
502
+ *
503
+ * @schema KustomizationSpecHealthCheckExprs#failed
504
+ */
505
+ readonly failed?: string;
506
+
507
+ /**
508
+ * InProgress is the CEL expression that determines if the status
509
+ * of the custom resource has not yet reached the desired state.
510
+ *
511
+ * @schema KustomizationSpecHealthCheckExprs#inProgress
512
+ */
513
+ readonly inProgress?: string;
514
+
515
+ /**
516
+ * Kind of the custom resource under evaluation.
517
+ *
518
+ * @schema KustomizationSpecHealthCheckExprs#kind
519
+ */
520
+ readonly kind: string;
521
+
522
+ }
523
+
524
+ /**
525
+ * Converts an object of type 'KustomizationSpecHealthCheckExprs' to JSON representation.
526
+ */
527
+ /* eslint-disable max-len, quote-props */
528
+ export function toJson_KustomizationSpecHealthCheckExprs(obj: KustomizationSpecHealthCheckExprs | undefined): Record<string, any> | undefined {
529
+ if (obj === undefined) { return undefined; }
530
+ const result = {
531
+ 'apiVersion': obj.apiVersion,
532
+ 'current': obj.current,
533
+ 'failed': obj.failed,
534
+ 'inProgress': obj.inProgress,
535
+ 'kind': obj.kind,
536
+ };
537
+ // filter undefined values
538
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
539
+ }
540
+ /* eslint-enable max-len, quote-props */
541
+
542
+ /**
543
+ * NamespacedObjectKindReference contains enough information to locate the typed referenced Kubernetes resource object
544
+ * in any namespace.
545
+ *
546
+ * @schema KustomizationSpecHealthChecks
547
+ */
548
+ export interface KustomizationSpecHealthChecks {
549
+ /**
550
+ * API version of the referent, if not specified the Kubernetes preferred version will be used.
551
+ *
552
+ * @schema KustomizationSpecHealthChecks#apiVersion
553
+ */
554
+ readonly apiVersion?: string;
555
+
556
+ /**
557
+ * Kind of the referent.
558
+ *
559
+ * @schema KustomizationSpecHealthChecks#kind
560
+ */
561
+ readonly kind: string;
562
+
563
+ /**
564
+ * Name of the referent.
565
+ *
566
+ * @schema KustomizationSpecHealthChecks#name
567
+ */
568
+ readonly name: string;
569
+
570
+ /**
571
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
572
+ *
573
+ * @schema KustomizationSpecHealthChecks#namespace
574
+ */
575
+ readonly namespace?: string;
576
+
577
+ }
578
+
579
+ /**
580
+ * Converts an object of type 'KustomizationSpecHealthChecks' to JSON representation.
581
+ */
582
+ /* eslint-disable max-len, quote-props */
583
+ export function toJson_KustomizationSpecHealthChecks(obj: KustomizationSpecHealthChecks | undefined): Record<string, any> | undefined {
584
+ if (obj === undefined) { return undefined; }
585
+ const result = {
586
+ 'apiVersion': obj.apiVersion,
587
+ 'kind': obj.kind,
588
+ 'name': obj.name,
589
+ 'namespace': obj.namespace,
590
+ };
591
+ // filter undefined values
592
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
593
+ }
594
+ /* eslint-enable max-len, quote-props */
595
+
596
+ /**
597
+ * Image contains an image name, a new name, a new tag or digest, which will replace the original name and tag.
598
+ *
599
+ * @schema KustomizationSpecImages
600
+ */
601
+ export interface KustomizationSpecImages {
602
+ /**
603
+ * Digest is the value used to replace the original image tag.
604
+ * If digest is present NewTag value is ignored.
605
+ *
606
+ * @schema KustomizationSpecImages#digest
607
+ */
608
+ readonly digest?: string;
609
+
610
+ /**
611
+ * Name is a tag-less image name.
612
+ *
613
+ * @schema KustomizationSpecImages#name
614
+ */
615
+ readonly name: string;
616
+
617
+ /**
618
+ * NewName is the value used to replace the original name.
619
+ *
620
+ * @schema KustomizationSpecImages#newName
621
+ */
622
+ readonly newName?: string;
623
+
624
+ /**
625
+ * NewTag is the value used to replace the original tag.
626
+ *
627
+ * @schema KustomizationSpecImages#newTag
628
+ */
629
+ readonly newTag?: string;
630
+
631
+ }
632
+
633
+ /**
634
+ * Converts an object of type 'KustomizationSpecImages' to JSON representation.
635
+ */
636
+ /* eslint-disable max-len, quote-props */
637
+ export function toJson_KustomizationSpecImages(obj: KustomizationSpecImages | undefined): Record<string, any> | undefined {
638
+ if (obj === undefined) { return undefined; }
639
+ const result = {
640
+ 'digest': obj.digest,
641
+ 'name': obj.name,
642
+ 'newName': obj.newName,
643
+ 'newTag': obj.newTag,
644
+ };
645
+ // filter undefined values
646
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
647
+ }
648
+ /* eslint-enable max-len, quote-props */
649
+
650
+ /**
651
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
652
+ * When used in combination with KustomizationSpec.ServiceAccountName,
653
+ * forces the controller to act on behalf of that Service Account at the
654
+ * target cluster.
655
+ * If the --default-service-account flag is set, its value will be used as
656
+ * a controller level fallback for when KustomizationSpec.ServiceAccountName
657
+ * is empty.
658
+ *
659
+ * @schema KustomizationSpecKubeConfig
660
+ */
661
+ export interface KustomizationSpecKubeConfig {
662
+ /**
663
+ * SecretRef holds the name of a secret that contains a key with
664
+ * the kubeconfig file as the value. If no key is set, the key will default
665
+ * to 'value'.
666
+ * It is recommended that the kubeconfig is self-contained, and the secret
667
+ * is regularly updated if credentials such as a cloud-access-token expire.
668
+ * Cloud specific `cmd-path` auth helpers will not function without adding
669
+ * binaries and credentials to the Pod that is responsible for reconciling
670
+ * Kubernetes resources.
671
+ *
672
+ * @schema KustomizationSpecKubeConfig#secretRef
673
+ */
674
+ readonly secretRef: KustomizationSpecKubeConfigSecretRef;
675
+
676
+ }
677
+
678
+ /**
679
+ * Converts an object of type 'KustomizationSpecKubeConfig' to JSON representation.
680
+ */
681
+ /* eslint-disable max-len, quote-props */
682
+ export function toJson_KustomizationSpecKubeConfig(obj: KustomizationSpecKubeConfig | undefined): Record<string, any> | undefined {
683
+ if (obj === undefined) { return undefined; }
684
+ const result = {
685
+ 'secretRef': toJson_KustomizationSpecKubeConfigSecretRef(obj.secretRef),
686
+ };
687
+ // filter undefined values
688
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
689
+ }
690
+ /* eslint-enable max-len, quote-props */
691
+
692
+ /**
693
+ * Patch contains an inline StrategicMerge or JSON6902 patch, and the target the patch should
694
+ * be applied to.
695
+ *
696
+ * @schema KustomizationSpecPatches
697
+ */
698
+ export interface KustomizationSpecPatches {
699
+ /**
700
+ * Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with
701
+ * an array of operation objects.
702
+ *
703
+ * @schema KustomizationSpecPatches#patch
704
+ */
705
+ readonly patch: string;
706
+
707
+ /**
708
+ * Target points to the resources that the patch document should be applied to.
709
+ *
710
+ * @schema KustomizationSpecPatches#target
711
+ */
712
+ readonly target?: KustomizationSpecPatchesTarget;
713
+
714
+ }
715
+
716
+ /**
717
+ * Converts an object of type 'KustomizationSpecPatches' to JSON representation.
718
+ */
719
+ /* eslint-disable max-len, quote-props */
720
+ export function toJson_KustomizationSpecPatches(obj: KustomizationSpecPatches | undefined): Record<string, any> | undefined {
721
+ if (obj === undefined) { return undefined; }
722
+ const result = {
723
+ 'patch': obj.patch,
724
+ 'target': toJson_KustomizationSpecPatchesTarget(obj.target),
725
+ };
726
+ // filter undefined values
727
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
728
+ }
729
+ /* eslint-enable max-len, quote-props */
730
+
731
+ /**
732
+ * PostBuild describes which actions to perform on the YAML manifest
733
+ * generated by building the kustomize overlay.
734
+ *
735
+ * @schema KustomizationSpecPostBuild
736
+ */
737
+ export interface KustomizationSpecPostBuild {
738
+ /**
739
+ * Substitute holds a map of key/value pairs.
740
+ * The variables defined in your YAML manifests that match any of the keys
741
+ * defined in the map will be substituted with the set value.
742
+ * Includes support for bash string replacement functions
743
+ * e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
744
+ *
745
+ * @schema KustomizationSpecPostBuild#substitute
746
+ */
747
+ readonly substitute?: { [key: string]: string };
748
+
749
+ /**
750
+ * SubstituteFrom holds references to ConfigMaps and Secrets containing
751
+ * the variables and their values to be substituted in the YAML manifests.
752
+ * The ConfigMap and the Secret data keys represent the var names, and they
753
+ * must match the vars declared in the manifests for the substitution to
754
+ * happen.
755
+ *
756
+ * @schema KustomizationSpecPostBuild#substituteFrom
757
+ */
758
+ readonly substituteFrom?: KustomizationSpecPostBuildSubstituteFrom[];
759
+
760
+ }
761
+
762
+ /**
763
+ * Converts an object of type 'KustomizationSpecPostBuild' to JSON representation.
764
+ */
765
+ /* eslint-disable max-len, quote-props */
766
+ export function toJson_KustomizationSpecPostBuild(obj: KustomizationSpecPostBuild | undefined): Record<string, any> | undefined {
767
+ if (obj === undefined) { return undefined; }
768
+ const result = {
769
+ 'substitute': ((obj.substitute) === undefined) ? undefined : (Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
770
+ 'substituteFrom': obj.substituteFrom?.map(y => toJson_KustomizationSpecPostBuildSubstituteFrom(y)),
771
+ };
772
+ // filter undefined values
773
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
774
+ }
775
+ /* eslint-enable max-len, quote-props */
776
+
777
+ /**
778
+ * Reference of the source where the kustomization file is.
779
+ *
780
+ * @schema KustomizationSpecSourceRef
781
+ */
782
+ export interface KustomizationSpecSourceRef {
783
+ /**
784
+ * API version of the referent.
785
+ *
786
+ * @schema KustomizationSpecSourceRef#apiVersion
787
+ */
788
+ readonly apiVersion?: string;
789
+
790
+ /**
791
+ * Kind of the referent.
792
+ *
793
+ * @schema KustomizationSpecSourceRef#kind
794
+ */
795
+ readonly kind: KustomizationSpecSourceRefKind;
796
+
797
+ /**
798
+ * Name of the referent.
799
+ *
800
+ * @schema KustomizationSpecSourceRef#name
801
+ */
802
+ readonly name: string;
803
+
804
+ /**
805
+ * Namespace of the referent, defaults to the namespace of the Kubernetes
806
+ * resource object that contains the reference.
807
+ *
808
+ * @schema KustomizationSpecSourceRef#namespace
809
+ */
810
+ readonly namespace?: string;
811
+
812
+ }
813
+
814
+ /**
815
+ * Converts an object of type 'KustomizationSpecSourceRef' to JSON representation.
816
+ */
817
+ /* eslint-disable max-len, quote-props */
818
+ export function toJson_KustomizationSpecSourceRef(obj: KustomizationSpecSourceRef | undefined): Record<string, any> | undefined {
819
+ if (obj === undefined) { return undefined; }
820
+ const result = {
821
+ 'apiVersion': obj.apiVersion,
822
+ 'kind': obj.kind,
823
+ 'name': obj.name,
824
+ 'namespace': obj.namespace,
825
+ };
826
+ // filter undefined values
827
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
828
+ }
829
+ /* eslint-enable max-len, quote-props */
830
+
831
+ /**
832
+ * Provider is the name of the decryption engine.
833
+ *
834
+ * @schema KustomizationSpecDecryptionProvider
835
+ */
836
+ export enum KustomizationSpecDecryptionProvider {
837
+ /** sops */
838
+ SOPS = "sops",
839
+ }
840
+
841
+ /**
842
+ * The secret name containing the private OpenPGP keys used for decryption.
843
+ *
844
+ * @schema KustomizationSpecDecryptionSecretRef
845
+ */
846
+ export interface KustomizationSpecDecryptionSecretRef {
847
+ /**
848
+ * Name of the referent.
849
+ *
850
+ * @schema KustomizationSpecDecryptionSecretRef#name
851
+ */
852
+ readonly name: string;
853
+
854
+ }
855
+
856
+ /**
857
+ * Converts an object of type 'KustomizationSpecDecryptionSecretRef' to JSON representation.
858
+ */
859
+ /* eslint-disable max-len, quote-props */
860
+ export function toJson_KustomizationSpecDecryptionSecretRef(obj: KustomizationSpecDecryptionSecretRef | undefined): Record<string, any> | undefined {
861
+ if (obj === undefined) { return undefined; }
862
+ const result = {
863
+ 'name': obj.name,
864
+ };
865
+ // filter undefined values
866
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
867
+ }
868
+ /* eslint-enable max-len, quote-props */
869
+
870
+ /**
871
+ * SecretRef holds the name of a secret that contains a key with
872
+ * the kubeconfig file as the value. If no key is set, the key will default
873
+ * to 'value'.
874
+ * It is recommended that the kubeconfig is self-contained, and the secret
875
+ * is regularly updated if credentials such as a cloud-access-token expire.
876
+ * Cloud specific `cmd-path` auth helpers will not function without adding
877
+ * binaries and credentials to the Pod that is responsible for reconciling
878
+ * Kubernetes resources.
879
+ *
880
+ * @schema KustomizationSpecKubeConfigSecretRef
881
+ */
882
+ export interface KustomizationSpecKubeConfigSecretRef {
883
+ /**
884
+ * Key in the Secret, when not specified an implementation-specific default key is used.
885
+ *
886
+ * @schema KustomizationSpecKubeConfigSecretRef#key
887
+ */
888
+ readonly key?: string;
889
+
890
+ /**
891
+ * Name of the Secret.
892
+ *
893
+ * @schema KustomizationSpecKubeConfigSecretRef#name
894
+ */
895
+ readonly name: string;
896
+
897
+ }
898
+
899
+ /**
900
+ * Converts an object of type 'KustomizationSpecKubeConfigSecretRef' to JSON representation.
901
+ */
902
+ /* eslint-disable max-len, quote-props */
903
+ export function toJson_KustomizationSpecKubeConfigSecretRef(obj: KustomizationSpecKubeConfigSecretRef | undefined): Record<string, any> | undefined {
904
+ if (obj === undefined) { return undefined; }
905
+ const result = {
906
+ 'key': obj.key,
907
+ 'name': obj.name,
908
+ };
909
+ // filter undefined values
910
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
911
+ }
912
+ /* eslint-enable max-len, quote-props */
913
+
914
+ /**
915
+ * Target points to the resources that the patch document should be applied to.
916
+ *
917
+ * @schema KustomizationSpecPatchesTarget
918
+ */
919
+ export interface KustomizationSpecPatchesTarget {
920
+ /**
921
+ * AnnotationSelector is a string that follows the label selection expression
922
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
923
+ * It matches with the resource annotations.
924
+ *
925
+ * @schema KustomizationSpecPatchesTarget#annotationSelector
926
+ */
927
+ readonly annotationSelector?: string;
928
+
929
+ /**
930
+ * Group is the API group to select resources from.
931
+ * Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources.
932
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
933
+ *
934
+ * @schema KustomizationSpecPatchesTarget#group
935
+ */
936
+ readonly group?: string;
937
+
938
+ /**
939
+ * Kind of the API Group to select resources from.
940
+ * Together with Group and Version it is capable of unambiguously
941
+ * identifying and/or selecting resources.
942
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
943
+ *
944
+ * @schema KustomizationSpecPatchesTarget#kind
945
+ */
946
+ readonly kind?: string;
947
+
948
+ /**
949
+ * LabelSelector is a string that follows the label selection expression
950
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
951
+ * It matches with the resource labels.
952
+ *
953
+ * @schema KustomizationSpecPatchesTarget#labelSelector
954
+ */
955
+ readonly labelSelector?: string;
956
+
957
+ /**
958
+ * Name to match resources with.
959
+ *
960
+ * @schema KustomizationSpecPatchesTarget#name
961
+ */
962
+ readonly name?: string;
963
+
964
+ /**
965
+ * Namespace to select resources from.
966
+ *
967
+ * @schema KustomizationSpecPatchesTarget#namespace
968
+ */
969
+ readonly namespace?: string;
970
+
971
+ /**
972
+ * Version of the API Group to select resources from.
973
+ * Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources.
974
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
975
+ *
976
+ * @schema KustomizationSpecPatchesTarget#version
977
+ */
978
+ readonly version?: string;
979
+
980
+ }
981
+
982
+ /**
983
+ * Converts an object of type 'KustomizationSpecPatchesTarget' to JSON representation.
984
+ */
985
+ /* eslint-disable max-len, quote-props */
986
+ export function toJson_KustomizationSpecPatchesTarget(obj: KustomizationSpecPatchesTarget | undefined): Record<string, any> | undefined {
987
+ if (obj === undefined) { return undefined; }
988
+ const result = {
989
+ 'annotationSelector': obj.annotationSelector,
990
+ 'group': obj.group,
991
+ 'kind': obj.kind,
992
+ 'labelSelector': obj.labelSelector,
993
+ 'name': obj.name,
994
+ 'namespace': obj.namespace,
995
+ 'version': obj.version,
996
+ };
997
+ // filter undefined values
998
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
999
+ }
1000
+ /* eslint-enable max-len, quote-props */
1001
+
1002
+ /**
1003
+ * SubstituteReference contains a reference to a resource containing
1004
+ * the variables name and value.
1005
+ *
1006
+ * @schema KustomizationSpecPostBuildSubstituteFrom
1007
+ */
1008
+ export interface KustomizationSpecPostBuildSubstituteFrom {
1009
+ /**
1010
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
1011
+ *
1012
+ * @schema KustomizationSpecPostBuildSubstituteFrom#kind
1013
+ */
1014
+ readonly kind: KustomizationSpecPostBuildSubstituteFromKind;
1015
+
1016
+ /**
1017
+ * Name of the values referent. Should reside in the same namespace as the
1018
+ * referring resource.
1019
+ *
1020
+ * @schema KustomizationSpecPostBuildSubstituteFrom#name
1021
+ */
1022
+ readonly name: string;
1023
+
1024
+ /**
1025
+ * Optional indicates whether the referenced resource must exist, or whether to
1026
+ * tolerate its absence. If true and the referenced resource is absent, proceed
1027
+ * as if the resource was present but empty, without any variables defined.
1028
+ *
1029
+ * @schema KustomizationSpecPostBuildSubstituteFrom#optional
1030
+ */
1031
+ readonly optional?: boolean;
1032
+
1033
+ }
1034
+
1035
+ /**
1036
+ * Converts an object of type 'KustomizationSpecPostBuildSubstituteFrom' to JSON representation.
1037
+ */
1038
+ /* eslint-disable max-len, quote-props */
1039
+ export function toJson_KustomizationSpecPostBuildSubstituteFrom(obj: KustomizationSpecPostBuildSubstituteFrom | undefined): Record<string, any> | undefined {
1040
+ if (obj === undefined) { return undefined; }
1041
+ const result = {
1042
+ 'kind': obj.kind,
1043
+ 'name': obj.name,
1044
+ 'optional': obj.optional,
1045
+ };
1046
+ // filter undefined values
1047
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1048
+ }
1049
+ /* eslint-enable max-len, quote-props */
1050
+
1051
+ /**
1052
+ * Kind of the referent.
1053
+ *
1054
+ * @schema KustomizationSpecSourceRefKind
1055
+ */
1056
+ export enum KustomizationSpecSourceRefKind {
1057
+ /** OCIRepository */
1058
+ OCI_REPOSITORY = "OCIRepository",
1059
+ /** GitRepository */
1060
+ GIT_REPOSITORY = "GitRepository",
1061
+ /** Bucket */
1062
+ BUCKET = "Bucket",
1063
+ }
1064
+
1065
+ /**
1066
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
1067
+ *
1068
+ * @schema KustomizationSpecPostBuildSubstituteFromKind
1069
+ */
1070
+ export enum KustomizationSpecPostBuildSubstituteFromKind {
1071
+ /** Secret */
1072
+ SECRET = "Secret",
1073
+ /** ConfigMap */
1074
+ CONFIG_MAP = "ConfigMap",
1075
+ }
1076
+
1077
+
1078
+ /**
1079
+ * Kustomization is the Schema for the kustomizations API.
1080
+ *
1081
+ * @schema KustomizationV1Beta1
1082
+ */
1083
+ export class KustomizationV1Beta1 extends ApiObject {
1084
+ /**
1085
+ * Returns the apiVersion and kind for "KustomizationV1Beta1"
1086
+ */
1087
+ public static readonly GVK: GroupVersionKind = {
1088
+ apiVersion: 'kustomize.toolkit.fluxcd.io/v1beta1',
1089
+ kind: 'Kustomization',
1090
+ }
1091
+
1092
+ /**
1093
+ * Renders a Kubernetes manifest for "KustomizationV1Beta1".
1094
+ *
1095
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
1096
+ *
1097
+ * @param props initialization props
1098
+ */
1099
+ public static manifest(props: KustomizationV1Beta1Props = {}): any {
1100
+ return {
1101
+ ...KustomizationV1Beta1.GVK,
1102
+ ...toJson_KustomizationV1Beta1Props(props),
1103
+ };
1104
+ }
1105
+
1106
+ /**
1107
+ * Defines a "KustomizationV1Beta1" API object
1108
+ * @param scope the scope in which to define this object
1109
+ * @param id a scope-local name for the object
1110
+ * @param props initialization props
1111
+ */
1112
+ public constructor(scope: Construct, id: string, props: KustomizationV1Beta1Props = {}) {
1113
+ super(scope, id, {
1114
+ ...KustomizationV1Beta1.GVK,
1115
+ ...props,
1116
+ });
1117
+ }
1118
+
1119
+ /**
1120
+ * Renders the object to Kubernetes JSON.
1121
+ */
1122
+ public toJson(): any {
1123
+ const resolved = super.toJson();
1124
+
1125
+ return {
1126
+ ...KustomizationV1Beta1.GVK,
1127
+ ...toJson_KustomizationV1Beta1Props(resolved),
1128
+ };
1129
+ }
1130
+ }
1131
+
1132
+ /**
1133
+ * Kustomization is the Schema for the kustomizations API.
1134
+ *
1135
+ * @schema KustomizationV1Beta1
1136
+ */
1137
+ export interface KustomizationV1Beta1Props {
1138
+ /**
1139
+ * @schema KustomizationV1Beta1#metadata
1140
+ */
1141
+ readonly metadata?: ApiObjectMetadata;
1142
+
1143
+ /**
1144
+ * KustomizationSpec defines the desired state of a kustomization.
1145
+ *
1146
+ * @schema KustomizationV1Beta1#spec
1147
+ */
1148
+ readonly spec?: KustomizationV1Beta1Spec;
1149
+
1150
+ }
1151
+
1152
+ /**
1153
+ * Converts an object of type 'KustomizationV1Beta1Props' to JSON representation.
1154
+ */
1155
+ /* eslint-disable max-len, quote-props */
1156
+ export function toJson_KustomizationV1Beta1Props(obj: KustomizationV1Beta1Props | undefined): Record<string, any> | undefined {
1157
+ if (obj === undefined) { return undefined; }
1158
+ const result = {
1159
+ 'metadata': obj.metadata,
1160
+ 'spec': toJson_KustomizationV1Beta1Spec(obj.spec),
1161
+ };
1162
+ // filter undefined values
1163
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1164
+ }
1165
+ /* eslint-enable max-len, quote-props */
1166
+
1167
+ /**
1168
+ * KustomizationSpec defines the desired state of a kustomization.
1169
+ *
1170
+ * @schema KustomizationV1Beta1Spec
1171
+ */
1172
+ export interface KustomizationV1Beta1Spec {
1173
+ /**
1174
+ * Decrypt Kubernetes secrets before applying them on the cluster.
1175
+ *
1176
+ * @schema KustomizationV1Beta1Spec#decryption
1177
+ */
1178
+ readonly decryption?: KustomizationV1Beta1SpecDecryption;
1179
+
1180
+ /**
1181
+ * DependsOn may contain a meta.NamespacedObjectReference slice
1182
+ * with references to Kustomization resources that must be ready before this
1183
+ * Kustomization can be reconciled.
1184
+ *
1185
+ * @schema KustomizationV1Beta1Spec#dependsOn
1186
+ */
1187
+ readonly dependsOn?: KustomizationV1Beta1SpecDependsOn[];
1188
+
1189
+ /**
1190
+ * Force instructs the controller to recreate resources
1191
+ * when patching fails due to an immutable field change.
1192
+ *
1193
+ * @schema KustomizationV1Beta1Spec#force
1194
+ */
1195
+ readonly force?: boolean;
1196
+
1197
+ /**
1198
+ * A list of resources to be included in the health assessment.
1199
+ *
1200
+ * @schema KustomizationV1Beta1Spec#healthChecks
1201
+ */
1202
+ readonly healthChecks?: KustomizationV1Beta1SpecHealthChecks[];
1203
+
1204
+ /**
1205
+ * Images is a list of (image name, new name, new tag or digest)
1206
+ * for changing image names, tags or digests. This can also be achieved with a
1207
+ * patch, but this operator is simpler to specify.
1208
+ *
1209
+ * @schema KustomizationV1Beta1Spec#images
1210
+ */
1211
+ readonly images?: KustomizationV1Beta1SpecImages[];
1212
+
1213
+ /**
1214
+ * The interval at which to reconcile the Kustomization.
1215
+ *
1216
+ * @schema KustomizationV1Beta1Spec#interval
1217
+ */
1218
+ readonly interval: string;
1219
+
1220
+ /**
1221
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
1222
+ * When specified, KubeConfig takes precedence over ServiceAccountName.
1223
+ *
1224
+ * @schema KustomizationV1Beta1Spec#kubeConfig
1225
+ */
1226
+ readonly kubeConfig?: KustomizationV1Beta1SpecKubeConfig;
1227
+
1228
+ /**
1229
+ * Strategic merge and JSON patches, defined as inline YAML objects,
1230
+ * capable of targeting objects based on kind, label and annotation selectors.
1231
+ *
1232
+ * @schema KustomizationV1Beta1Spec#patches
1233
+ */
1234
+ readonly patches?: KustomizationV1Beta1SpecPatches[];
1235
+
1236
+ /**
1237
+ * JSON 6902 patches, defined as inline YAML objects.
1238
+ *
1239
+ * @schema KustomizationV1Beta1Spec#patchesJson6902
1240
+ */
1241
+ readonly patchesJson6902?: KustomizationV1Beta1SpecPatchesJson6902[];
1242
+
1243
+ /**
1244
+ * Strategic merge patches, defined as inline YAML objects.
1245
+ *
1246
+ * @schema KustomizationV1Beta1Spec#patchesStrategicMerge
1247
+ */
1248
+ readonly patchesStrategicMerge?: any[];
1249
+
1250
+ /**
1251
+ * Path to the directory containing the kustomization.yaml file, or the
1252
+ * set of plain YAMLs a kustomization.yaml should be generated for.
1253
+ * Defaults to 'None', which translates to the root path of the SourceRef.
1254
+ *
1255
+ * @default None', which translates to the root path of the SourceRef.
1256
+ * @schema KustomizationV1Beta1Spec#path
1257
+ */
1258
+ readonly path?: string;
1259
+
1260
+ /**
1261
+ * PostBuild describes which actions to perform on the YAML manifest
1262
+ * generated by building the kustomize overlay.
1263
+ *
1264
+ * @schema KustomizationV1Beta1Spec#postBuild
1265
+ */
1266
+ readonly postBuild?: KustomizationV1Beta1SpecPostBuild;
1267
+
1268
+ /**
1269
+ * Prune enables garbage collection.
1270
+ *
1271
+ * @schema KustomizationV1Beta1Spec#prune
1272
+ */
1273
+ readonly prune: boolean;
1274
+
1275
+ /**
1276
+ * The interval at which to retry a previously failed reconciliation.
1277
+ * When not specified, the controller uses the KustomizationSpec.Interval
1278
+ * value to retry failures.
1279
+ *
1280
+ * @schema KustomizationV1Beta1Spec#retryInterval
1281
+ */
1282
+ readonly retryInterval?: string;
1283
+
1284
+ /**
1285
+ * The name of the Kubernetes service account to impersonate
1286
+ * when reconciling this Kustomization.
1287
+ *
1288
+ * @schema KustomizationV1Beta1Spec#serviceAccountName
1289
+ */
1290
+ readonly serviceAccountName?: string;
1291
+
1292
+ /**
1293
+ * Reference of the source where the kustomization file is.
1294
+ *
1295
+ * @schema KustomizationV1Beta1Spec#sourceRef
1296
+ */
1297
+ readonly sourceRef: KustomizationV1Beta1SpecSourceRef;
1298
+
1299
+ /**
1300
+ * This flag tells the controller to suspend subsequent kustomize executions,
1301
+ * it does not apply to already started executions. Defaults to false.
1302
+ *
1303
+ * @default false.
1304
+ * @schema KustomizationV1Beta1Spec#suspend
1305
+ */
1306
+ readonly suspend?: boolean;
1307
+
1308
+ /**
1309
+ * TargetNamespace sets or overrides the namespace in the
1310
+ * kustomization.yaml file.
1311
+ *
1312
+ * @schema KustomizationV1Beta1Spec#targetNamespace
1313
+ */
1314
+ readonly targetNamespace?: string;
1315
+
1316
+ /**
1317
+ * Timeout for validation, apply and health checking operations.
1318
+ * Defaults to 'Interval' duration.
1319
+ *
1320
+ * @default Interval' duration.
1321
+ * @schema KustomizationV1Beta1Spec#timeout
1322
+ */
1323
+ readonly timeout?: string;
1324
+
1325
+ /**
1326
+ * Validate the Kubernetes objects before applying them on the cluster.
1327
+ * The validation strategy can be 'client' (local dry-run), 'server'
1328
+ * (APIServer dry-run) or 'none'.
1329
+ * When 'Force' is 'true', validation will fallback to 'client' if set to
1330
+ * 'server' because server-side validation is not supported in this scenario.
1331
+ *
1332
+ * @schema KustomizationV1Beta1Spec#validation
1333
+ */
1334
+ readonly validation?: KustomizationV1Beta1SpecValidation;
1335
+
1336
+ }
1337
+
1338
+ /**
1339
+ * Converts an object of type 'KustomizationV1Beta1Spec' to JSON representation.
1340
+ */
1341
+ /* eslint-disable max-len, quote-props */
1342
+ export function toJson_KustomizationV1Beta1Spec(obj: KustomizationV1Beta1Spec | undefined): Record<string, any> | undefined {
1343
+ if (obj === undefined) { return undefined; }
1344
+ const result = {
1345
+ 'decryption': toJson_KustomizationV1Beta1SpecDecryption(obj.decryption),
1346
+ 'dependsOn': obj.dependsOn?.map(y => toJson_KustomizationV1Beta1SpecDependsOn(y)),
1347
+ 'force': obj.force,
1348
+ 'healthChecks': obj.healthChecks?.map(y => toJson_KustomizationV1Beta1SpecHealthChecks(y)),
1349
+ 'images': obj.images?.map(y => toJson_KustomizationV1Beta1SpecImages(y)),
1350
+ 'interval': obj.interval,
1351
+ 'kubeConfig': toJson_KustomizationV1Beta1SpecKubeConfig(obj.kubeConfig),
1352
+ 'patches': obj.patches?.map(y => toJson_KustomizationV1Beta1SpecPatches(y)),
1353
+ 'patchesJson6902': obj.patchesJson6902?.map(y => toJson_KustomizationV1Beta1SpecPatchesJson6902(y)),
1354
+ 'patchesStrategicMerge': obj.patchesStrategicMerge?.map(y => y),
1355
+ 'path': obj.path,
1356
+ 'postBuild': toJson_KustomizationV1Beta1SpecPostBuild(obj.postBuild),
1357
+ 'prune': obj.prune,
1358
+ 'retryInterval': obj.retryInterval,
1359
+ 'serviceAccountName': obj.serviceAccountName,
1360
+ 'sourceRef': toJson_KustomizationV1Beta1SpecSourceRef(obj.sourceRef),
1361
+ 'suspend': obj.suspend,
1362
+ 'targetNamespace': obj.targetNamespace,
1363
+ 'timeout': obj.timeout,
1364
+ 'validation': obj.validation,
1365
+ };
1366
+ // filter undefined values
1367
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1368
+ }
1369
+ /* eslint-enable max-len, quote-props */
1370
+
1371
+ /**
1372
+ * Decrypt Kubernetes secrets before applying them on the cluster.
1373
+ *
1374
+ * @schema KustomizationV1Beta1SpecDecryption
1375
+ */
1376
+ export interface KustomizationV1Beta1SpecDecryption {
1377
+ /**
1378
+ * Provider is the name of the decryption engine.
1379
+ *
1380
+ * @schema KustomizationV1Beta1SpecDecryption#provider
1381
+ */
1382
+ readonly provider: KustomizationV1Beta1SpecDecryptionProvider;
1383
+
1384
+ /**
1385
+ * The secret name containing the private OpenPGP keys used for decryption.
1386
+ *
1387
+ * @schema KustomizationV1Beta1SpecDecryption#secretRef
1388
+ */
1389
+ readonly secretRef?: KustomizationV1Beta1SpecDecryptionSecretRef;
1390
+
1391
+ }
1392
+
1393
+ /**
1394
+ * Converts an object of type 'KustomizationV1Beta1SpecDecryption' to JSON representation.
1395
+ */
1396
+ /* eslint-disable max-len, quote-props */
1397
+ export function toJson_KustomizationV1Beta1SpecDecryption(obj: KustomizationV1Beta1SpecDecryption | undefined): Record<string, any> | undefined {
1398
+ if (obj === undefined) { return undefined; }
1399
+ const result = {
1400
+ 'provider': obj.provider,
1401
+ 'secretRef': toJson_KustomizationV1Beta1SpecDecryptionSecretRef(obj.secretRef),
1402
+ };
1403
+ // filter undefined values
1404
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1405
+ }
1406
+ /* eslint-enable max-len, quote-props */
1407
+
1408
+ /**
1409
+ * NamespacedObjectReference contains enough information to locate the referenced Kubernetes resource object in any
1410
+ * namespace.
1411
+ *
1412
+ * @schema KustomizationV1Beta1SpecDependsOn
1413
+ */
1414
+ export interface KustomizationV1Beta1SpecDependsOn {
1415
+ /**
1416
+ * Name of the referent.
1417
+ *
1418
+ * @schema KustomizationV1Beta1SpecDependsOn#name
1419
+ */
1420
+ readonly name: string;
1421
+
1422
+ /**
1423
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
1424
+ *
1425
+ * @schema KustomizationV1Beta1SpecDependsOn#namespace
1426
+ */
1427
+ readonly namespace?: string;
1428
+
1429
+ }
1430
+
1431
+ /**
1432
+ * Converts an object of type 'KustomizationV1Beta1SpecDependsOn' to JSON representation.
1433
+ */
1434
+ /* eslint-disable max-len, quote-props */
1435
+ export function toJson_KustomizationV1Beta1SpecDependsOn(obj: KustomizationV1Beta1SpecDependsOn | undefined): Record<string, any> | undefined {
1436
+ if (obj === undefined) { return undefined; }
1437
+ const result = {
1438
+ 'name': obj.name,
1439
+ 'namespace': obj.namespace,
1440
+ };
1441
+ // filter undefined values
1442
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1443
+ }
1444
+ /* eslint-enable max-len, quote-props */
1445
+
1446
+ /**
1447
+ * NamespacedObjectKindReference contains enough information to locate the typed referenced Kubernetes resource object
1448
+ * in any namespace.
1449
+ *
1450
+ * @schema KustomizationV1Beta1SpecHealthChecks
1451
+ */
1452
+ export interface KustomizationV1Beta1SpecHealthChecks {
1453
+ /**
1454
+ * API version of the referent, if not specified the Kubernetes preferred version will be used.
1455
+ *
1456
+ * @schema KustomizationV1Beta1SpecHealthChecks#apiVersion
1457
+ */
1458
+ readonly apiVersion?: string;
1459
+
1460
+ /**
1461
+ * Kind of the referent.
1462
+ *
1463
+ * @schema KustomizationV1Beta1SpecHealthChecks#kind
1464
+ */
1465
+ readonly kind: string;
1466
+
1467
+ /**
1468
+ * Name of the referent.
1469
+ *
1470
+ * @schema KustomizationV1Beta1SpecHealthChecks#name
1471
+ */
1472
+ readonly name: string;
1473
+
1474
+ /**
1475
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
1476
+ *
1477
+ * @schema KustomizationV1Beta1SpecHealthChecks#namespace
1478
+ */
1479
+ readonly namespace?: string;
1480
+
1481
+ }
1482
+
1483
+ /**
1484
+ * Converts an object of type 'KustomizationV1Beta1SpecHealthChecks' to JSON representation.
1485
+ */
1486
+ /* eslint-disable max-len, quote-props */
1487
+ export function toJson_KustomizationV1Beta1SpecHealthChecks(obj: KustomizationV1Beta1SpecHealthChecks | undefined): Record<string, any> | undefined {
1488
+ if (obj === undefined) { return undefined; }
1489
+ const result = {
1490
+ 'apiVersion': obj.apiVersion,
1491
+ 'kind': obj.kind,
1492
+ 'name': obj.name,
1493
+ 'namespace': obj.namespace,
1494
+ };
1495
+ // filter undefined values
1496
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1497
+ }
1498
+ /* eslint-enable max-len, quote-props */
1499
+
1500
+ /**
1501
+ * Image contains an image name, a new name, a new tag or digest, which will replace the original name and tag.
1502
+ *
1503
+ * @schema KustomizationV1Beta1SpecImages
1504
+ */
1505
+ export interface KustomizationV1Beta1SpecImages {
1506
+ /**
1507
+ * Digest is the value used to replace the original image tag.
1508
+ * If digest is present NewTag value is ignored.
1509
+ *
1510
+ * @schema KustomizationV1Beta1SpecImages#digest
1511
+ */
1512
+ readonly digest?: string;
1513
+
1514
+ /**
1515
+ * Name is a tag-less image name.
1516
+ *
1517
+ * @schema KustomizationV1Beta1SpecImages#name
1518
+ */
1519
+ readonly name: string;
1520
+
1521
+ /**
1522
+ * NewName is the value used to replace the original name.
1523
+ *
1524
+ * @schema KustomizationV1Beta1SpecImages#newName
1525
+ */
1526
+ readonly newName?: string;
1527
+
1528
+ /**
1529
+ * NewTag is the value used to replace the original tag.
1530
+ *
1531
+ * @schema KustomizationV1Beta1SpecImages#newTag
1532
+ */
1533
+ readonly newTag?: string;
1534
+
1535
+ }
1536
+
1537
+ /**
1538
+ * Converts an object of type 'KustomizationV1Beta1SpecImages' to JSON representation.
1539
+ */
1540
+ /* eslint-disable max-len, quote-props */
1541
+ export function toJson_KustomizationV1Beta1SpecImages(obj: KustomizationV1Beta1SpecImages | undefined): Record<string, any> | undefined {
1542
+ if (obj === undefined) { return undefined; }
1543
+ const result = {
1544
+ 'digest': obj.digest,
1545
+ 'name': obj.name,
1546
+ 'newName': obj.newName,
1547
+ 'newTag': obj.newTag,
1548
+ };
1549
+ // filter undefined values
1550
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1551
+ }
1552
+ /* eslint-enable max-len, quote-props */
1553
+
1554
+ /**
1555
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
1556
+ * When specified, KubeConfig takes precedence over ServiceAccountName.
1557
+ *
1558
+ * @schema KustomizationV1Beta1SpecKubeConfig
1559
+ */
1560
+ export interface KustomizationV1Beta1SpecKubeConfig {
1561
+ /**
1562
+ * SecretRef holds the name to a secret that contains a 'value' key with
1563
+ * the kubeconfig file as the value. It must be in the same namespace as
1564
+ * the Kustomization.
1565
+ * It is recommended that the kubeconfig is self-contained, and the secret
1566
+ * is regularly updated if credentials such as a cloud-access-token expire.
1567
+ * Cloud specific `cmd-path` auth helpers will not function without adding
1568
+ * binaries and credentials to the Pod that is responsible for reconciling
1569
+ * the Kustomization.
1570
+ *
1571
+ * @schema KustomizationV1Beta1SpecKubeConfig#secretRef
1572
+ */
1573
+ readonly secretRef: KustomizationV1Beta1SpecKubeConfigSecretRef;
1574
+
1575
+ }
1576
+
1577
+ /**
1578
+ * Converts an object of type 'KustomizationV1Beta1SpecKubeConfig' to JSON representation.
1579
+ */
1580
+ /* eslint-disable max-len, quote-props */
1581
+ export function toJson_KustomizationV1Beta1SpecKubeConfig(obj: KustomizationV1Beta1SpecKubeConfig | undefined): Record<string, any> | undefined {
1582
+ if (obj === undefined) { return undefined; }
1583
+ const result = {
1584
+ 'secretRef': toJson_KustomizationV1Beta1SpecKubeConfigSecretRef(obj.secretRef),
1585
+ };
1586
+ // filter undefined values
1587
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1588
+ }
1589
+ /* eslint-enable max-len, quote-props */
1590
+
1591
+ /**
1592
+ * Patch contains an inline StrategicMerge or JSON6902 patch, and the target the patch should
1593
+ * be applied to.
1594
+ *
1595
+ * @schema KustomizationV1Beta1SpecPatches
1596
+ */
1597
+ export interface KustomizationV1Beta1SpecPatches {
1598
+ /**
1599
+ * Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with
1600
+ * an array of operation objects.
1601
+ *
1602
+ * @schema KustomizationV1Beta1SpecPatches#patch
1603
+ */
1604
+ readonly patch: string;
1605
+
1606
+ /**
1607
+ * Target points to the resources that the patch document should be applied to.
1608
+ *
1609
+ * @schema KustomizationV1Beta1SpecPatches#target
1610
+ */
1611
+ readonly target?: KustomizationV1Beta1SpecPatchesTarget;
1612
+
1613
+ }
1614
+
1615
+ /**
1616
+ * Converts an object of type 'KustomizationV1Beta1SpecPatches' to JSON representation.
1617
+ */
1618
+ /* eslint-disable max-len, quote-props */
1619
+ export function toJson_KustomizationV1Beta1SpecPatches(obj: KustomizationV1Beta1SpecPatches | undefined): Record<string, any> | undefined {
1620
+ if (obj === undefined) { return undefined; }
1621
+ const result = {
1622
+ 'patch': obj.patch,
1623
+ 'target': toJson_KustomizationV1Beta1SpecPatchesTarget(obj.target),
1624
+ };
1625
+ // filter undefined values
1626
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1627
+ }
1628
+ /* eslint-enable max-len, quote-props */
1629
+
1630
+ /**
1631
+ * JSON6902Patch contains a JSON6902 patch and the target the patch should be applied to.
1632
+ *
1633
+ * @schema KustomizationV1Beta1SpecPatchesJson6902
1634
+ */
1635
+ export interface KustomizationV1Beta1SpecPatchesJson6902 {
1636
+ /**
1637
+ * Patch contains the JSON6902 patch document with an array of operation objects.
1638
+ *
1639
+ * @schema KustomizationV1Beta1SpecPatchesJson6902#patch
1640
+ */
1641
+ readonly patch: KustomizationV1Beta1SpecPatchesJson6902Patch[];
1642
+
1643
+ /**
1644
+ * Target points to the resources that the patch document should be applied to.
1645
+ *
1646
+ * @schema KustomizationV1Beta1SpecPatchesJson6902#target
1647
+ */
1648
+ readonly target: KustomizationV1Beta1SpecPatchesJson6902Target;
1649
+
1650
+ }
1651
+
1652
+ /**
1653
+ * Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902' to JSON representation.
1654
+ */
1655
+ /* eslint-disable max-len, quote-props */
1656
+ export function toJson_KustomizationV1Beta1SpecPatchesJson6902(obj: KustomizationV1Beta1SpecPatchesJson6902 | undefined): Record<string, any> | undefined {
1657
+ if (obj === undefined) { return undefined; }
1658
+ const result = {
1659
+ 'patch': obj.patch?.map(y => toJson_KustomizationV1Beta1SpecPatchesJson6902Patch(y)),
1660
+ 'target': toJson_KustomizationV1Beta1SpecPatchesJson6902Target(obj.target),
1661
+ };
1662
+ // filter undefined values
1663
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1664
+ }
1665
+ /* eslint-enable max-len, quote-props */
1666
+
1667
+ /**
1668
+ * PostBuild describes which actions to perform on the YAML manifest
1669
+ * generated by building the kustomize overlay.
1670
+ *
1671
+ * @schema KustomizationV1Beta1SpecPostBuild
1672
+ */
1673
+ export interface KustomizationV1Beta1SpecPostBuild {
1674
+ /**
1675
+ * Substitute holds a map of key/value pairs.
1676
+ * The variables defined in your YAML manifests
1677
+ * that match any of the keys defined in the map
1678
+ * will be substituted with the set value.
1679
+ * Includes support for bash string replacement functions
1680
+ * e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
1681
+ *
1682
+ * @schema KustomizationV1Beta1SpecPostBuild#substitute
1683
+ */
1684
+ readonly substitute?: { [key: string]: string };
1685
+
1686
+ /**
1687
+ * SubstituteFrom holds references to ConfigMaps and Secrets containing
1688
+ * the variables and their values to be substituted in the YAML manifests.
1689
+ * The ConfigMap and the Secret data keys represent the var names and they
1690
+ * must match the vars declared in the manifests for the substitution to happen.
1691
+ *
1692
+ * @schema KustomizationV1Beta1SpecPostBuild#substituteFrom
1693
+ */
1694
+ readonly substituteFrom?: KustomizationV1Beta1SpecPostBuildSubstituteFrom[];
1695
+
1696
+ }
1697
+
1698
+ /**
1699
+ * Converts an object of type 'KustomizationV1Beta1SpecPostBuild' to JSON representation.
1700
+ */
1701
+ /* eslint-disable max-len, quote-props */
1702
+ export function toJson_KustomizationV1Beta1SpecPostBuild(obj: KustomizationV1Beta1SpecPostBuild | undefined): Record<string, any> | undefined {
1703
+ if (obj === undefined) { return undefined; }
1704
+ const result = {
1705
+ 'substitute': ((obj.substitute) === undefined) ? undefined : (Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
1706
+ 'substituteFrom': obj.substituteFrom?.map(y => toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom(y)),
1707
+ };
1708
+ // filter undefined values
1709
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1710
+ }
1711
+ /* eslint-enable max-len, quote-props */
1712
+
1713
+ /**
1714
+ * Reference of the source where the kustomization file is.
1715
+ *
1716
+ * @schema KustomizationV1Beta1SpecSourceRef
1717
+ */
1718
+ export interface KustomizationV1Beta1SpecSourceRef {
1719
+ /**
1720
+ * API version of the referent
1721
+ *
1722
+ * @schema KustomizationV1Beta1SpecSourceRef#apiVersion
1723
+ */
1724
+ readonly apiVersion?: string;
1725
+
1726
+ /**
1727
+ * Kind of the referent
1728
+ *
1729
+ * @schema KustomizationV1Beta1SpecSourceRef#kind
1730
+ */
1731
+ readonly kind: KustomizationV1Beta1SpecSourceRefKind;
1732
+
1733
+ /**
1734
+ * Name of the referent
1735
+ *
1736
+ * @schema KustomizationV1Beta1SpecSourceRef#name
1737
+ */
1738
+ readonly name: string;
1739
+
1740
+ /**
1741
+ * Namespace of the referent, defaults to the Kustomization namespace
1742
+ *
1743
+ * @schema KustomizationV1Beta1SpecSourceRef#namespace
1744
+ */
1745
+ readonly namespace?: string;
1746
+
1747
+ }
1748
+
1749
+ /**
1750
+ * Converts an object of type 'KustomizationV1Beta1SpecSourceRef' to JSON representation.
1751
+ */
1752
+ /* eslint-disable max-len, quote-props */
1753
+ export function toJson_KustomizationV1Beta1SpecSourceRef(obj: KustomizationV1Beta1SpecSourceRef | undefined): Record<string, any> | undefined {
1754
+ if (obj === undefined) { return undefined; }
1755
+ const result = {
1756
+ 'apiVersion': obj.apiVersion,
1757
+ 'kind': obj.kind,
1758
+ 'name': obj.name,
1759
+ 'namespace': obj.namespace,
1760
+ };
1761
+ // filter undefined values
1762
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1763
+ }
1764
+ /* eslint-enable max-len, quote-props */
1765
+
1766
+ /**
1767
+ * Validate the Kubernetes objects before applying them on the cluster.
1768
+ * The validation strategy can be 'client' (local dry-run), 'server'
1769
+ * (APIServer dry-run) or 'none'.
1770
+ * When 'Force' is 'true', validation will fallback to 'client' if set to
1771
+ * 'server' because server-side validation is not supported in this scenario.
1772
+ *
1773
+ * @schema KustomizationV1Beta1SpecValidation
1774
+ */
1775
+ export enum KustomizationV1Beta1SpecValidation {
1776
+ /** none */
1777
+ NONE = "none",
1778
+ /** client */
1779
+ CLIENT = "client",
1780
+ /** server */
1781
+ SERVER = "server",
1782
+ }
1783
+
1784
+ /**
1785
+ * Provider is the name of the decryption engine.
1786
+ *
1787
+ * @schema KustomizationV1Beta1SpecDecryptionProvider
1788
+ */
1789
+ export enum KustomizationV1Beta1SpecDecryptionProvider {
1790
+ /** sops */
1791
+ SOPS = "sops",
1792
+ }
1793
+
1794
+ /**
1795
+ * The secret name containing the private OpenPGP keys used for decryption.
1796
+ *
1797
+ * @schema KustomizationV1Beta1SpecDecryptionSecretRef
1798
+ */
1799
+ export interface KustomizationV1Beta1SpecDecryptionSecretRef {
1800
+ /**
1801
+ * Name of the referent.
1802
+ *
1803
+ * @schema KustomizationV1Beta1SpecDecryptionSecretRef#name
1804
+ */
1805
+ readonly name: string;
1806
+
1807
+ }
1808
+
1809
+ /**
1810
+ * Converts an object of type 'KustomizationV1Beta1SpecDecryptionSecretRef' to JSON representation.
1811
+ */
1812
+ /* eslint-disable max-len, quote-props */
1813
+ export function toJson_KustomizationV1Beta1SpecDecryptionSecretRef(obj: KustomizationV1Beta1SpecDecryptionSecretRef | undefined): Record<string, any> | undefined {
1814
+ if (obj === undefined) { return undefined; }
1815
+ const result = {
1816
+ 'name': obj.name,
1817
+ };
1818
+ // filter undefined values
1819
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1820
+ }
1821
+ /* eslint-enable max-len, quote-props */
1822
+
1823
+ /**
1824
+ * SecretRef holds the name to a secret that contains a 'value' key with
1825
+ * the kubeconfig file as the value. It must be in the same namespace as
1826
+ * the Kustomization.
1827
+ * It is recommended that the kubeconfig is self-contained, and the secret
1828
+ * is regularly updated if credentials such as a cloud-access-token expire.
1829
+ * Cloud specific `cmd-path` auth helpers will not function without adding
1830
+ * binaries and credentials to the Pod that is responsible for reconciling
1831
+ * the Kustomization.
1832
+ *
1833
+ * @schema KustomizationV1Beta1SpecKubeConfigSecretRef
1834
+ */
1835
+ export interface KustomizationV1Beta1SpecKubeConfigSecretRef {
1836
+ /**
1837
+ * Name of the referent.
1838
+ *
1839
+ * @schema KustomizationV1Beta1SpecKubeConfigSecretRef#name
1840
+ */
1841
+ readonly name: string;
1842
+
1843
+ }
1844
+
1845
+ /**
1846
+ * Converts an object of type 'KustomizationV1Beta1SpecKubeConfigSecretRef' to JSON representation.
1847
+ */
1848
+ /* eslint-disable max-len, quote-props */
1849
+ export function toJson_KustomizationV1Beta1SpecKubeConfigSecretRef(obj: KustomizationV1Beta1SpecKubeConfigSecretRef | undefined): Record<string, any> | undefined {
1850
+ if (obj === undefined) { return undefined; }
1851
+ const result = {
1852
+ 'name': obj.name,
1853
+ };
1854
+ // filter undefined values
1855
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1856
+ }
1857
+ /* eslint-enable max-len, quote-props */
1858
+
1859
+ /**
1860
+ * Target points to the resources that the patch document should be applied to.
1861
+ *
1862
+ * @schema KustomizationV1Beta1SpecPatchesTarget
1863
+ */
1864
+ export interface KustomizationV1Beta1SpecPatchesTarget {
1865
+ /**
1866
+ * AnnotationSelector is a string that follows the label selection expression
1867
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
1868
+ * It matches with the resource annotations.
1869
+ *
1870
+ * @schema KustomizationV1Beta1SpecPatchesTarget#annotationSelector
1871
+ */
1872
+ readonly annotationSelector?: string;
1873
+
1874
+ /**
1875
+ * Group is the API group to select resources from.
1876
+ * Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources.
1877
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
1878
+ *
1879
+ * @schema KustomizationV1Beta1SpecPatchesTarget#group
1880
+ */
1881
+ readonly group?: string;
1882
+
1883
+ /**
1884
+ * Kind of the API Group to select resources from.
1885
+ * Together with Group and Version it is capable of unambiguously
1886
+ * identifying and/or selecting resources.
1887
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
1888
+ *
1889
+ * @schema KustomizationV1Beta1SpecPatchesTarget#kind
1890
+ */
1891
+ readonly kind?: string;
1892
+
1893
+ /**
1894
+ * LabelSelector is a string that follows the label selection expression
1895
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
1896
+ * It matches with the resource labels.
1897
+ *
1898
+ * @schema KustomizationV1Beta1SpecPatchesTarget#labelSelector
1899
+ */
1900
+ readonly labelSelector?: string;
1901
+
1902
+ /**
1903
+ * Name to match resources with.
1904
+ *
1905
+ * @schema KustomizationV1Beta1SpecPatchesTarget#name
1906
+ */
1907
+ readonly name?: string;
1908
+
1909
+ /**
1910
+ * Namespace to select resources from.
1911
+ *
1912
+ * @schema KustomizationV1Beta1SpecPatchesTarget#namespace
1913
+ */
1914
+ readonly namespace?: string;
1915
+
1916
+ /**
1917
+ * Version of the API Group to select resources from.
1918
+ * Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources.
1919
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
1920
+ *
1921
+ * @schema KustomizationV1Beta1SpecPatchesTarget#version
1922
+ */
1923
+ readonly version?: string;
1924
+
1925
+ }
1926
+
1927
+ /**
1928
+ * Converts an object of type 'KustomizationV1Beta1SpecPatchesTarget' to JSON representation.
1929
+ */
1930
+ /* eslint-disable max-len, quote-props */
1931
+ export function toJson_KustomizationV1Beta1SpecPatchesTarget(obj: KustomizationV1Beta1SpecPatchesTarget | undefined): Record<string, any> | undefined {
1932
+ if (obj === undefined) { return undefined; }
1933
+ const result = {
1934
+ 'annotationSelector': obj.annotationSelector,
1935
+ 'group': obj.group,
1936
+ 'kind': obj.kind,
1937
+ 'labelSelector': obj.labelSelector,
1938
+ 'name': obj.name,
1939
+ 'namespace': obj.namespace,
1940
+ 'version': obj.version,
1941
+ };
1942
+ // filter undefined values
1943
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
1944
+ }
1945
+ /* eslint-enable max-len, quote-props */
1946
+
1947
+ /**
1948
+ * JSON6902 is a JSON6902 operation object.
1949
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
1950
+ *
1951
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Patch
1952
+ */
1953
+ export interface KustomizationV1Beta1SpecPatchesJson6902Patch {
1954
+ /**
1955
+ * From contains a JSON-pointer value that references a location within the target document where the operation is
1956
+ * performed. The meaning of the value depends on the value of Op, and is NOT taken into account by all operations.
1957
+ *
1958
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Patch#from
1959
+ */
1960
+ readonly from?: string;
1961
+
1962
+ /**
1963
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or
1964
+ * "test".
1965
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
1966
+ *
1967
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Patch#op
1968
+ */
1969
+ readonly op: KustomizationV1Beta1SpecPatchesJson6902PatchOp;
1970
+
1971
+ /**
1972
+ * Path contains the JSON-pointer value that references a location within the target document where the operation
1973
+ * is performed. The meaning of the value depends on the value of Op.
1974
+ *
1975
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Patch#path
1976
+ */
1977
+ readonly path: string;
1978
+
1979
+ /**
1980
+ * Value contains a valid JSON structure. The meaning of the value depends on the value of Op, and is NOT taken into
1981
+ * account by all operations.
1982
+ *
1983
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Patch#value
1984
+ */
1985
+ readonly value?: any;
1986
+
1987
+ }
1988
+
1989
+ /**
1990
+ * Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902Patch' to JSON representation.
1991
+ */
1992
+ /* eslint-disable max-len, quote-props */
1993
+ export function toJson_KustomizationV1Beta1SpecPatchesJson6902Patch(obj: KustomizationV1Beta1SpecPatchesJson6902Patch | undefined): Record<string, any> | undefined {
1994
+ if (obj === undefined) { return undefined; }
1995
+ const result = {
1996
+ 'from': obj.from,
1997
+ 'op': obj.op,
1998
+ 'path': obj.path,
1999
+ 'value': obj.value,
2000
+ };
2001
+ // filter undefined values
2002
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2003
+ }
2004
+ /* eslint-enable max-len, quote-props */
2005
+
2006
+ /**
2007
+ * Target points to the resources that the patch document should be applied to.
2008
+ *
2009
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target
2010
+ */
2011
+ export interface KustomizationV1Beta1SpecPatchesJson6902Target {
2012
+ /**
2013
+ * AnnotationSelector is a string that follows the label selection expression
2014
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
2015
+ * It matches with the resource annotations.
2016
+ *
2017
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#annotationSelector
2018
+ */
2019
+ readonly annotationSelector?: string;
2020
+
2021
+ /**
2022
+ * Group is the API group to select resources from.
2023
+ * Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources.
2024
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
2025
+ *
2026
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#group
2027
+ */
2028
+ readonly group?: string;
2029
+
2030
+ /**
2031
+ * Kind of the API Group to select resources from.
2032
+ * Together with Group and Version it is capable of unambiguously
2033
+ * identifying and/or selecting resources.
2034
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
2035
+ *
2036
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#kind
2037
+ */
2038
+ readonly kind?: string;
2039
+
2040
+ /**
2041
+ * LabelSelector is a string that follows the label selection expression
2042
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
2043
+ * It matches with the resource labels.
2044
+ *
2045
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#labelSelector
2046
+ */
2047
+ readonly labelSelector?: string;
2048
+
2049
+ /**
2050
+ * Name to match resources with.
2051
+ *
2052
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#name
2053
+ */
2054
+ readonly name?: string;
2055
+
2056
+ /**
2057
+ * Namespace to select resources from.
2058
+ *
2059
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#namespace
2060
+ */
2061
+ readonly namespace?: string;
2062
+
2063
+ /**
2064
+ * Version of the API Group to select resources from.
2065
+ * Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources.
2066
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
2067
+ *
2068
+ * @schema KustomizationV1Beta1SpecPatchesJson6902Target#version
2069
+ */
2070
+ readonly version?: string;
2071
+
2072
+ }
2073
+
2074
+ /**
2075
+ * Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902Target' to JSON representation.
2076
+ */
2077
+ /* eslint-disable max-len, quote-props */
2078
+ export function toJson_KustomizationV1Beta1SpecPatchesJson6902Target(obj: KustomizationV1Beta1SpecPatchesJson6902Target | undefined): Record<string, any> | undefined {
2079
+ if (obj === undefined) { return undefined; }
2080
+ const result = {
2081
+ 'annotationSelector': obj.annotationSelector,
2082
+ 'group': obj.group,
2083
+ 'kind': obj.kind,
2084
+ 'labelSelector': obj.labelSelector,
2085
+ 'name': obj.name,
2086
+ 'namespace': obj.namespace,
2087
+ 'version': obj.version,
2088
+ };
2089
+ // filter undefined values
2090
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2091
+ }
2092
+ /* eslint-enable max-len, quote-props */
2093
+
2094
+ /**
2095
+ * SubstituteReference contains a reference to a resource containing
2096
+ * the variables name and value.
2097
+ *
2098
+ * @schema KustomizationV1Beta1SpecPostBuildSubstituteFrom
2099
+ */
2100
+ export interface KustomizationV1Beta1SpecPostBuildSubstituteFrom {
2101
+ /**
2102
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
2103
+ *
2104
+ * @schema KustomizationV1Beta1SpecPostBuildSubstituteFrom#kind
2105
+ */
2106
+ readonly kind: KustomizationV1Beta1SpecPostBuildSubstituteFromKind;
2107
+
2108
+ /**
2109
+ * Name of the values referent. Should reside in the same namespace as the
2110
+ * referring resource.
2111
+ *
2112
+ * @schema KustomizationV1Beta1SpecPostBuildSubstituteFrom#name
2113
+ */
2114
+ readonly name: string;
2115
+
2116
+ }
2117
+
2118
+ /**
2119
+ * Converts an object of type 'KustomizationV1Beta1SpecPostBuildSubstituteFrom' to JSON representation.
2120
+ */
2121
+ /* eslint-disable max-len, quote-props */
2122
+ export function toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom(obj: KustomizationV1Beta1SpecPostBuildSubstituteFrom | undefined): Record<string, any> | undefined {
2123
+ if (obj === undefined) { return undefined; }
2124
+ const result = {
2125
+ 'kind': obj.kind,
2126
+ 'name': obj.name,
2127
+ };
2128
+ // filter undefined values
2129
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2130
+ }
2131
+ /* eslint-enable max-len, quote-props */
2132
+
2133
+ /**
2134
+ * Kind of the referent
2135
+ *
2136
+ * @schema KustomizationV1Beta1SpecSourceRefKind
2137
+ */
2138
+ export enum KustomizationV1Beta1SpecSourceRefKind {
2139
+ /** GitRepository */
2140
+ GIT_REPOSITORY = "GitRepository",
2141
+ /** Bucket */
2142
+ BUCKET = "Bucket",
2143
+ }
2144
+
2145
+ /**
2146
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or
2147
+ * "test".
2148
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
2149
+ *
2150
+ * @schema KustomizationV1Beta1SpecPatchesJson6902PatchOp
2151
+ */
2152
+ export enum KustomizationV1Beta1SpecPatchesJson6902PatchOp {
2153
+ /** test */
2154
+ TEST = "test",
2155
+ /** remove */
2156
+ REMOVE = "remove",
2157
+ /** add */
2158
+ ADD = "add",
2159
+ /** replace */
2160
+ REPLACE = "replace",
2161
+ /** move */
2162
+ MOVE = "move",
2163
+ /** copy */
2164
+ COPY = "copy",
2165
+ }
2166
+
2167
+ /**
2168
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
2169
+ *
2170
+ * @schema KustomizationV1Beta1SpecPostBuildSubstituteFromKind
2171
+ */
2172
+ export enum KustomizationV1Beta1SpecPostBuildSubstituteFromKind {
2173
+ /** Secret */
2174
+ SECRET = "Secret",
2175
+ /** ConfigMap */
2176
+ CONFIG_MAP = "ConfigMap",
2177
+ }
2178
+
2179
+
2180
+ /**
2181
+ * Kustomization is the Schema for the kustomizations API.
2182
+ *
2183
+ * @schema KustomizationV1Beta2
2184
+ */
2185
+ export class KustomizationV1Beta2 extends ApiObject {
2186
+ /**
2187
+ * Returns the apiVersion and kind for "KustomizationV1Beta2"
2188
+ */
2189
+ public static readonly GVK: GroupVersionKind = {
2190
+ apiVersion: 'kustomize.toolkit.fluxcd.io/v1beta2',
2191
+ kind: 'Kustomization',
2192
+ }
2193
+
2194
+ /**
2195
+ * Renders a Kubernetes manifest for "KustomizationV1Beta2".
2196
+ *
2197
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
2198
+ *
2199
+ * @param props initialization props
2200
+ */
2201
+ public static manifest(props: KustomizationV1Beta2Props = {}): any {
2202
+ return {
2203
+ ...KustomizationV1Beta2.GVK,
2204
+ ...toJson_KustomizationV1Beta2Props(props),
2205
+ };
2206
+ }
2207
+
2208
+ /**
2209
+ * Defines a "KustomizationV1Beta2" API object
2210
+ * @param scope the scope in which to define this object
2211
+ * @param id a scope-local name for the object
2212
+ * @param props initialization props
2213
+ */
2214
+ public constructor(scope: Construct, id: string, props: KustomizationV1Beta2Props = {}) {
2215
+ super(scope, id, {
2216
+ ...KustomizationV1Beta2.GVK,
2217
+ ...props,
2218
+ });
2219
+ }
2220
+
2221
+ /**
2222
+ * Renders the object to Kubernetes JSON.
2223
+ */
2224
+ public toJson(): any {
2225
+ const resolved = super.toJson();
2226
+
2227
+ return {
2228
+ ...KustomizationV1Beta2.GVK,
2229
+ ...toJson_KustomizationV1Beta2Props(resolved),
2230
+ };
2231
+ }
2232
+ }
2233
+
2234
+ /**
2235
+ * Kustomization is the Schema for the kustomizations API.
2236
+ *
2237
+ * @schema KustomizationV1Beta2
2238
+ */
2239
+ export interface KustomizationV1Beta2Props {
2240
+ /**
2241
+ * @schema KustomizationV1Beta2#metadata
2242
+ */
2243
+ readonly metadata?: ApiObjectMetadata;
2244
+
2245
+ /**
2246
+ * KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
2247
+ *
2248
+ * @schema KustomizationV1Beta2#spec
2249
+ */
2250
+ readonly spec?: KustomizationV1Beta2Spec;
2251
+
2252
+ }
2253
+
2254
+ /**
2255
+ * Converts an object of type 'KustomizationV1Beta2Props' to JSON representation.
2256
+ */
2257
+ /* eslint-disable max-len, quote-props */
2258
+ export function toJson_KustomizationV1Beta2Props(obj: KustomizationV1Beta2Props | undefined): Record<string, any> | undefined {
2259
+ if (obj === undefined) { return undefined; }
2260
+ const result = {
2261
+ 'metadata': obj.metadata,
2262
+ 'spec': toJson_KustomizationV1Beta2Spec(obj.spec),
2263
+ };
2264
+ // filter undefined values
2265
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2266
+ }
2267
+ /* eslint-enable max-len, quote-props */
2268
+
2269
+ /**
2270
+ * KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
2271
+ *
2272
+ * @schema KustomizationV1Beta2Spec
2273
+ */
2274
+ export interface KustomizationV1Beta2Spec {
2275
+ /**
2276
+ * CommonMetadata specifies the common labels and annotations that are applied to all resources.
2277
+ * Any existing label or annotation will be overridden if its key matches a common one.
2278
+ *
2279
+ * @schema KustomizationV1Beta2Spec#commonMetadata
2280
+ */
2281
+ readonly commonMetadata?: KustomizationV1Beta2SpecCommonMetadata;
2282
+
2283
+ /**
2284
+ * Components specifies relative paths to specifications of other Components.
2285
+ *
2286
+ * @schema KustomizationV1Beta2Spec#components
2287
+ */
2288
+ readonly components?: string[];
2289
+
2290
+ /**
2291
+ * Decrypt Kubernetes secrets before applying them on the cluster.
2292
+ *
2293
+ * @schema KustomizationV1Beta2Spec#decryption
2294
+ */
2295
+ readonly decryption?: KustomizationV1Beta2SpecDecryption;
2296
+
2297
+ /**
2298
+ * DependsOn may contain a meta.NamespacedObjectReference slice
2299
+ * with references to Kustomization resources that must be ready before this
2300
+ * Kustomization can be reconciled.
2301
+ *
2302
+ * @schema KustomizationV1Beta2Spec#dependsOn
2303
+ */
2304
+ readonly dependsOn?: KustomizationV1Beta2SpecDependsOn[];
2305
+
2306
+ /**
2307
+ * Force instructs the controller to recreate resources
2308
+ * when patching fails due to an immutable field change.
2309
+ *
2310
+ * @schema KustomizationV1Beta2Spec#force
2311
+ */
2312
+ readonly force?: boolean;
2313
+
2314
+ /**
2315
+ * A list of resources to be included in the health assessment.
2316
+ *
2317
+ * @schema KustomizationV1Beta2Spec#healthChecks
2318
+ */
2319
+ readonly healthChecks?: KustomizationV1Beta2SpecHealthChecks[];
2320
+
2321
+ /**
2322
+ * Images is a list of (image name, new name, new tag or digest)
2323
+ * for changing image names, tags or digests. This can also be achieved with a
2324
+ * patch, but this operator is simpler to specify.
2325
+ *
2326
+ * @schema KustomizationV1Beta2Spec#images
2327
+ */
2328
+ readonly images?: KustomizationV1Beta2SpecImages[];
2329
+
2330
+ /**
2331
+ * The interval at which to reconcile the Kustomization.
2332
+ *
2333
+ * @schema KustomizationV1Beta2Spec#interval
2334
+ */
2335
+ readonly interval: string;
2336
+
2337
+ /**
2338
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
2339
+ * When used in combination with KustomizationSpec.ServiceAccountName,
2340
+ * forces the controller to act on behalf of that Service Account at the
2341
+ * target cluster.
2342
+ * If the --default-service-account flag is set, its value will be used as
2343
+ * a controller level fallback for when KustomizationSpec.ServiceAccountName
2344
+ * is empty.
2345
+ *
2346
+ * @schema KustomizationV1Beta2Spec#kubeConfig
2347
+ */
2348
+ readonly kubeConfig?: KustomizationV1Beta2SpecKubeConfig;
2349
+
2350
+ /**
2351
+ * Strategic merge and JSON patches, defined as inline YAML objects,
2352
+ * capable of targeting objects based on kind, label and annotation selectors.
2353
+ *
2354
+ * @schema KustomizationV1Beta2Spec#patches
2355
+ */
2356
+ readonly patches?: KustomizationV1Beta2SpecPatches[];
2357
+
2358
+ /**
2359
+ * JSON 6902 patches, defined as inline YAML objects.
2360
+ * Deprecated: Use Patches instead.
2361
+ *
2362
+ * @schema KustomizationV1Beta2Spec#patchesJson6902
2363
+ */
2364
+ readonly patchesJson6902?: KustomizationV1Beta2SpecPatchesJson6902[];
2365
+
2366
+ /**
2367
+ * Strategic merge patches, defined as inline YAML objects.
2368
+ * Deprecated: Use Patches instead.
2369
+ *
2370
+ * @schema KustomizationV1Beta2Spec#patchesStrategicMerge
2371
+ */
2372
+ readonly patchesStrategicMerge?: any[];
2373
+
2374
+ /**
2375
+ * Path to the directory containing the kustomization.yaml file, or the
2376
+ * set of plain YAMLs a kustomization.yaml should be generated for.
2377
+ * Defaults to 'None', which translates to the root path of the SourceRef.
2378
+ *
2379
+ * @default None', which translates to the root path of the SourceRef.
2380
+ * @schema KustomizationV1Beta2Spec#path
2381
+ */
2382
+ readonly path?: string;
2383
+
2384
+ /**
2385
+ * PostBuild describes which actions to perform on the YAML manifest
2386
+ * generated by building the kustomize overlay.
2387
+ *
2388
+ * @schema KustomizationV1Beta2Spec#postBuild
2389
+ */
2390
+ readonly postBuild?: KustomizationV1Beta2SpecPostBuild;
2391
+
2392
+ /**
2393
+ * Prune enables garbage collection.
2394
+ *
2395
+ * @schema KustomizationV1Beta2Spec#prune
2396
+ */
2397
+ readonly prune: boolean;
2398
+
2399
+ /**
2400
+ * The interval at which to retry a previously failed reconciliation.
2401
+ * When not specified, the controller uses the KustomizationSpec.Interval
2402
+ * value to retry failures.
2403
+ *
2404
+ * @schema KustomizationV1Beta2Spec#retryInterval
2405
+ */
2406
+ readonly retryInterval?: string;
2407
+
2408
+ /**
2409
+ * The name of the Kubernetes service account to impersonate
2410
+ * when reconciling this Kustomization.
2411
+ *
2412
+ * @schema KustomizationV1Beta2Spec#serviceAccountName
2413
+ */
2414
+ readonly serviceAccountName?: string;
2415
+
2416
+ /**
2417
+ * Reference of the source where the kustomization file is.
2418
+ *
2419
+ * @schema KustomizationV1Beta2Spec#sourceRef
2420
+ */
2421
+ readonly sourceRef: KustomizationV1Beta2SpecSourceRef;
2422
+
2423
+ /**
2424
+ * This flag tells the controller to suspend subsequent kustomize executions,
2425
+ * it does not apply to already started executions. Defaults to false.
2426
+ *
2427
+ * @default false.
2428
+ * @schema KustomizationV1Beta2Spec#suspend
2429
+ */
2430
+ readonly suspend?: boolean;
2431
+
2432
+ /**
2433
+ * TargetNamespace sets or overrides the namespace in the
2434
+ * kustomization.yaml file.
2435
+ *
2436
+ * @schema KustomizationV1Beta2Spec#targetNamespace
2437
+ */
2438
+ readonly targetNamespace?: string;
2439
+
2440
+ /**
2441
+ * Timeout for validation, apply and health checking operations.
2442
+ * Defaults to 'Interval' duration.
2443
+ *
2444
+ * @default Interval' duration.
2445
+ * @schema KustomizationV1Beta2Spec#timeout
2446
+ */
2447
+ readonly timeout?: string;
2448
+
2449
+ /**
2450
+ * Deprecated: Not used in v1beta2.
2451
+ *
2452
+ * @schema KustomizationV1Beta2Spec#validation
2453
+ */
2454
+ readonly validation?: KustomizationV1Beta2SpecValidation;
2455
+
2456
+ /**
2457
+ * Wait instructs the controller to check the health of all the reconciled resources.
2458
+ * When enabled, the HealthChecks are ignored. Defaults to false.
2459
+ *
2460
+ * @default false.
2461
+ * @schema KustomizationV1Beta2Spec#wait
2462
+ */
2463
+ readonly wait?: boolean;
2464
+
2465
+ }
2466
+
2467
+ /**
2468
+ * Converts an object of type 'KustomizationV1Beta2Spec' to JSON representation.
2469
+ */
2470
+ /* eslint-disable max-len, quote-props */
2471
+ export function toJson_KustomizationV1Beta2Spec(obj: KustomizationV1Beta2Spec | undefined): Record<string, any> | undefined {
2472
+ if (obj === undefined) { return undefined; }
2473
+ const result = {
2474
+ 'commonMetadata': toJson_KustomizationV1Beta2SpecCommonMetadata(obj.commonMetadata),
2475
+ 'components': obj.components?.map(y => y),
2476
+ 'decryption': toJson_KustomizationV1Beta2SpecDecryption(obj.decryption),
2477
+ 'dependsOn': obj.dependsOn?.map(y => toJson_KustomizationV1Beta2SpecDependsOn(y)),
2478
+ 'force': obj.force,
2479
+ 'healthChecks': obj.healthChecks?.map(y => toJson_KustomizationV1Beta2SpecHealthChecks(y)),
2480
+ 'images': obj.images?.map(y => toJson_KustomizationV1Beta2SpecImages(y)),
2481
+ 'interval': obj.interval,
2482
+ 'kubeConfig': toJson_KustomizationV1Beta2SpecKubeConfig(obj.kubeConfig),
2483
+ 'patches': obj.patches?.map(y => toJson_KustomizationV1Beta2SpecPatches(y)),
2484
+ 'patchesJson6902': obj.patchesJson6902?.map(y => toJson_KustomizationV1Beta2SpecPatchesJson6902(y)),
2485
+ 'patchesStrategicMerge': obj.patchesStrategicMerge?.map(y => y),
2486
+ 'path': obj.path,
2487
+ 'postBuild': toJson_KustomizationV1Beta2SpecPostBuild(obj.postBuild),
2488
+ 'prune': obj.prune,
2489
+ 'retryInterval': obj.retryInterval,
2490
+ 'serviceAccountName': obj.serviceAccountName,
2491
+ 'sourceRef': toJson_KustomizationV1Beta2SpecSourceRef(obj.sourceRef),
2492
+ 'suspend': obj.suspend,
2493
+ 'targetNamespace': obj.targetNamespace,
2494
+ 'timeout': obj.timeout,
2495
+ 'validation': obj.validation,
2496
+ 'wait': obj.wait,
2497
+ };
2498
+ // filter undefined values
2499
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2500
+ }
2501
+ /* eslint-enable max-len, quote-props */
2502
+
2503
+ /**
2504
+ * CommonMetadata specifies the common labels and annotations that are applied to all resources.
2505
+ * Any existing label or annotation will be overridden if its key matches a common one.
2506
+ *
2507
+ * @schema KustomizationV1Beta2SpecCommonMetadata
2508
+ */
2509
+ export interface KustomizationV1Beta2SpecCommonMetadata {
2510
+ /**
2511
+ * Annotations to be added to the object's metadata.
2512
+ *
2513
+ * @schema KustomizationV1Beta2SpecCommonMetadata#annotations
2514
+ */
2515
+ readonly annotations?: { [key: string]: string };
2516
+
2517
+ /**
2518
+ * Labels to be added to the object's metadata.
2519
+ *
2520
+ * @schema KustomizationV1Beta2SpecCommonMetadata#labels
2521
+ */
2522
+ readonly labels?: { [key: string]: string };
2523
+
2524
+ }
2525
+
2526
+ /**
2527
+ * Converts an object of type 'KustomizationV1Beta2SpecCommonMetadata' to JSON representation.
2528
+ */
2529
+ /* eslint-disable max-len, quote-props */
2530
+ export function toJson_KustomizationV1Beta2SpecCommonMetadata(obj: KustomizationV1Beta2SpecCommonMetadata | undefined): Record<string, any> | undefined {
2531
+ if (obj === undefined) { return undefined; }
2532
+ const result = {
2533
+ 'annotations': ((obj.annotations) === undefined) ? undefined : (Object.entries(obj.annotations).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
2534
+ 'labels': ((obj.labels) === undefined) ? undefined : (Object.entries(obj.labels).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
2535
+ };
2536
+ // filter undefined values
2537
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2538
+ }
2539
+ /* eslint-enable max-len, quote-props */
2540
+
2541
+ /**
2542
+ * Decrypt Kubernetes secrets before applying them on the cluster.
2543
+ *
2544
+ * @schema KustomizationV1Beta2SpecDecryption
2545
+ */
2546
+ export interface KustomizationV1Beta2SpecDecryption {
2547
+ /**
2548
+ * Provider is the name of the decryption engine.
2549
+ *
2550
+ * @schema KustomizationV1Beta2SpecDecryption#provider
2551
+ */
2552
+ readonly provider: KustomizationV1Beta2SpecDecryptionProvider;
2553
+
2554
+ /**
2555
+ * The secret name containing the private OpenPGP keys used for decryption.
2556
+ *
2557
+ * @schema KustomizationV1Beta2SpecDecryption#secretRef
2558
+ */
2559
+ readonly secretRef?: KustomizationV1Beta2SpecDecryptionSecretRef;
2560
+
2561
+ }
2562
+
2563
+ /**
2564
+ * Converts an object of type 'KustomizationV1Beta2SpecDecryption' to JSON representation.
2565
+ */
2566
+ /* eslint-disable max-len, quote-props */
2567
+ export function toJson_KustomizationV1Beta2SpecDecryption(obj: KustomizationV1Beta2SpecDecryption | undefined): Record<string, any> | undefined {
2568
+ if (obj === undefined) { return undefined; }
2569
+ const result = {
2570
+ 'provider': obj.provider,
2571
+ 'secretRef': toJson_KustomizationV1Beta2SpecDecryptionSecretRef(obj.secretRef),
2572
+ };
2573
+ // filter undefined values
2574
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2575
+ }
2576
+ /* eslint-enable max-len, quote-props */
2577
+
2578
+ /**
2579
+ * NamespacedObjectReference contains enough information to locate the referenced Kubernetes resource object in any
2580
+ * namespace.
2581
+ *
2582
+ * @schema KustomizationV1Beta2SpecDependsOn
2583
+ */
2584
+ export interface KustomizationV1Beta2SpecDependsOn {
2585
+ /**
2586
+ * Name of the referent.
2587
+ *
2588
+ * @schema KustomizationV1Beta2SpecDependsOn#name
2589
+ */
2590
+ readonly name: string;
2591
+
2592
+ /**
2593
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
2594
+ *
2595
+ * @schema KustomizationV1Beta2SpecDependsOn#namespace
2596
+ */
2597
+ readonly namespace?: string;
2598
+
2599
+ }
2600
+
2601
+ /**
2602
+ * Converts an object of type 'KustomizationV1Beta2SpecDependsOn' to JSON representation.
2603
+ */
2604
+ /* eslint-disable max-len, quote-props */
2605
+ export function toJson_KustomizationV1Beta2SpecDependsOn(obj: KustomizationV1Beta2SpecDependsOn | undefined): Record<string, any> | undefined {
2606
+ if (obj === undefined) { return undefined; }
2607
+ const result = {
2608
+ 'name': obj.name,
2609
+ 'namespace': obj.namespace,
2610
+ };
2611
+ // filter undefined values
2612
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2613
+ }
2614
+ /* eslint-enable max-len, quote-props */
2615
+
2616
+ /**
2617
+ * NamespacedObjectKindReference contains enough information to locate the typed referenced Kubernetes resource object
2618
+ * in any namespace.
2619
+ *
2620
+ * @schema KustomizationV1Beta2SpecHealthChecks
2621
+ */
2622
+ export interface KustomizationV1Beta2SpecHealthChecks {
2623
+ /**
2624
+ * API version of the referent, if not specified the Kubernetes preferred version will be used.
2625
+ *
2626
+ * @schema KustomizationV1Beta2SpecHealthChecks#apiVersion
2627
+ */
2628
+ readonly apiVersion?: string;
2629
+
2630
+ /**
2631
+ * Kind of the referent.
2632
+ *
2633
+ * @schema KustomizationV1Beta2SpecHealthChecks#kind
2634
+ */
2635
+ readonly kind: string;
2636
+
2637
+ /**
2638
+ * Name of the referent.
2639
+ *
2640
+ * @schema KustomizationV1Beta2SpecHealthChecks#name
2641
+ */
2642
+ readonly name: string;
2643
+
2644
+ /**
2645
+ * Namespace of the referent, when not specified it acts as LocalObjectReference.
2646
+ *
2647
+ * @schema KustomizationV1Beta2SpecHealthChecks#namespace
2648
+ */
2649
+ readonly namespace?: string;
2650
+
2651
+ }
2652
+
2653
+ /**
2654
+ * Converts an object of type 'KustomizationV1Beta2SpecHealthChecks' to JSON representation.
2655
+ */
2656
+ /* eslint-disable max-len, quote-props */
2657
+ export function toJson_KustomizationV1Beta2SpecHealthChecks(obj: KustomizationV1Beta2SpecHealthChecks | undefined): Record<string, any> | undefined {
2658
+ if (obj === undefined) { return undefined; }
2659
+ const result = {
2660
+ 'apiVersion': obj.apiVersion,
2661
+ 'kind': obj.kind,
2662
+ 'name': obj.name,
2663
+ 'namespace': obj.namespace,
2664
+ };
2665
+ // filter undefined values
2666
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2667
+ }
2668
+ /* eslint-enable max-len, quote-props */
2669
+
2670
+ /**
2671
+ * Image contains an image name, a new name, a new tag or digest, which will replace the original name and tag.
2672
+ *
2673
+ * @schema KustomizationV1Beta2SpecImages
2674
+ */
2675
+ export interface KustomizationV1Beta2SpecImages {
2676
+ /**
2677
+ * Digest is the value used to replace the original image tag.
2678
+ * If digest is present NewTag value is ignored.
2679
+ *
2680
+ * @schema KustomizationV1Beta2SpecImages#digest
2681
+ */
2682
+ readonly digest?: string;
2683
+
2684
+ /**
2685
+ * Name is a tag-less image name.
2686
+ *
2687
+ * @schema KustomizationV1Beta2SpecImages#name
2688
+ */
2689
+ readonly name: string;
2690
+
2691
+ /**
2692
+ * NewName is the value used to replace the original name.
2693
+ *
2694
+ * @schema KustomizationV1Beta2SpecImages#newName
2695
+ */
2696
+ readonly newName?: string;
2697
+
2698
+ /**
2699
+ * NewTag is the value used to replace the original tag.
2700
+ *
2701
+ * @schema KustomizationV1Beta2SpecImages#newTag
2702
+ */
2703
+ readonly newTag?: string;
2704
+
2705
+ }
2706
+
2707
+ /**
2708
+ * Converts an object of type 'KustomizationV1Beta2SpecImages' to JSON representation.
2709
+ */
2710
+ /* eslint-disable max-len, quote-props */
2711
+ export function toJson_KustomizationV1Beta2SpecImages(obj: KustomizationV1Beta2SpecImages | undefined): Record<string, any> | undefined {
2712
+ if (obj === undefined) { return undefined; }
2713
+ const result = {
2714
+ 'digest': obj.digest,
2715
+ 'name': obj.name,
2716
+ 'newName': obj.newName,
2717
+ 'newTag': obj.newTag,
2718
+ };
2719
+ // filter undefined values
2720
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2721
+ }
2722
+ /* eslint-enable max-len, quote-props */
2723
+
2724
+ /**
2725
+ * The KubeConfig for reconciling the Kustomization on a remote cluster.
2726
+ * When used in combination with KustomizationSpec.ServiceAccountName,
2727
+ * forces the controller to act on behalf of that Service Account at the
2728
+ * target cluster.
2729
+ * If the --default-service-account flag is set, its value will be used as
2730
+ * a controller level fallback for when KustomizationSpec.ServiceAccountName
2731
+ * is empty.
2732
+ *
2733
+ * @schema KustomizationV1Beta2SpecKubeConfig
2734
+ */
2735
+ export interface KustomizationV1Beta2SpecKubeConfig {
2736
+ /**
2737
+ * SecretRef holds the name of a secret that contains a key with
2738
+ * the kubeconfig file as the value. If no key is set, the key will default
2739
+ * to 'value'.
2740
+ * It is recommended that the kubeconfig is self-contained, and the secret
2741
+ * is regularly updated if credentials such as a cloud-access-token expire.
2742
+ * Cloud specific `cmd-path` auth helpers will not function without adding
2743
+ * binaries and credentials to the Pod that is responsible for reconciling
2744
+ * Kubernetes resources.
2745
+ *
2746
+ * @schema KustomizationV1Beta2SpecKubeConfig#secretRef
2747
+ */
2748
+ readonly secretRef: KustomizationV1Beta2SpecKubeConfigSecretRef;
2749
+
2750
+ }
2751
+
2752
+ /**
2753
+ * Converts an object of type 'KustomizationV1Beta2SpecKubeConfig' to JSON representation.
2754
+ */
2755
+ /* eslint-disable max-len, quote-props */
2756
+ export function toJson_KustomizationV1Beta2SpecKubeConfig(obj: KustomizationV1Beta2SpecKubeConfig | undefined): Record<string, any> | undefined {
2757
+ if (obj === undefined) { return undefined; }
2758
+ const result = {
2759
+ 'secretRef': toJson_KustomizationV1Beta2SpecKubeConfigSecretRef(obj.secretRef),
2760
+ };
2761
+ // filter undefined values
2762
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2763
+ }
2764
+ /* eslint-enable max-len, quote-props */
2765
+
2766
+ /**
2767
+ * Patch contains an inline StrategicMerge or JSON6902 patch, and the target the patch should
2768
+ * be applied to.
2769
+ *
2770
+ * @schema KustomizationV1Beta2SpecPatches
2771
+ */
2772
+ export interface KustomizationV1Beta2SpecPatches {
2773
+ /**
2774
+ * Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with
2775
+ * an array of operation objects.
2776
+ *
2777
+ * @schema KustomizationV1Beta2SpecPatches#patch
2778
+ */
2779
+ readonly patch: string;
2780
+
2781
+ /**
2782
+ * Target points to the resources that the patch document should be applied to.
2783
+ *
2784
+ * @schema KustomizationV1Beta2SpecPatches#target
2785
+ */
2786
+ readonly target?: KustomizationV1Beta2SpecPatchesTarget;
2787
+
2788
+ }
2789
+
2790
+ /**
2791
+ * Converts an object of type 'KustomizationV1Beta2SpecPatches' to JSON representation.
2792
+ */
2793
+ /* eslint-disable max-len, quote-props */
2794
+ export function toJson_KustomizationV1Beta2SpecPatches(obj: KustomizationV1Beta2SpecPatches | undefined): Record<string, any> | undefined {
2795
+ if (obj === undefined) { return undefined; }
2796
+ const result = {
2797
+ 'patch': obj.patch,
2798
+ 'target': toJson_KustomizationV1Beta2SpecPatchesTarget(obj.target),
2799
+ };
2800
+ // filter undefined values
2801
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2802
+ }
2803
+ /* eslint-enable max-len, quote-props */
2804
+
2805
+ /**
2806
+ * JSON6902Patch contains a JSON6902 patch and the target the patch should be applied to.
2807
+ *
2808
+ * @schema KustomizationV1Beta2SpecPatchesJson6902
2809
+ */
2810
+ export interface KustomizationV1Beta2SpecPatchesJson6902 {
2811
+ /**
2812
+ * Patch contains the JSON6902 patch document with an array of operation objects.
2813
+ *
2814
+ * @schema KustomizationV1Beta2SpecPatchesJson6902#patch
2815
+ */
2816
+ readonly patch: KustomizationV1Beta2SpecPatchesJson6902Patch[];
2817
+
2818
+ /**
2819
+ * Target points to the resources that the patch document should be applied to.
2820
+ *
2821
+ * @schema KustomizationV1Beta2SpecPatchesJson6902#target
2822
+ */
2823
+ readonly target: KustomizationV1Beta2SpecPatchesJson6902Target;
2824
+
2825
+ }
2826
+
2827
+ /**
2828
+ * Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902' to JSON representation.
2829
+ */
2830
+ /* eslint-disable max-len, quote-props */
2831
+ export function toJson_KustomizationV1Beta2SpecPatchesJson6902(obj: KustomizationV1Beta2SpecPatchesJson6902 | undefined): Record<string, any> | undefined {
2832
+ if (obj === undefined) { return undefined; }
2833
+ const result = {
2834
+ 'patch': obj.patch?.map(y => toJson_KustomizationV1Beta2SpecPatchesJson6902Patch(y)),
2835
+ 'target': toJson_KustomizationV1Beta2SpecPatchesJson6902Target(obj.target),
2836
+ };
2837
+ // filter undefined values
2838
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2839
+ }
2840
+ /* eslint-enable max-len, quote-props */
2841
+
2842
+ /**
2843
+ * PostBuild describes which actions to perform on the YAML manifest
2844
+ * generated by building the kustomize overlay.
2845
+ *
2846
+ * @schema KustomizationV1Beta2SpecPostBuild
2847
+ */
2848
+ export interface KustomizationV1Beta2SpecPostBuild {
2849
+ /**
2850
+ * Substitute holds a map of key/value pairs.
2851
+ * The variables defined in your YAML manifests
2852
+ * that match any of the keys defined in the map
2853
+ * will be substituted with the set value.
2854
+ * Includes support for bash string replacement functions
2855
+ * e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
2856
+ *
2857
+ * @schema KustomizationV1Beta2SpecPostBuild#substitute
2858
+ */
2859
+ readonly substitute?: { [key: string]: string };
2860
+
2861
+ /**
2862
+ * SubstituteFrom holds references to ConfigMaps and Secrets containing
2863
+ * the variables and their values to be substituted in the YAML manifests.
2864
+ * The ConfigMap and the Secret data keys represent the var names and they
2865
+ * must match the vars declared in the manifests for the substitution to happen.
2866
+ *
2867
+ * @schema KustomizationV1Beta2SpecPostBuild#substituteFrom
2868
+ */
2869
+ readonly substituteFrom?: KustomizationV1Beta2SpecPostBuildSubstituteFrom[];
2870
+
2871
+ }
2872
+
2873
+ /**
2874
+ * Converts an object of type 'KustomizationV1Beta2SpecPostBuild' to JSON representation.
2875
+ */
2876
+ /* eslint-disable max-len, quote-props */
2877
+ export function toJson_KustomizationV1Beta2SpecPostBuild(obj: KustomizationV1Beta2SpecPostBuild | undefined): Record<string, any> | undefined {
2878
+ if (obj === undefined) { return undefined; }
2879
+ const result = {
2880
+ 'substitute': ((obj.substitute) === undefined) ? undefined : (Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})),
2881
+ 'substituteFrom': obj.substituteFrom?.map(y => toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom(y)),
2882
+ };
2883
+ // filter undefined values
2884
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2885
+ }
2886
+ /* eslint-enable max-len, quote-props */
2887
+
2888
+ /**
2889
+ * Reference of the source where the kustomization file is.
2890
+ *
2891
+ * @schema KustomizationV1Beta2SpecSourceRef
2892
+ */
2893
+ export interface KustomizationV1Beta2SpecSourceRef {
2894
+ /**
2895
+ * API version of the referent.
2896
+ *
2897
+ * @schema KustomizationV1Beta2SpecSourceRef#apiVersion
2898
+ */
2899
+ readonly apiVersion?: string;
2900
+
2901
+ /**
2902
+ * Kind of the referent.
2903
+ *
2904
+ * @schema KustomizationV1Beta2SpecSourceRef#kind
2905
+ */
2906
+ readonly kind: KustomizationV1Beta2SpecSourceRefKind;
2907
+
2908
+ /**
2909
+ * Name of the referent.
2910
+ *
2911
+ * @schema KustomizationV1Beta2SpecSourceRef#name
2912
+ */
2913
+ readonly name: string;
2914
+
2915
+ /**
2916
+ * Namespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.
2917
+ *
2918
+ * @schema KustomizationV1Beta2SpecSourceRef#namespace
2919
+ */
2920
+ readonly namespace?: string;
2921
+
2922
+ }
2923
+
2924
+ /**
2925
+ * Converts an object of type 'KustomizationV1Beta2SpecSourceRef' to JSON representation.
2926
+ */
2927
+ /* eslint-disable max-len, quote-props */
2928
+ export function toJson_KustomizationV1Beta2SpecSourceRef(obj: KustomizationV1Beta2SpecSourceRef | undefined): Record<string, any> | undefined {
2929
+ if (obj === undefined) { return undefined; }
2930
+ const result = {
2931
+ 'apiVersion': obj.apiVersion,
2932
+ 'kind': obj.kind,
2933
+ 'name': obj.name,
2934
+ 'namespace': obj.namespace,
2935
+ };
2936
+ // filter undefined values
2937
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2938
+ }
2939
+ /* eslint-enable max-len, quote-props */
2940
+
2941
+ /**
2942
+ * Deprecated: Not used in v1beta2.
2943
+ *
2944
+ * @schema KustomizationV1Beta2SpecValidation
2945
+ */
2946
+ export enum KustomizationV1Beta2SpecValidation {
2947
+ /** none */
2948
+ NONE = "none",
2949
+ /** client */
2950
+ CLIENT = "client",
2951
+ /** server */
2952
+ SERVER = "server",
2953
+ }
2954
+
2955
+ /**
2956
+ * Provider is the name of the decryption engine.
2957
+ *
2958
+ * @schema KustomizationV1Beta2SpecDecryptionProvider
2959
+ */
2960
+ export enum KustomizationV1Beta2SpecDecryptionProvider {
2961
+ /** sops */
2962
+ SOPS = "sops",
2963
+ }
2964
+
2965
+ /**
2966
+ * The secret name containing the private OpenPGP keys used for decryption.
2967
+ *
2968
+ * @schema KustomizationV1Beta2SpecDecryptionSecretRef
2969
+ */
2970
+ export interface KustomizationV1Beta2SpecDecryptionSecretRef {
2971
+ /**
2972
+ * Name of the referent.
2973
+ *
2974
+ * @schema KustomizationV1Beta2SpecDecryptionSecretRef#name
2975
+ */
2976
+ readonly name: string;
2977
+
2978
+ }
2979
+
2980
+ /**
2981
+ * Converts an object of type 'KustomizationV1Beta2SpecDecryptionSecretRef' to JSON representation.
2982
+ */
2983
+ /* eslint-disable max-len, quote-props */
2984
+ export function toJson_KustomizationV1Beta2SpecDecryptionSecretRef(obj: KustomizationV1Beta2SpecDecryptionSecretRef | undefined): Record<string, any> | undefined {
2985
+ if (obj === undefined) { return undefined; }
2986
+ const result = {
2987
+ 'name': obj.name,
2988
+ };
2989
+ // filter undefined values
2990
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
2991
+ }
2992
+ /* eslint-enable max-len, quote-props */
2993
+
2994
+ /**
2995
+ * SecretRef holds the name of a secret that contains a key with
2996
+ * the kubeconfig file as the value. If no key is set, the key will default
2997
+ * to 'value'.
2998
+ * It is recommended that the kubeconfig is self-contained, and the secret
2999
+ * is regularly updated if credentials such as a cloud-access-token expire.
3000
+ * Cloud specific `cmd-path` auth helpers will not function without adding
3001
+ * binaries and credentials to the Pod that is responsible for reconciling
3002
+ * Kubernetes resources.
3003
+ *
3004
+ * @schema KustomizationV1Beta2SpecKubeConfigSecretRef
3005
+ */
3006
+ export interface KustomizationV1Beta2SpecKubeConfigSecretRef {
3007
+ /**
3008
+ * Key in the Secret, when not specified an implementation-specific default key is used.
3009
+ *
3010
+ * @schema KustomizationV1Beta2SpecKubeConfigSecretRef#key
3011
+ */
3012
+ readonly key?: string;
3013
+
3014
+ /**
3015
+ * Name of the Secret.
3016
+ *
3017
+ * @schema KustomizationV1Beta2SpecKubeConfigSecretRef#name
3018
+ */
3019
+ readonly name: string;
3020
+
3021
+ }
3022
+
3023
+ /**
3024
+ * Converts an object of type 'KustomizationV1Beta2SpecKubeConfigSecretRef' to JSON representation.
3025
+ */
3026
+ /* eslint-disable max-len, quote-props */
3027
+ export function toJson_KustomizationV1Beta2SpecKubeConfigSecretRef(obj: KustomizationV1Beta2SpecKubeConfigSecretRef | undefined): Record<string, any> | undefined {
3028
+ if (obj === undefined) { return undefined; }
3029
+ const result = {
3030
+ 'key': obj.key,
3031
+ 'name': obj.name,
3032
+ };
3033
+ // filter undefined values
3034
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
3035
+ }
3036
+ /* eslint-enable max-len, quote-props */
3037
+
3038
+ /**
3039
+ * Target points to the resources that the patch document should be applied to.
3040
+ *
3041
+ * @schema KustomizationV1Beta2SpecPatchesTarget
3042
+ */
3043
+ export interface KustomizationV1Beta2SpecPatchesTarget {
3044
+ /**
3045
+ * AnnotationSelector is a string that follows the label selection expression
3046
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3047
+ * It matches with the resource annotations.
3048
+ *
3049
+ * @schema KustomizationV1Beta2SpecPatchesTarget#annotationSelector
3050
+ */
3051
+ readonly annotationSelector?: string;
3052
+
3053
+ /**
3054
+ * Group is the API group to select resources from.
3055
+ * Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources.
3056
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3057
+ *
3058
+ * @schema KustomizationV1Beta2SpecPatchesTarget#group
3059
+ */
3060
+ readonly group?: string;
3061
+
3062
+ /**
3063
+ * Kind of the API Group to select resources from.
3064
+ * Together with Group and Version it is capable of unambiguously
3065
+ * identifying and/or selecting resources.
3066
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3067
+ *
3068
+ * @schema KustomizationV1Beta2SpecPatchesTarget#kind
3069
+ */
3070
+ readonly kind?: string;
3071
+
3072
+ /**
3073
+ * LabelSelector is a string that follows the label selection expression
3074
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3075
+ * It matches with the resource labels.
3076
+ *
3077
+ * @schema KustomizationV1Beta2SpecPatchesTarget#labelSelector
3078
+ */
3079
+ readonly labelSelector?: string;
3080
+
3081
+ /**
3082
+ * Name to match resources with.
3083
+ *
3084
+ * @schema KustomizationV1Beta2SpecPatchesTarget#name
3085
+ */
3086
+ readonly name?: string;
3087
+
3088
+ /**
3089
+ * Namespace to select resources from.
3090
+ *
3091
+ * @schema KustomizationV1Beta2SpecPatchesTarget#namespace
3092
+ */
3093
+ readonly namespace?: string;
3094
+
3095
+ /**
3096
+ * Version of the API Group to select resources from.
3097
+ * Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources.
3098
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3099
+ *
3100
+ * @schema KustomizationV1Beta2SpecPatchesTarget#version
3101
+ */
3102
+ readonly version?: string;
3103
+
3104
+ }
3105
+
3106
+ /**
3107
+ * Converts an object of type 'KustomizationV1Beta2SpecPatchesTarget' to JSON representation.
3108
+ */
3109
+ /* eslint-disable max-len, quote-props */
3110
+ export function toJson_KustomizationV1Beta2SpecPatchesTarget(obj: KustomizationV1Beta2SpecPatchesTarget | undefined): Record<string, any> | undefined {
3111
+ if (obj === undefined) { return undefined; }
3112
+ const result = {
3113
+ 'annotationSelector': obj.annotationSelector,
3114
+ 'group': obj.group,
3115
+ 'kind': obj.kind,
3116
+ 'labelSelector': obj.labelSelector,
3117
+ 'name': obj.name,
3118
+ 'namespace': obj.namespace,
3119
+ 'version': obj.version,
3120
+ };
3121
+ // filter undefined values
3122
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
3123
+ }
3124
+ /* eslint-enable max-len, quote-props */
3125
+
3126
+ /**
3127
+ * JSON6902 is a JSON6902 operation object.
3128
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
3129
+ *
3130
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Patch
3131
+ */
3132
+ export interface KustomizationV1Beta2SpecPatchesJson6902Patch {
3133
+ /**
3134
+ * From contains a JSON-pointer value that references a location within the target document where the operation is
3135
+ * performed. The meaning of the value depends on the value of Op, and is NOT taken into account by all operations.
3136
+ *
3137
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Patch#from
3138
+ */
3139
+ readonly from?: string;
3140
+
3141
+ /**
3142
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or
3143
+ * "test".
3144
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
3145
+ *
3146
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Patch#op
3147
+ */
3148
+ readonly op: KustomizationV1Beta2SpecPatchesJson6902PatchOp;
3149
+
3150
+ /**
3151
+ * Path contains the JSON-pointer value that references a location within the target document where the operation
3152
+ * is performed. The meaning of the value depends on the value of Op.
3153
+ *
3154
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Patch#path
3155
+ */
3156
+ readonly path: string;
3157
+
3158
+ /**
3159
+ * Value contains a valid JSON structure. The meaning of the value depends on the value of Op, and is NOT taken into
3160
+ * account by all operations.
3161
+ *
3162
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Patch#value
3163
+ */
3164
+ readonly value?: any;
3165
+
3166
+ }
3167
+
3168
+ /**
3169
+ * Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902Patch' to JSON representation.
3170
+ */
3171
+ /* eslint-disable max-len, quote-props */
3172
+ export function toJson_KustomizationV1Beta2SpecPatchesJson6902Patch(obj: KustomizationV1Beta2SpecPatchesJson6902Patch | undefined): Record<string, any> | undefined {
3173
+ if (obj === undefined) { return undefined; }
3174
+ const result = {
3175
+ 'from': obj.from,
3176
+ 'op': obj.op,
3177
+ 'path': obj.path,
3178
+ 'value': obj.value,
3179
+ };
3180
+ // filter undefined values
3181
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
3182
+ }
3183
+ /* eslint-enable max-len, quote-props */
3184
+
3185
+ /**
3186
+ * Target points to the resources that the patch document should be applied to.
3187
+ *
3188
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target
3189
+ */
3190
+ export interface KustomizationV1Beta2SpecPatchesJson6902Target {
3191
+ /**
3192
+ * AnnotationSelector is a string that follows the label selection expression
3193
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3194
+ * It matches with the resource annotations.
3195
+ *
3196
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#annotationSelector
3197
+ */
3198
+ readonly annotationSelector?: string;
3199
+
3200
+ /**
3201
+ * Group is the API group to select resources from.
3202
+ * Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources.
3203
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3204
+ *
3205
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#group
3206
+ */
3207
+ readonly group?: string;
3208
+
3209
+ /**
3210
+ * Kind of the API Group to select resources from.
3211
+ * Together with Group and Version it is capable of unambiguously
3212
+ * identifying and/or selecting resources.
3213
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3214
+ *
3215
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#kind
3216
+ */
3217
+ readonly kind?: string;
3218
+
3219
+ /**
3220
+ * LabelSelector is a string that follows the label selection expression
3221
+ * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3222
+ * It matches with the resource labels.
3223
+ *
3224
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#labelSelector
3225
+ */
3226
+ readonly labelSelector?: string;
3227
+
3228
+ /**
3229
+ * Name to match resources with.
3230
+ *
3231
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#name
3232
+ */
3233
+ readonly name?: string;
3234
+
3235
+ /**
3236
+ * Namespace to select resources from.
3237
+ *
3238
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#namespace
3239
+ */
3240
+ readonly namespace?: string;
3241
+
3242
+ /**
3243
+ * Version of the API Group to select resources from.
3244
+ * Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources.
3245
+ * https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
3246
+ *
3247
+ * @schema KustomizationV1Beta2SpecPatchesJson6902Target#version
3248
+ */
3249
+ readonly version?: string;
3250
+
3251
+ }
3252
+
3253
+ /**
3254
+ * Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902Target' to JSON representation.
3255
+ */
3256
+ /* eslint-disable max-len, quote-props */
3257
+ export function toJson_KustomizationV1Beta2SpecPatchesJson6902Target(obj: KustomizationV1Beta2SpecPatchesJson6902Target | undefined): Record<string, any> | undefined {
3258
+ if (obj === undefined) { return undefined; }
3259
+ const result = {
3260
+ 'annotationSelector': obj.annotationSelector,
3261
+ 'group': obj.group,
3262
+ 'kind': obj.kind,
3263
+ 'labelSelector': obj.labelSelector,
3264
+ 'name': obj.name,
3265
+ 'namespace': obj.namespace,
3266
+ 'version': obj.version,
3267
+ };
3268
+ // filter undefined values
3269
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
3270
+ }
3271
+ /* eslint-enable max-len, quote-props */
3272
+
3273
+ /**
3274
+ * SubstituteReference contains a reference to a resource containing
3275
+ * the variables name and value.
3276
+ *
3277
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFrom
3278
+ */
3279
+ export interface KustomizationV1Beta2SpecPostBuildSubstituteFrom {
3280
+ /**
3281
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
3282
+ *
3283
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFrom#kind
3284
+ */
3285
+ readonly kind: KustomizationV1Beta2SpecPostBuildSubstituteFromKind;
3286
+
3287
+ /**
3288
+ * Name of the values referent. Should reside in the same namespace as the
3289
+ * referring resource.
3290
+ *
3291
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFrom#name
3292
+ */
3293
+ readonly name: string;
3294
+
3295
+ /**
3296
+ * Optional indicates whether the referenced resource must exist, or whether to
3297
+ * tolerate its absence. If true and the referenced resource is absent, proceed
3298
+ * as if the resource was present but empty, without any variables defined.
3299
+ *
3300
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFrom#optional
3301
+ */
3302
+ readonly optional?: boolean;
3303
+
3304
+ }
3305
+
3306
+ /**
3307
+ * Converts an object of type 'KustomizationV1Beta2SpecPostBuildSubstituteFrom' to JSON representation.
3308
+ */
3309
+ /* eslint-disable max-len, quote-props */
3310
+ export function toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom(obj: KustomizationV1Beta2SpecPostBuildSubstituteFrom | undefined): Record<string, any> | undefined {
3311
+ if (obj === undefined) { return undefined; }
3312
+ const result = {
3313
+ 'kind': obj.kind,
3314
+ 'name': obj.name,
3315
+ 'optional': obj.optional,
3316
+ };
3317
+ // filter undefined values
3318
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
3319
+ }
3320
+ /* eslint-enable max-len, quote-props */
3321
+
3322
+ /**
3323
+ * Kind of the referent.
3324
+ *
3325
+ * @schema KustomizationV1Beta2SpecSourceRefKind
3326
+ */
3327
+ export enum KustomizationV1Beta2SpecSourceRefKind {
3328
+ /** OCIRepository */
3329
+ OCI_REPOSITORY = "OCIRepository",
3330
+ /** GitRepository */
3331
+ GIT_REPOSITORY = "GitRepository",
3332
+ /** Bucket */
3333
+ BUCKET = "Bucket",
3334
+ }
3335
+
3336
+ /**
3337
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or
3338
+ * "test".
3339
+ * https://datatracker.ietf.org/doc/html/rfc6902#section-4
3340
+ *
3341
+ * @schema KustomizationV1Beta2SpecPatchesJson6902PatchOp
3342
+ */
3343
+ export enum KustomizationV1Beta2SpecPatchesJson6902PatchOp {
3344
+ /** test */
3345
+ TEST = "test",
3346
+ /** remove */
3347
+ REMOVE = "remove",
3348
+ /** add */
3349
+ ADD = "add",
3350
+ /** replace */
3351
+ REPLACE = "replace",
3352
+ /** move */
3353
+ MOVE = "move",
3354
+ /** copy */
3355
+ COPY = "copy",
3356
+ }
3357
+
3358
+ /**
3359
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
3360
+ *
3361
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFromKind
3362
+ */
3363
+ export enum KustomizationV1Beta2SpecPostBuildSubstituteFromKind {
3364
+ /** Secret */
3365
+ SECRET = "Secret",
3366
+ /** ConfigMap */
3367
+ CONFIG_MAP = "ConfigMap",
3368
+ }
3369
+