@k8ts/sample-interfaces 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/_mix.d.ts +4 -0
  2. package/dist/_mix.d.ts.map +1 -0
  3. package/dist/_mix.js +7 -0
  4. package/dist/_mix.js.map +1 -0
  5. package/dist/acme.cert-manager.io.d.ts +4832 -0
  6. package/dist/acme.cert-manager.io.d.ts.map +1 -0
  7. package/dist/acme.cert-manager.io.js +2476 -0
  8. package/dist/acme.cert-manager.io.js.map +1 -0
  9. package/dist/gateway.networking.k8s.io.d.ts +8786 -0
  10. package/dist/gateway.networking.k8s.io.d.ts.map +1 -0
  11. package/dist/gateway.networking.k8s.io.js +3668 -0
  12. package/dist/gateway.networking.k8s.io.js.map +1 -0
  13. package/dist/helm.toolkit.fluxcd.io.d.ts +4560 -0
  14. package/dist/helm.toolkit.fluxcd.io.d.ts.map +1 -0
  15. package/dist/helm.toolkit.fluxcd.io.js +2274 -0
  16. package/dist/helm.toolkit.fluxcd.io.js.map +1 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +38 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/k8s.d.ts +18772 -0
  22. package/dist/k8s.d.ts.map +1 -0
  23. package/dist/k8s.js +12173 -0
  24. package/dist/k8s.js.map +1 -0
  25. package/dist/kustomize.toolkit.fluxcd.io.d.ts +2202 -0
  26. package/dist/kustomize.toolkit.fluxcd.io.d.ts.map +1 -0
  27. package/dist/kustomize.toolkit.fluxcd.io.js +1196 -0
  28. package/dist/kustomize.toolkit.fluxcd.io.js.map +1 -0
  29. package/dist/notification.toolkit.fluxcd.io.d.ts +1851 -0
  30. package/dist/notification.toolkit.fluxcd.io.d.ts.map +1 -0
  31. package/dist/notification.toolkit.fluxcd.io.js +1489 -0
  32. package/dist/notification.toolkit.fluxcd.io.js.map +1 -0
  33. package/dist/source.toolkit.fluxcd.io.d.ts +3733 -0
  34. package/dist/source.toolkit.fluxcd.io.d.ts.map +1 -0
  35. package/dist/source.toolkit.fluxcd.io.js +2539 -0
  36. package/dist/source.toolkit.fluxcd.io.js.map +1 -0
  37. package/package.json +68 -0
  38. package/src/_mix.ts +3 -0
  39. package/src/acme.cert-manager.io.ts +8202 -0
  40. package/src/gateway.networking.k8s.io.ts +12226 -0
  41. package/src/helm.toolkit.fluxcd.io.ts +7010 -0
  42. package/src/index.ts +1 -0
  43. package/src/k8s.ts +31018 -0
  44. package/src/kustomize.toolkit.fluxcd.io.ts +3560 -0
  45. package/src/notification.toolkit.fluxcd.io.ts +2944 -0
  46. package/src/source.toolkit.fluxcd.io.ts +6277 -0
  47. package/tsconfig.json +12 -0
@@ -0,0 +1,1196 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KustomizationV1Beta2SpecPostBuildSubstituteFromKind = exports.KustomizationV1Beta2SpecPatchesJson6902PatchOp = exports.KustomizationV1Beta2SpecSourceRefKind = exports.KustomizationV1Beta2SpecDecryptionProvider = exports.KustomizationV1Beta2SpecValidation = exports.KustomizationV1Beta2 = exports.KustomizationV1Beta1SpecPostBuildSubstituteFromKind = exports.KustomizationV1Beta1SpecPatchesJson6902PatchOp = exports.KustomizationV1Beta1SpecSourceRefKind = exports.KustomizationV1Beta1SpecDecryptionProvider = exports.KustomizationV1Beta1SpecValidation = exports.KustomizationV1Beta1 = exports.KustomizationSpecPostBuildSubstituteFromKind = exports.KustomizationSpecSourceRefKind = exports.KustomizationSpecDecryptionProvider = exports.KustomizationSpecDeletionPolicy = exports.Kustomization = void 0;
4
+ exports.toJson_KustomizationProps = toJson_KustomizationProps;
5
+ exports.toJson_KustomizationSpec = toJson_KustomizationSpec;
6
+ exports.toJson_KustomizationSpecCommonMetadata = toJson_KustomizationSpecCommonMetadata;
7
+ exports.toJson_KustomizationSpecDecryption = toJson_KustomizationSpecDecryption;
8
+ exports.toJson_KustomizationSpecDependsOn = toJson_KustomizationSpecDependsOn;
9
+ exports.toJson_KustomizationSpecHealthCheckExprs = toJson_KustomizationSpecHealthCheckExprs;
10
+ exports.toJson_KustomizationSpecHealthChecks = toJson_KustomizationSpecHealthChecks;
11
+ exports.toJson_KustomizationSpecImages = toJson_KustomizationSpecImages;
12
+ exports.toJson_KustomizationSpecKubeConfig = toJson_KustomizationSpecKubeConfig;
13
+ exports.toJson_KustomizationSpecPatches = toJson_KustomizationSpecPatches;
14
+ exports.toJson_KustomizationSpecPostBuild = toJson_KustomizationSpecPostBuild;
15
+ exports.toJson_KustomizationSpecSourceRef = toJson_KustomizationSpecSourceRef;
16
+ exports.toJson_KustomizationSpecDecryptionSecretRef = toJson_KustomizationSpecDecryptionSecretRef;
17
+ exports.toJson_KustomizationSpecKubeConfigSecretRef = toJson_KustomizationSpecKubeConfigSecretRef;
18
+ exports.toJson_KustomizationSpecPatchesTarget = toJson_KustomizationSpecPatchesTarget;
19
+ exports.toJson_KustomizationSpecPostBuildSubstituteFrom = toJson_KustomizationSpecPostBuildSubstituteFrom;
20
+ exports.toJson_KustomizationV1Beta1Props = toJson_KustomizationV1Beta1Props;
21
+ exports.toJson_KustomizationV1Beta1Spec = toJson_KustomizationV1Beta1Spec;
22
+ exports.toJson_KustomizationV1Beta1SpecDecryption = toJson_KustomizationV1Beta1SpecDecryption;
23
+ exports.toJson_KustomizationV1Beta1SpecDependsOn = toJson_KustomizationV1Beta1SpecDependsOn;
24
+ exports.toJson_KustomizationV1Beta1SpecHealthChecks = toJson_KustomizationV1Beta1SpecHealthChecks;
25
+ exports.toJson_KustomizationV1Beta1SpecImages = toJson_KustomizationV1Beta1SpecImages;
26
+ exports.toJson_KustomizationV1Beta1SpecKubeConfig = toJson_KustomizationV1Beta1SpecKubeConfig;
27
+ exports.toJson_KustomizationV1Beta1SpecPatches = toJson_KustomizationV1Beta1SpecPatches;
28
+ exports.toJson_KustomizationV1Beta1SpecPatchesJson6902 = toJson_KustomizationV1Beta1SpecPatchesJson6902;
29
+ exports.toJson_KustomizationV1Beta1SpecPostBuild = toJson_KustomizationV1Beta1SpecPostBuild;
30
+ exports.toJson_KustomizationV1Beta1SpecSourceRef = toJson_KustomizationV1Beta1SpecSourceRef;
31
+ exports.toJson_KustomizationV1Beta1SpecDecryptionSecretRef = toJson_KustomizationV1Beta1SpecDecryptionSecretRef;
32
+ exports.toJson_KustomizationV1Beta1SpecKubeConfigSecretRef = toJson_KustomizationV1Beta1SpecKubeConfigSecretRef;
33
+ exports.toJson_KustomizationV1Beta1SpecPatchesTarget = toJson_KustomizationV1Beta1SpecPatchesTarget;
34
+ exports.toJson_KustomizationV1Beta1SpecPatchesJson6902Patch = toJson_KustomizationV1Beta1SpecPatchesJson6902Patch;
35
+ exports.toJson_KustomizationV1Beta1SpecPatchesJson6902Target = toJson_KustomizationV1Beta1SpecPatchesJson6902Target;
36
+ exports.toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom = toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom;
37
+ exports.toJson_KustomizationV1Beta2Props = toJson_KustomizationV1Beta2Props;
38
+ exports.toJson_KustomizationV1Beta2Spec = toJson_KustomizationV1Beta2Spec;
39
+ exports.toJson_KustomizationV1Beta2SpecCommonMetadata = toJson_KustomizationV1Beta2SpecCommonMetadata;
40
+ exports.toJson_KustomizationV1Beta2SpecDecryption = toJson_KustomizationV1Beta2SpecDecryption;
41
+ exports.toJson_KustomizationV1Beta2SpecDependsOn = toJson_KustomizationV1Beta2SpecDependsOn;
42
+ exports.toJson_KustomizationV1Beta2SpecHealthChecks = toJson_KustomizationV1Beta2SpecHealthChecks;
43
+ exports.toJson_KustomizationV1Beta2SpecImages = toJson_KustomizationV1Beta2SpecImages;
44
+ exports.toJson_KustomizationV1Beta2SpecKubeConfig = toJson_KustomizationV1Beta2SpecKubeConfig;
45
+ exports.toJson_KustomizationV1Beta2SpecPatches = toJson_KustomizationV1Beta2SpecPatches;
46
+ exports.toJson_KustomizationV1Beta2SpecPatchesJson6902 = toJson_KustomizationV1Beta2SpecPatchesJson6902;
47
+ exports.toJson_KustomizationV1Beta2SpecPostBuild = toJson_KustomizationV1Beta2SpecPostBuild;
48
+ exports.toJson_KustomizationV1Beta2SpecSourceRef = toJson_KustomizationV1Beta2SpecSourceRef;
49
+ exports.toJson_KustomizationV1Beta2SpecDecryptionSecretRef = toJson_KustomizationV1Beta2SpecDecryptionSecretRef;
50
+ exports.toJson_KustomizationV1Beta2SpecKubeConfigSecretRef = toJson_KustomizationV1Beta2SpecKubeConfigSecretRef;
51
+ exports.toJson_KustomizationV1Beta2SpecPatchesTarget = toJson_KustomizationV1Beta2SpecPatchesTarget;
52
+ exports.toJson_KustomizationV1Beta2SpecPatchesJson6902Patch = toJson_KustomizationV1Beta2SpecPatchesJson6902Patch;
53
+ exports.toJson_KustomizationV1Beta2SpecPatchesJson6902Target = toJson_KustomizationV1Beta2SpecPatchesJson6902Target;
54
+ exports.toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom = toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom;
55
+ // generated by cdk8s
56
+ const cdk8s_1 = require("cdk8s");
57
+ /**
58
+ * Kustomization is the Schema for the kustomizations API.
59
+ *
60
+ * @schema Kustomization
61
+ */
62
+ class Kustomization extends cdk8s_1.ApiObject {
63
+ /**
64
+ * Renders a Kubernetes manifest for "Kustomization".
65
+ *
66
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
67
+ *
68
+ * @param props Initialization props
69
+ */
70
+ static manifest(props = {}) {
71
+ return {
72
+ ...Kustomization.GVK,
73
+ ...toJson_KustomizationProps(props)
74
+ };
75
+ }
76
+ /**
77
+ * Defines a "Kustomization" API object
78
+ *
79
+ * @param scope The scope in which to define this object
80
+ * @param id A scope-local name for the object
81
+ * @param props Initialization props
82
+ */
83
+ constructor(scope, id, props = {}) {
84
+ super(scope, id, {
85
+ ...Kustomization.GVK,
86
+ ...props
87
+ });
88
+ }
89
+ /** Renders the object to Kubernetes JSON. */
90
+ toJson() {
91
+ const resolved = super.toJson();
92
+ return {
93
+ ...Kustomization.GVK,
94
+ ...toJson_KustomizationProps(resolved)
95
+ };
96
+ }
97
+ }
98
+ exports.Kustomization = Kustomization;
99
+ /** Returns the apiVersion and kind for "Kustomization" */
100
+ Kustomization.GVK = {
101
+ apiVersion: "kustomize.toolkit.fluxcd.io/v1",
102
+ kind: "Kustomization"
103
+ };
104
+ /** Converts an object of type 'KustomizationProps' to JSON representation. */
105
+ /* eslint-disable max-len, quote-props */
106
+ function toJson_KustomizationProps(obj) {
107
+ if (obj === undefined) {
108
+ return undefined;
109
+ }
110
+ const result = {
111
+ metadata: obj.metadata,
112
+ spec: toJson_KustomizationSpec(obj.spec)
113
+ };
114
+ // filter undefined values
115
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
116
+ }
117
+ /** Converts an object of type 'KustomizationSpec' to JSON representation. */
118
+ /* eslint-disable max-len, quote-props */
119
+ function toJson_KustomizationSpec(obj) {
120
+ if (obj === undefined) {
121
+ return undefined;
122
+ }
123
+ const result = {
124
+ commonMetadata: toJson_KustomizationSpecCommonMetadata(obj.commonMetadata),
125
+ components: obj.components?.map(y => y),
126
+ decryption: toJson_KustomizationSpecDecryption(obj.decryption),
127
+ deletionPolicy: obj.deletionPolicy,
128
+ dependsOn: obj.dependsOn?.map(y => toJson_KustomizationSpecDependsOn(y)),
129
+ force: obj.force,
130
+ healthCheckExprs: obj.healthCheckExprs?.map(y => toJson_KustomizationSpecHealthCheckExprs(y)),
131
+ healthChecks: obj.healthChecks?.map(y => toJson_KustomizationSpecHealthChecks(y)),
132
+ images: obj.images?.map(y => toJson_KustomizationSpecImages(y)),
133
+ interval: obj.interval,
134
+ kubeConfig: toJson_KustomizationSpecKubeConfig(obj.kubeConfig),
135
+ namePrefix: obj.namePrefix,
136
+ nameSuffix: obj.nameSuffix,
137
+ patches: obj.patches?.map(y => toJson_KustomizationSpecPatches(y)),
138
+ path: obj.path,
139
+ postBuild: toJson_KustomizationSpecPostBuild(obj.postBuild),
140
+ prune: obj.prune,
141
+ retryInterval: obj.retryInterval,
142
+ serviceAccountName: obj.serviceAccountName,
143
+ sourceRef: toJson_KustomizationSpecSourceRef(obj.sourceRef),
144
+ suspend: obj.suspend,
145
+ targetNamespace: obj.targetNamespace,
146
+ timeout: obj.timeout,
147
+ wait: obj.wait
148
+ };
149
+ // filter undefined values
150
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
151
+ }
152
+ /** Converts an object of type 'KustomizationSpecCommonMetadata' to JSON representation. */
153
+ /* eslint-disable max-len, quote-props */
154
+ function toJson_KustomizationSpecCommonMetadata(obj) {
155
+ if (obj === undefined) {
156
+ return undefined;
157
+ }
158
+ const result = {
159
+ annotations: obj.annotations === undefined
160
+ ? undefined
161
+ : Object.entries(obj.annotations).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {}),
162
+ labels: obj.labels === undefined
163
+ ? undefined
164
+ : Object.entries(obj.labels).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {})
165
+ };
166
+ // filter undefined values
167
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
168
+ }
169
+ /** Converts an object of type 'KustomizationSpecDecryption' to JSON representation. */
170
+ /* eslint-disable max-len, quote-props */
171
+ function toJson_KustomizationSpecDecryption(obj) {
172
+ if (obj === undefined) {
173
+ return undefined;
174
+ }
175
+ const result = {
176
+ provider: obj.provider,
177
+ secretRef: toJson_KustomizationSpecDecryptionSecretRef(obj.secretRef)
178
+ };
179
+ // filter undefined values
180
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
181
+ }
182
+ /* eslint-enable max-len, quote-props */
183
+ /**
184
+ * DeletionPolicy can be used to control garbage collection when this Kustomization is deleted.
185
+ * Valid values are ('MirrorPrune', 'Delete', 'Orphan'). 'MirrorPrune' mirrors the Prune field
186
+ * (orphan if false, delete if true). Defaults to 'MirrorPrune'.
187
+ *
188
+ * @default MirrorPrune'.
189
+ * @schema KustomizationSpecDeletionPolicy
190
+ */
191
+ var KustomizationSpecDeletionPolicy;
192
+ (function (KustomizationSpecDeletionPolicy) {
193
+ /** MirrorPrune */
194
+ KustomizationSpecDeletionPolicy["MIRROR_PRUNE"] = "MirrorPrune";
195
+ /** Delete */
196
+ KustomizationSpecDeletionPolicy["DELETE"] = "Delete";
197
+ /** Orphan */
198
+ KustomizationSpecDeletionPolicy["ORPHAN"] = "Orphan";
199
+ })(KustomizationSpecDeletionPolicy || (exports.KustomizationSpecDeletionPolicy = KustomizationSpecDeletionPolicy = {}));
200
+ /** Converts an object of type 'KustomizationSpecDependsOn' to JSON representation. */
201
+ /* eslint-disable max-len, quote-props */
202
+ function toJson_KustomizationSpecDependsOn(obj) {
203
+ if (obj === undefined) {
204
+ return undefined;
205
+ }
206
+ const result = {
207
+ name: obj.name,
208
+ namespace: obj.namespace
209
+ };
210
+ // filter undefined values
211
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
212
+ }
213
+ /** Converts an object of type 'KustomizationSpecHealthCheckExprs' to JSON representation. */
214
+ /* eslint-disable max-len, quote-props */
215
+ function toJson_KustomizationSpecHealthCheckExprs(obj) {
216
+ if (obj === undefined) {
217
+ return undefined;
218
+ }
219
+ const result = {
220
+ apiVersion: obj.apiVersion,
221
+ current: obj.current,
222
+ failed: obj.failed,
223
+ inProgress: obj.inProgress,
224
+ kind: obj.kind
225
+ };
226
+ // filter undefined values
227
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
228
+ }
229
+ /** Converts an object of type 'KustomizationSpecHealthChecks' to JSON representation. */
230
+ /* eslint-disable max-len, quote-props */
231
+ function toJson_KustomizationSpecHealthChecks(obj) {
232
+ if (obj === undefined) {
233
+ return undefined;
234
+ }
235
+ const result = {
236
+ apiVersion: obj.apiVersion,
237
+ kind: obj.kind,
238
+ name: obj.name,
239
+ namespace: obj.namespace
240
+ };
241
+ // filter undefined values
242
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
243
+ }
244
+ /** Converts an object of type 'KustomizationSpecImages' to JSON representation. */
245
+ /* eslint-disable max-len, quote-props */
246
+ function toJson_KustomizationSpecImages(obj) {
247
+ if (obj === undefined) {
248
+ return undefined;
249
+ }
250
+ const result = {
251
+ digest: obj.digest,
252
+ name: obj.name,
253
+ newName: obj.newName,
254
+ newTag: obj.newTag
255
+ };
256
+ // filter undefined values
257
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
258
+ }
259
+ /** Converts an object of type 'KustomizationSpecKubeConfig' to JSON representation. */
260
+ /* eslint-disable max-len, quote-props */
261
+ function toJson_KustomizationSpecKubeConfig(obj) {
262
+ if (obj === undefined) {
263
+ return undefined;
264
+ }
265
+ const result = {
266
+ secretRef: toJson_KustomizationSpecKubeConfigSecretRef(obj.secretRef)
267
+ };
268
+ // filter undefined values
269
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
270
+ }
271
+ /** Converts an object of type 'KustomizationSpecPatches' to JSON representation. */
272
+ /* eslint-disable max-len, quote-props */
273
+ function toJson_KustomizationSpecPatches(obj) {
274
+ if (obj === undefined) {
275
+ return undefined;
276
+ }
277
+ const result = {
278
+ patch: obj.patch,
279
+ target: toJson_KustomizationSpecPatchesTarget(obj.target)
280
+ };
281
+ // filter undefined values
282
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
283
+ }
284
+ /** Converts an object of type 'KustomizationSpecPostBuild' to JSON representation. */
285
+ /* eslint-disable max-len, quote-props */
286
+ function toJson_KustomizationSpecPostBuild(obj) {
287
+ if (obj === undefined) {
288
+ return undefined;
289
+ }
290
+ const result = {
291
+ substitute: obj.substitute === undefined
292
+ ? undefined
293
+ : Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {}),
294
+ substituteFrom: obj.substituteFrom?.map(y => toJson_KustomizationSpecPostBuildSubstituteFrom(y))
295
+ };
296
+ // filter undefined values
297
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
298
+ }
299
+ /** Converts an object of type 'KustomizationSpecSourceRef' to JSON representation. */
300
+ /* eslint-disable max-len, quote-props */
301
+ function toJson_KustomizationSpecSourceRef(obj) {
302
+ if (obj === undefined) {
303
+ return undefined;
304
+ }
305
+ const result = {
306
+ apiVersion: obj.apiVersion,
307
+ kind: obj.kind,
308
+ name: obj.name,
309
+ namespace: obj.namespace
310
+ };
311
+ // filter undefined values
312
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
313
+ }
314
+ /* eslint-enable max-len, quote-props */
315
+ /**
316
+ * Provider is the name of the decryption engine.
317
+ *
318
+ * @schema KustomizationSpecDecryptionProvider
319
+ */
320
+ var KustomizationSpecDecryptionProvider;
321
+ (function (KustomizationSpecDecryptionProvider) {
322
+ /** Sops */
323
+ KustomizationSpecDecryptionProvider["SOPS"] = "sops";
324
+ })(KustomizationSpecDecryptionProvider || (exports.KustomizationSpecDecryptionProvider = KustomizationSpecDecryptionProvider = {}));
325
+ /** Converts an object of type 'KustomizationSpecDecryptionSecretRef' to JSON representation. */
326
+ /* eslint-disable max-len, quote-props */
327
+ function toJson_KustomizationSpecDecryptionSecretRef(obj) {
328
+ if (obj === undefined) {
329
+ return undefined;
330
+ }
331
+ const result = {
332
+ name: obj.name
333
+ };
334
+ // filter undefined values
335
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
336
+ }
337
+ /** Converts an object of type 'KustomizationSpecKubeConfigSecretRef' to JSON representation. */
338
+ /* eslint-disable max-len, quote-props */
339
+ function toJson_KustomizationSpecKubeConfigSecretRef(obj) {
340
+ if (obj === undefined) {
341
+ return undefined;
342
+ }
343
+ const result = {
344
+ key: obj.key,
345
+ name: obj.name
346
+ };
347
+ // filter undefined values
348
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
349
+ }
350
+ /** Converts an object of type 'KustomizationSpecPatchesTarget' to JSON representation. */
351
+ /* eslint-disable max-len, quote-props */
352
+ function toJson_KustomizationSpecPatchesTarget(obj) {
353
+ if (obj === undefined) {
354
+ return undefined;
355
+ }
356
+ const result = {
357
+ annotationSelector: obj.annotationSelector,
358
+ group: obj.group,
359
+ kind: obj.kind,
360
+ labelSelector: obj.labelSelector,
361
+ name: obj.name,
362
+ namespace: obj.namespace,
363
+ version: obj.version
364
+ };
365
+ // filter undefined values
366
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
367
+ }
368
+ /** Converts an object of type 'KustomizationSpecPostBuildSubstituteFrom' to JSON representation. */
369
+ /* eslint-disable max-len, quote-props */
370
+ function toJson_KustomizationSpecPostBuildSubstituteFrom(obj) {
371
+ if (obj === undefined) {
372
+ return undefined;
373
+ }
374
+ const result = {
375
+ kind: obj.kind,
376
+ name: obj.name,
377
+ optional: obj.optional
378
+ };
379
+ // filter undefined values
380
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
381
+ }
382
+ /* eslint-enable max-len, quote-props */
383
+ /**
384
+ * Kind of the referent.
385
+ *
386
+ * @schema KustomizationSpecSourceRefKind
387
+ */
388
+ var KustomizationSpecSourceRefKind;
389
+ (function (KustomizationSpecSourceRefKind) {
390
+ /** OCIRepository */
391
+ KustomizationSpecSourceRefKind["OCI_REPOSITORY"] = "OCIRepository";
392
+ /** GitRepository */
393
+ KustomizationSpecSourceRefKind["GIT_REPOSITORY"] = "GitRepository";
394
+ /** Bucket */
395
+ KustomizationSpecSourceRefKind["BUCKET"] = "Bucket";
396
+ })(KustomizationSpecSourceRefKind || (exports.KustomizationSpecSourceRefKind = KustomizationSpecSourceRefKind = {}));
397
+ /**
398
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
399
+ *
400
+ * @schema KustomizationSpecPostBuildSubstituteFromKind
401
+ */
402
+ var KustomizationSpecPostBuildSubstituteFromKind;
403
+ (function (KustomizationSpecPostBuildSubstituteFromKind) {
404
+ /** Secret */
405
+ KustomizationSpecPostBuildSubstituteFromKind["SECRET"] = "Secret";
406
+ /** ConfigMap */
407
+ KustomizationSpecPostBuildSubstituteFromKind["CONFIG_MAP"] = "ConfigMap";
408
+ })(KustomizationSpecPostBuildSubstituteFromKind || (exports.KustomizationSpecPostBuildSubstituteFromKind = KustomizationSpecPostBuildSubstituteFromKind = {}));
409
+ /**
410
+ * Kustomization is the Schema for the kustomizations API.
411
+ *
412
+ * @schema KustomizationV1Beta1
413
+ */
414
+ class KustomizationV1Beta1 extends cdk8s_1.ApiObject {
415
+ /**
416
+ * Renders a Kubernetes manifest for "KustomizationV1Beta1".
417
+ *
418
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
419
+ *
420
+ * @param props Initialization props
421
+ */
422
+ static manifest(props = {}) {
423
+ return {
424
+ ...KustomizationV1Beta1.GVK,
425
+ ...toJson_KustomizationV1Beta1Props(props)
426
+ };
427
+ }
428
+ /**
429
+ * Defines a "KustomizationV1Beta1" API object
430
+ *
431
+ * @param scope The scope in which to define this object
432
+ * @param id A scope-local name for the object
433
+ * @param props Initialization props
434
+ */
435
+ constructor(scope, id, props = {}) {
436
+ super(scope, id, {
437
+ ...KustomizationV1Beta1.GVK,
438
+ ...props
439
+ });
440
+ }
441
+ /** Renders the object to Kubernetes JSON. */
442
+ toJson() {
443
+ const resolved = super.toJson();
444
+ return {
445
+ ...KustomizationV1Beta1.GVK,
446
+ ...toJson_KustomizationV1Beta1Props(resolved)
447
+ };
448
+ }
449
+ }
450
+ exports.KustomizationV1Beta1 = KustomizationV1Beta1;
451
+ /** Returns the apiVersion and kind for "KustomizationV1Beta1" */
452
+ KustomizationV1Beta1.GVK = {
453
+ apiVersion: "kustomize.toolkit.fluxcd.io/v1beta1",
454
+ kind: "Kustomization"
455
+ };
456
+ /** Converts an object of type 'KustomizationV1Beta1Props' to JSON representation. */
457
+ /* eslint-disable max-len, quote-props */
458
+ function toJson_KustomizationV1Beta1Props(obj) {
459
+ if (obj === undefined) {
460
+ return undefined;
461
+ }
462
+ const result = {
463
+ metadata: obj.metadata,
464
+ spec: toJson_KustomizationV1Beta1Spec(obj.spec)
465
+ };
466
+ // filter undefined values
467
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
468
+ }
469
+ /** Converts an object of type 'KustomizationV1Beta1Spec' to JSON representation. */
470
+ /* eslint-disable max-len, quote-props */
471
+ function toJson_KustomizationV1Beta1Spec(obj) {
472
+ if (obj === undefined) {
473
+ return undefined;
474
+ }
475
+ const result = {
476
+ decryption: toJson_KustomizationV1Beta1SpecDecryption(obj.decryption),
477
+ dependsOn: obj.dependsOn?.map(y => toJson_KustomizationV1Beta1SpecDependsOn(y)),
478
+ force: obj.force,
479
+ healthChecks: obj.healthChecks?.map(y => toJson_KustomizationV1Beta1SpecHealthChecks(y)),
480
+ images: obj.images?.map(y => toJson_KustomizationV1Beta1SpecImages(y)),
481
+ interval: obj.interval,
482
+ kubeConfig: toJson_KustomizationV1Beta1SpecKubeConfig(obj.kubeConfig),
483
+ patches: obj.patches?.map(y => toJson_KustomizationV1Beta1SpecPatches(y)),
484
+ patchesJson6902: obj.patchesJson6902?.map(y => toJson_KustomizationV1Beta1SpecPatchesJson6902(y)),
485
+ patchesStrategicMerge: obj.patchesStrategicMerge?.map(y => y),
486
+ path: obj.path,
487
+ postBuild: toJson_KustomizationV1Beta1SpecPostBuild(obj.postBuild),
488
+ prune: obj.prune,
489
+ retryInterval: obj.retryInterval,
490
+ serviceAccountName: obj.serviceAccountName,
491
+ sourceRef: toJson_KustomizationV1Beta1SpecSourceRef(obj.sourceRef),
492
+ suspend: obj.suspend,
493
+ targetNamespace: obj.targetNamespace,
494
+ timeout: obj.timeout,
495
+ validation: obj.validation
496
+ };
497
+ // filter undefined values
498
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
499
+ }
500
+ /** Converts an object of type 'KustomizationV1Beta1SpecDecryption' to JSON representation. */
501
+ /* eslint-disable max-len, quote-props */
502
+ function toJson_KustomizationV1Beta1SpecDecryption(obj) {
503
+ if (obj === undefined) {
504
+ return undefined;
505
+ }
506
+ const result = {
507
+ provider: obj.provider,
508
+ secretRef: toJson_KustomizationV1Beta1SpecDecryptionSecretRef(obj.secretRef)
509
+ };
510
+ // filter undefined values
511
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
512
+ }
513
+ /** Converts an object of type 'KustomizationV1Beta1SpecDependsOn' to JSON representation. */
514
+ /* eslint-disable max-len, quote-props */
515
+ function toJson_KustomizationV1Beta1SpecDependsOn(obj) {
516
+ if (obj === undefined) {
517
+ return undefined;
518
+ }
519
+ const result = {
520
+ name: obj.name,
521
+ namespace: obj.namespace
522
+ };
523
+ // filter undefined values
524
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
525
+ }
526
+ /** Converts an object of type 'KustomizationV1Beta1SpecHealthChecks' to JSON representation. */
527
+ /* eslint-disable max-len, quote-props */
528
+ function toJson_KustomizationV1Beta1SpecHealthChecks(obj) {
529
+ if (obj === undefined) {
530
+ return undefined;
531
+ }
532
+ const result = {
533
+ apiVersion: obj.apiVersion,
534
+ kind: obj.kind,
535
+ name: obj.name,
536
+ namespace: obj.namespace
537
+ };
538
+ // filter undefined values
539
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
540
+ }
541
+ /** Converts an object of type 'KustomizationV1Beta1SpecImages' to JSON representation. */
542
+ /* eslint-disable max-len, quote-props */
543
+ function toJson_KustomizationV1Beta1SpecImages(obj) {
544
+ if (obj === undefined) {
545
+ return undefined;
546
+ }
547
+ const result = {
548
+ digest: obj.digest,
549
+ name: obj.name,
550
+ newName: obj.newName,
551
+ newTag: obj.newTag
552
+ };
553
+ // filter undefined values
554
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
555
+ }
556
+ /** Converts an object of type 'KustomizationV1Beta1SpecKubeConfig' to JSON representation. */
557
+ /* eslint-disable max-len, quote-props */
558
+ function toJson_KustomizationV1Beta1SpecKubeConfig(obj) {
559
+ if (obj === undefined) {
560
+ return undefined;
561
+ }
562
+ const result = {
563
+ secretRef: toJson_KustomizationV1Beta1SpecKubeConfigSecretRef(obj.secretRef)
564
+ };
565
+ // filter undefined values
566
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
567
+ }
568
+ /** Converts an object of type 'KustomizationV1Beta1SpecPatches' to JSON representation. */
569
+ /* eslint-disable max-len, quote-props */
570
+ function toJson_KustomizationV1Beta1SpecPatches(obj) {
571
+ if (obj === undefined) {
572
+ return undefined;
573
+ }
574
+ const result = {
575
+ patch: obj.patch,
576
+ target: toJson_KustomizationV1Beta1SpecPatchesTarget(obj.target)
577
+ };
578
+ // filter undefined values
579
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
580
+ }
581
+ /** Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902' to JSON representation. */
582
+ /* eslint-disable max-len, quote-props */
583
+ function toJson_KustomizationV1Beta1SpecPatchesJson6902(obj) {
584
+ if (obj === undefined) {
585
+ return undefined;
586
+ }
587
+ const result = {
588
+ patch: obj.patch?.map(y => toJson_KustomizationV1Beta1SpecPatchesJson6902Patch(y)),
589
+ target: toJson_KustomizationV1Beta1SpecPatchesJson6902Target(obj.target)
590
+ };
591
+ // filter undefined values
592
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
593
+ }
594
+ /** Converts an object of type 'KustomizationV1Beta1SpecPostBuild' to JSON representation. */
595
+ /* eslint-disable max-len, quote-props */
596
+ function toJson_KustomizationV1Beta1SpecPostBuild(obj) {
597
+ if (obj === undefined) {
598
+ return undefined;
599
+ }
600
+ const result = {
601
+ substitute: obj.substitute === undefined
602
+ ? undefined
603
+ : Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {}),
604
+ substituteFrom: obj.substituteFrom?.map(y => toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom(y))
605
+ };
606
+ // filter undefined values
607
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
608
+ }
609
+ /** Converts an object of type 'KustomizationV1Beta1SpecSourceRef' to JSON representation. */
610
+ /* eslint-disable max-len, quote-props */
611
+ function toJson_KustomizationV1Beta1SpecSourceRef(obj) {
612
+ if (obj === undefined) {
613
+ return undefined;
614
+ }
615
+ const result = {
616
+ apiVersion: obj.apiVersion,
617
+ kind: obj.kind,
618
+ name: obj.name,
619
+ namespace: obj.namespace
620
+ };
621
+ // filter undefined values
622
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
623
+ }
624
+ /* eslint-enable max-len, quote-props */
625
+ /**
626
+ * Validate the Kubernetes objects before applying them on the cluster. The validation strategy can
627
+ * be 'client' (local dry-run), 'server' (APIServer dry-run) or 'none'. When 'Force' is 'true',
628
+ * validation will fallback to 'client' if set to 'server' because server-side validation is not
629
+ * supported in this scenario.
630
+ *
631
+ * @schema KustomizationV1Beta1SpecValidation
632
+ */
633
+ var KustomizationV1Beta1SpecValidation;
634
+ (function (KustomizationV1Beta1SpecValidation) {
635
+ /** None */
636
+ KustomizationV1Beta1SpecValidation["NONE"] = "none";
637
+ /** Client */
638
+ KustomizationV1Beta1SpecValidation["CLIENT"] = "client";
639
+ /** Server */
640
+ KustomizationV1Beta1SpecValidation["SERVER"] = "server";
641
+ })(KustomizationV1Beta1SpecValidation || (exports.KustomizationV1Beta1SpecValidation = KustomizationV1Beta1SpecValidation = {}));
642
+ /**
643
+ * Provider is the name of the decryption engine.
644
+ *
645
+ * @schema KustomizationV1Beta1SpecDecryptionProvider
646
+ */
647
+ var KustomizationV1Beta1SpecDecryptionProvider;
648
+ (function (KustomizationV1Beta1SpecDecryptionProvider) {
649
+ /** Sops */
650
+ KustomizationV1Beta1SpecDecryptionProvider["SOPS"] = "sops";
651
+ })(KustomizationV1Beta1SpecDecryptionProvider || (exports.KustomizationV1Beta1SpecDecryptionProvider = KustomizationV1Beta1SpecDecryptionProvider = {}));
652
+ /** Converts an object of type 'KustomizationV1Beta1SpecDecryptionSecretRef' to JSON representation. */
653
+ /* eslint-disable max-len, quote-props */
654
+ function toJson_KustomizationV1Beta1SpecDecryptionSecretRef(obj) {
655
+ if (obj === undefined) {
656
+ return undefined;
657
+ }
658
+ const result = {
659
+ name: obj.name
660
+ };
661
+ // filter undefined values
662
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
663
+ }
664
+ /** Converts an object of type 'KustomizationV1Beta1SpecKubeConfigSecretRef' to JSON representation. */
665
+ /* eslint-disable max-len, quote-props */
666
+ function toJson_KustomizationV1Beta1SpecKubeConfigSecretRef(obj) {
667
+ if (obj === undefined) {
668
+ return undefined;
669
+ }
670
+ const result = {
671
+ name: obj.name
672
+ };
673
+ // filter undefined values
674
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
675
+ }
676
+ /** Converts an object of type 'KustomizationV1Beta1SpecPatchesTarget' to JSON representation. */
677
+ /* eslint-disable max-len, quote-props */
678
+ function toJson_KustomizationV1Beta1SpecPatchesTarget(obj) {
679
+ if (obj === undefined) {
680
+ return undefined;
681
+ }
682
+ const result = {
683
+ annotationSelector: obj.annotationSelector,
684
+ group: obj.group,
685
+ kind: obj.kind,
686
+ labelSelector: obj.labelSelector,
687
+ name: obj.name,
688
+ namespace: obj.namespace,
689
+ version: obj.version
690
+ };
691
+ // filter undefined values
692
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
693
+ }
694
+ /** Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902Patch' to JSON representation. */
695
+ /* eslint-disable max-len, quote-props */
696
+ function toJson_KustomizationV1Beta1SpecPatchesJson6902Patch(obj) {
697
+ if (obj === undefined) {
698
+ return undefined;
699
+ }
700
+ const result = {
701
+ from: obj.from,
702
+ op: obj.op,
703
+ path: obj.path,
704
+ value: obj.value
705
+ };
706
+ // filter undefined values
707
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
708
+ }
709
+ /**
710
+ * Converts an object of type 'KustomizationV1Beta1SpecPatchesJson6902Target' to JSON
711
+ * representation.
712
+ */
713
+ /* eslint-disable max-len, quote-props */
714
+ function toJson_KustomizationV1Beta1SpecPatchesJson6902Target(obj) {
715
+ if (obj === undefined) {
716
+ return undefined;
717
+ }
718
+ const result = {
719
+ annotationSelector: obj.annotationSelector,
720
+ group: obj.group,
721
+ kind: obj.kind,
722
+ labelSelector: obj.labelSelector,
723
+ name: obj.name,
724
+ namespace: obj.namespace,
725
+ version: obj.version
726
+ };
727
+ // filter undefined values
728
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
729
+ }
730
+ /**
731
+ * Converts an object of type 'KustomizationV1Beta1SpecPostBuildSubstituteFrom' to JSON
732
+ * representation.
733
+ */
734
+ /* eslint-disable max-len, quote-props */
735
+ function toJson_KustomizationV1Beta1SpecPostBuildSubstituteFrom(obj) {
736
+ if (obj === undefined) {
737
+ return undefined;
738
+ }
739
+ const result = {
740
+ kind: obj.kind,
741
+ name: obj.name
742
+ };
743
+ // filter undefined values
744
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
745
+ }
746
+ /* eslint-enable max-len, quote-props */
747
+ /**
748
+ * Kind of the referent
749
+ *
750
+ * @schema KustomizationV1Beta1SpecSourceRefKind
751
+ */
752
+ var KustomizationV1Beta1SpecSourceRefKind;
753
+ (function (KustomizationV1Beta1SpecSourceRefKind) {
754
+ /** GitRepository */
755
+ KustomizationV1Beta1SpecSourceRefKind["GIT_REPOSITORY"] = "GitRepository";
756
+ /** Bucket */
757
+ KustomizationV1Beta1SpecSourceRefKind["BUCKET"] = "Bucket";
758
+ })(KustomizationV1Beta1SpecSourceRefKind || (exports.KustomizationV1Beta1SpecSourceRefKind = KustomizationV1Beta1SpecSourceRefKind = {}));
759
+ /**
760
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace",
761
+ * "move", "copy", or "test". https://datatracker.ietf.org/doc/html/rfc6902#section-4
762
+ *
763
+ * @schema KustomizationV1Beta1SpecPatchesJson6902PatchOp
764
+ */
765
+ var KustomizationV1Beta1SpecPatchesJson6902PatchOp;
766
+ (function (KustomizationV1Beta1SpecPatchesJson6902PatchOp) {
767
+ /** Test */
768
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["TEST"] = "test";
769
+ /** Remove */
770
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["REMOVE"] = "remove";
771
+ /** Add */
772
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["ADD"] = "add";
773
+ /** Replace */
774
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["REPLACE"] = "replace";
775
+ /** Move */
776
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["MOVE"] = "move";
777
+ /** Copy */
778
+ KustomizationV1Beta1SpecPatchesJson6902PatchOp["COPY"] = "copy";
779
+ })(KustomizationV1Beta1SpecPatchesJson6902PatchOp || (exports.KustomizationV1Beta1SpecPatchesJson6902PatchOp = KustomizationV1Beta1SpecPatchesJson6902PatchOp = {}));
780
+ /**
781
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
782
+ *
783
+ * @schema KustomizationV1Beta1SpecPostBuildSubstituteFromKind
784
+ */
785
+ var KustomizationV1Beta1SpecPostBuildSubstituteFromKind;
786
+ (function (KustomizationV1Beta1SpecPostBuildSubstituteFromKind) {
787
+ /** Secret */
788
+ KustomizationV1Beta1SpecPostBuildSubstituteFromKind["SECRET"] = "Secret";
789
+ /** ConfigMap */
790
+ KustomizationV1Beta1SpecPostBuildSubstituteFromKind["CONFIG_MAP"] = "ConfigMap";
791
+ })(KustomizationV1Beta1SpecPostBuildSubstituteFromKind || (exports.KustomizationV1Beta1SpecPostBuildSubstituteFromKind = KustomizationV1Beta1SpecPostBuildSubstituteFromKind = {}));
792
+ /**
793
+ * Kustomization is the Schema for the kustomizations API.
794
+ *
795
+ * @schema KustomizationV1Beta2
796
+ */
797
+ class KustomizationV1Beta2 extends cdk8s_1.ApiObject {
798
+ /**
799
+ * Renders a Kubernetes manifest for "KustomizationV1Beta2".
800
+ *
801
+ * This can be used to inline resource manifests inside other objects (e.g. as templates).
802
+ *
803
+ * @param props Initialization props
804
+ */
805
+ static manifest(props = {}) {
806
+ return {
807
+ ...KustomizationV1Beta2.GVK,
808
+ ...toJson_KustomizationV1Beta2Props(props)
809
+ };
810
+ }
811
+ /**
812
+ * Defines a "KustomizationV1Beta2" API object
813
+ *
814
+ * @param scope The scope in which to define this object
815
+ * @param id A scope-local name for the object
816
+ * @param props Initialization props
817
+ */
818
+ constructor(scope, id, props = {}) {
819
+ super(scope, id, {
820
+ ...KustomizationV1Beta2.GVK,
821
+ ...props
822
+ });
823
+ }
824
+ /** Renders the object to Kubernetes JSON. */
825
+ toJson() {
826
+ const resolved = super.toJson();
827
+ return {
828
+ ...KustomizationV1Beta2.GVK,
829
+ ...toJson_KustomizationV1Beta2Props(resolved)
830
+ };
831
+ }
832
+ }
833
+ exports.KustomizationV1Beta2 = KustomizationV1Beta2;
834
+ /** Returns the apiVersion and kind for "KustomizationV1Beta2" */
835
+ KustomizationV1Beta2.GVK = {
836
+ apiVersion: "kustomize.toolkit.fluxcd.io/v1beta2",
837
+ kind: "Kustomization"
838
+ };
839
+ /** Converts an object of type 'KustomizationV1Beta2Props' to JSON representation. */
840
+ /* eslint-disable max-len, quote-props */
841
+ function toJson_KustomizationV1Beta2Props(obj) {
842
+ if (obj === undefined) {
843
+ return undefined;
844
+ }
845
+ const result = {
846
+ metadata: obj.metadata,
847
+ spec: toJson_KustomizationV1Beta2Spec(obj.spec)
848
+ };
849
+ // filter undefined values
850
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
851
+ }
852
+ /** Converts an object of type 'KustomizationV1Beta2Spec' to JSON representation. */
853
+ /* eslint-disable max-len, quote-props */
854
+ function toJson_KustomizationV1Beta2Spec(obj) {
855
+ if (obj === undefined) {
856
+ return undefined;
857
+ }
858
+ const result = {
859
+ commonMetadata: toJson_KustomizationV1Beta2SpecCommonMetadata(obj.commonMetadata),
860
+ components: obj.components?.map(y => y),
861
+ decryption: toJson_KustomizationV1Beta2SpecDecryption(obj.decryption),
862
+ dependsOn: obj.dependsOn?.map(y => toJson_KustomizationV1Beta2SpecDependsOn(y)),
863
+ force: obj.force,
864
+ healthChecks: obj.healthChecks?.map(y => toJson_KustomizationV1Beta2SpecHealthChecks(y)),
865
+ images: obj.images?.map(y => toJson_KustomizationV1Beta2SpecImages(y)),
866
+ interval: obj.interval,
867
+ kubeConfig: toJson_KustomizationV1Beta2SpecKubeConfig(obj.kubeConfig),
868
+ patches: obj.patches?.map(y => toJson_KustomizationV1Beta2SpecPatches(y)),
869
+ patchesJson6902: obj.patchesJson6902?.map(y => toJson_KustomizationV1Beta2SpecPatchesJson6902(y)),
870
+ patchesStrategicMerge: obj.patchesStrategicMerge?.map(y => y),
871
+ path: obj.path,
872
+ postBuild: toJson_KustomizationV1Beta2SpecPostBuild(obj.postBuild),
873
+ prune: obj.prune,
874
+ retryInterval: obj.retryInterval,
875
+ serviceAccountName: obj.serviceAccountName,
876
+ sourceRef: toJson_KustomizationV1Beta2SpecSourceRef(obj.sourceRef),
877
+ suspend: obj.suspend,
878
+ targetNamespace: obj.targetNamespace,
879
+ timeout: obj.timeout,
880
+ validation: obj.validation,
881
+ wait: obj.wait
882
+ };
883
+ // filter undefined values
884
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
885
+ }
886
+ /** Converts an object of type 'KustomizationV1Beta2SpecCommonMetadata' to JSON representation. */
887
+ /* eslint-disable max-len, quote-props */
888
+ function toJson_KustomizationV1Beta2SpecCommonMetadata(obj) {
889
+ if (obj === undefined) {
890
+ return undefined;
891
+ }
892
+ const result = {
893
+ annotations: obj.annotations === undefined
894
+ ? undefined
895
+ : Object.entries(obj.annotations).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {}),
896
+ labels: obj.labels === undefined
897
+ ? undefined
898
+ : Object.entries(obj.labels).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {})
899
+ };
900
+ // filter undefined values
901
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
902
+ }
903
+ /** Converts an object of type 'KustomizationV1Beta2SpecDecryption' to JSON representation. */
904
+ /* eslint-disable max-len, quote-props */
905
+ function toJson_KustomizationV1Beta2SpecDecryption(obj) {
906
+ if (obj === undefined) {
907
+ return undefined;
908
+ }
909
+ const result = {
910
+ provider: obj.provider,
911
+ secretRef: toJson_KustomizationV1Beta2SpecDecryptionSecretRef(obj.secretRef)
912
+ };
913
+ // filter undefined values
914
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
915
+ }
916
+ /** Converts an object of type 'KustomizationV1Beta2SpecDependsOn' to JSON representation. */
917
+ /* eslint-disable max-len, quote-props */
918
+ function toJson_KustomizationV1Beta2SpecDependsOn(obj) {
919
+ if (obj === undefined) {
920
+ return undefined;
921
+ }
922
+ const result = {
923
+ name: obj.name,
924
+ namespace: obj.namespace
925
+ };
926
+ // filter undefined values
927
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
928
+ }
929
+ /** Converts an object of type 'KustomizationV1Beta2SpecHealthChecks' to JSON representation. */
930
+ /* eslint-disable max-len, quote-props */
931
+ function toJson_KustomizationV1Beta2SpecHealthChecks(obj) {
932
+ if (obj === undefined) {
933
+ return undefined;
934
+ }
935
+ const result = {
936
+ apiVersion: obj.apiVersion,
937
+ kind: obj.kind,
938
+ name: obj.name,
939
+ namespace: obj.namespace
940
+ };
941
+ // filter undefined values
942
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
943
+ }
944
+ /** Converts an object of type 'KustomizationV1Beta2SpecImages' to JSON representation. */
945
+ /* eslint-disable max-len, quote-props */
946
+ function toJson_KustomizationV1Beta2SpecImages(obj) {
947
+ if (obj === undefined) {
948
+ return undefined;
949
+ }
950
+ const result = {
951
+ digest: obj.digest,
952
+ name: obj.name,
953
+ newName: obj.newName,
954
+ newTag: obj.newTag
955
+ };
956
+ // filter undefined values
957
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
958
+ }
959
+ /** Converts an object of type 'KustomizationV1Beta2SpecKubeConfig' to JSON representation. */
960
+ /* eslint-disable max-len, quote-props */
961
+ function toJson_KustomizationV1Beta2SpecKubeConfig(obj) {
962
+ if (obj === undefined) {
963
+ return undefined;
964
+ }
965
+ const result = {
966
+ secretRef: toJson_KustomizationV1Beta2SpecKubeConfigSecretRef(obj.secretRef)
967
+ };
968
+ // filter undefined values
969
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
970
+ }
971
+ /** Converts an object of type 'KustomizationV1Beta2SpecPatches' to JSON representation. */
972
+ /* eslint-disable max-len, quote-props */
973
+ function toJson_KustomizationV1Beta2SpecPatches(obj) {
974
+ if (obj === undefined) {
975
+ return undefined;
976
+ }
977
+ const result = {
978
+ patch: obj.patch,
979
+ target: toJson_KustomizationV1Beta2SpecPatchesTarget(obj.target)
980
+ };
981
+ // filter undefined values
982
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
983
+ }
984
+ /** Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902' to JSON representation. */
985
+ /* eslint-disable max-len, quote-props */
986
+ function toJson_KustomizationV1Beta2SpecPatchesJson6902(obj) {
987
+ if (obj === undefined) {
988
+ return undefined;
989
+ }
990
+ const result = {
991
+ patch: obj.patch?.map(y => toJson_KustomizationV1Beta2SpecPatchesJson6902Patch(y)),
992
+ target: toJson_KustomizationV1Beta2SpecPatchesJson6902Target(obj.target)
993
+ };
994
+ // filter undefined values
995
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
996
+ }
997
+ /** Converts an object of type 'KustomizationV1Beta2SpecPostBuild' to JSON representation. */
998
+ /* eslint-disable max-len, quote-props */
999
+ function toJson_KustomizationV1Beta2SpecPostBuild(obj) {
1000
+ if (obj === undefined) {
1001
+ return undefined;
1002
+ }
1003
+ const result = {
1004
+ substitute: obj.substitute === undefined
1005
+ ? undefined
1006
+ : Object.entries(obj.substitute).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {}),
1007
+ substituteFrom: obj.substituteFrom?.map(y => toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom(y))
1008
+ };
1009
+ // filter undefined values
1010
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1011
+ }
1012
+ /** Converts an object of type 'KustomizationV1Beta2SpecSourceRef' to JSON representation. */
1013
+ /* eslint-disable max-len, quote-props */
1014
+ function toJson_KustomizationV1Beta2SpecSourceRef(obj) {
1015
+ if (obj === undefined) {
1016
+ return undefined;
1017
+ }
1018
+ const result = {
1019
+ apiVersion: obj.apiVersion,
1020
+ kind: obj.kind,
1021
+ name: obj.name,
1022
+ namespace: obj.namespace
1023
+ };
1024
+ // filter undefined values
1025
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1026
+ }
1027
+ /* eslint-enable max-len, quote-props */
1028
+ /**
1029
+ * Deprecated: Not used in v1beta2.
1030
+ *
1031
+ * @schema KustomizationV1Beta2SpecValidation
1032
+ */
1033
+ var KustomizationV1Beta2SpecValidation;
1034
+ (function (KustomizationV1Beta2SpecValidation) {
1035
+ /** None */
1036
+ KustomizationV1Beta2SpecValidation["NONE"] = "none";
1037
+ /** Client */
1038
+ KustomizationV1Beta2SpecValidation["CLIENT"] = "client";
1039
+ /** Server */
1040
+ KustomizationV1Beta2SpecValidation["SERVER"] = "server";
1041
+ })(KustomizationV1Beta2SpecValidation || (exports.KustomizationV1Beta2SpecValidation = KustomizationV1Beta2SpecValidation = {}));
1042
+ /**
1043
+ * Provider is the name of the decryption engine.
1044
+ *
1045
+ * @schema KustomizationV1Beta2SpecDecryptionProvider
1046
+ */
1047
+ var KustomizationV1Beta2SpecDecryptionProvider;
1048
+ (function (KustomizationV1Beta2SpecDecryptionProvider) {
1049
+ /** Sops */
1050
+ KustomizationV1Beta2SpecDecryptionProvider["SOPS"] = "sops";
1051
+ })(KustomizationV1Beta2SpecDecryptionProvider || (exports.KustomizationV1Beta2SpecDecryptionProvider = KustomizationV1Beta2SpecDecryptionProvider = {}));
1052
+ /** Converts an object of type 'KustomizationV1Beta2SpecDecryptionSecretRef' to JSON representation. */
1053
+ /* eslint-disable max-len, quote-props */
1054
+ function toJson_KustomizationV1Beta2SpecDecryptionSecretRef(obj) {
1055
+ if (obj === undefined) {
1056
+ return undefined;
1057
+ }
1058
+ const result = {
1059
+ name: obj.name
1060
+ };
1061
+ // filter undefined values
1062
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1063
+ }
1064
+ /** Converts an object of type 'KustomizationV1Beta2SpecKubeConfigSecretRef' to JSON representation. */
1065
+ /* eslint-disable max-len, quote-props */
1066
+ function toJson_KustomizationV1Beta2SpecKubeConfigSecretRef(obj) {
1067
+ if (obj === undefined) {
1068
+ return undefined;
1069
+ }
1070
+ const result = {
1071
+ key: obj.key,
1072
+ name: obj.name
1073
+ };
1074
+ // filter undefined values
1075
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1076
+ }
1077
+ /** Converts an object of type 'KustomizationV1Beta2SpecPatchesTarget' to JSON representation. */
1078
+ /* eslint-disable max-len, quote-props */
1079
+ function toJson_KustomizationV1Beta2SpecPatchesTarget(obj) {
1080
+ if (obj === undefined) {
1081
+ return undefined;
1082
+ }
1083
+ const result = {
1084
+ annotationSelector: obj.annotationSelector,
1085
+ group: obj.group,
1086
+ kind: obj.kind,
1087
+ labelSelector: obj.labelSelector,
1088
+ name: obj.name,
1089
+ namespace: obj.namespace,
1090
+ version: obj.version
1091
+ };
1092
+ // filter undefined values
1093
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1094
+ }
1095
+ /** Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902Patch' to JSON representation. */
1096
+ /* eslint-disable max-len, quote-props */
1097
+ function toJson_KustomizationV1Beta2SpecPatchesJson6902Patch(obj) {
1098
+ if (obj === undefined) {
1099
+ return undefined;
1100
+ }
1101
+ const result = {
1102
+ from: obj.from,
1103
+ op: obj.op,
1104
+ path: obj.path,
1105
+ value: obj.value
1106
+ };
1107
+ // filter undefined values
1108
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1109
+ }
1110
+ /**
1111
+ * Converts an object of type 'KustomizationV1Beta2SpecPatchesJson6902Target' to JSON
1112
+ * representation.
1113
+ */
1114
+ /* eslint-disable max-len, quote-props */
1115
+ function toJson_KustomizationV1Beta2SpecPatchesJson6902Target(obj) {
1116
+ if (obj === undefined) {
1117
+ return undefined;
1118
+ }
1119
+ const result = {
1120
+ annotationSelector: obj.annotationSelector,
1121
+ group: obj.group,
1122
+ kind: obj.kind,
1123
+ labelSelector: obj.labelSelector,
1124
+ name: obj.name,
1125
+ namespace: obj.namespace,
1126
+ version: obj.version
1127
+ };
1128
+ // filter undefined values
1129
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1130
+ }
1131
+ /**
1132
+ * Converts an object of type 'KustomizationV1Beta2SpecPostBuildSubstituteFrom' to JSON
1133
+ * representation.
1134
+ */
1135
+ /* eslint-disable max-len, quote-props */
1136
+ function toJson_KustomizationV1Beta2SpecPostBuildSubstituteFrom(obj) {
1137
+ if (obj === undefined) {
1138
+ return undefined;
1139
+ }
1140
+ const result = {
1141
+ kind: obj.kind,
1142
+ name: obj.name,
1143
+ optional: obj.optional
1144
+ };
1145
+ // filter undefined values
1146
+ return Object.entries(result).reduce((r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), {});
1147
+ }
1148
+ /* eslint-enable max-len, quote-props */
1149
+ /**
1150
+ * Kind of the referent.
1151
+ *
1152
+ * @schema KustomizationV1Beta2SpecSourceRefKind
1153
+ */
1154
+ var KustomizationV1Beta2SpecSourceRefKind;
1155
+ (function (KustomizationV1Beta2SpecSourceRefKind) {
1156
+ /** OCIRepository */
1157
+ KustomizationV1Beta2SpecSourceRefKind["OCI_REPOSITORY"] = "OCIRepository";
1158
+ /** GitRepository */
1159
+ KustomizationV1Beta2SpecSourceRefKind["GIT_REPOSITORY"] = "GitRepository";
1160
+ /** Bucket */
1161
+ KustomizationV1Beta2SpecSourceRefKind["BUCKET"] = "Bucket";
1162
+ })(KustomizationV1Beta2SpecSourceRefKind || (exports.KustomizationV1Beta2SpecSourceRefKind = KustomizationV1Beta2SpecSourceRefKind = {}));
1163
+ /**
1164
+ * Op indicates the operation to perform. Its value MUST be one of "add", "remove", "replace",
1165
+ * "move", "copy", or "test". https://datatracker.ietf.org/doc/html/rfc6902#section-4
1166
+ *
1167
+ * @schema KustomizationV1Beta2SpecPatchesJson6902PatchOp
1168
+ */
1169
+ var KustomizationV1Beta2SpecPatchesJson6902PatchOp;
1170
+ (function (KustomizationV1Beta2SpecPatchesJson6902PatchOp) {
1171
+ /** Test */
1172
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["TEST"] = "test";
1173
+ /** Remove */
1174
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["REMOVE"] = "remove";
1175
+ /** Add */
1176
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["ADD"] = "add";
1177
+ /** Replace */
1178
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["REPLACE"] = "replace";
1179
+ /** Move */
1180
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["MOVE"] = "move";
1181
+ /** Copy */
1182
+ KustomizationV1Beta2SpecPatchesJson6902PatchOp["COPY"] = "copy";
1183
+ })(KustomizationV1Beta2SpecPatchesJson6902PatchOp || (exports.KustomizationV1Beta2SpecPatchesJson6902PatchOp = KustomizationV1Beta2SpecPatchesJson6902PatchOp = {}));
1184
+ /**
1185
+ * Kind of the values referent, valid values are ('Secret', 'ConfigMap').
1186
+ *
1187
+ * @schema KustomizationV1Beta2SpecPostBuildSubstituteFromKind
1188
+ */
1189
+ var KustomizationV1Beta2SpecPostBuildSubstituteFromKind;
1190
+ (function (KustomizationV1Beta2SpecPostBuildSubstituteFromKind) {
1191
+ /** Secret */
1192
+ KustomizationV1Beta2SpecPostBuildSubstituteFromKind["SECRET"] = "Secret";
1193
+ /** ConfigMap */
1194
+ KustomizationV1Beta2SpecPostBuildSubstituteFromKind["CONFIG_MAP"] = "ConfigMap";
1195
+ })(KustomizationV1Beta2SpecPostBuildSubstituteFromKind || (exports.KustomizationV1Beta2SpecPostBuildSubstituteFromKind = KustomizationV1Beta2SpecPostBuildSubstituteFromKind = {}));
1196
+ //# sourceMappingURL=kustomize.toolkit.fluxcd.io.js.map