You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-cli/2906-kustomize-function-catalog/README.md
+90-42Lines changed: 90 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,15 +255,18 @@ A `Catalog` will contain a collection of one or more functions that can be used
255
255
A minimal example is shown below:
256
256
257
257
```yaml
258
-
apiVersion: kustomize.io/v1
258
+
apiVersion: config.kubernetes.io/v1alpha1
259
259
kind: Catalog
260
260
metadata:
261
261
name: "example-co-functionss"
262
262
spec:
263
263
krmFunctions:
264
-
- apiVersion: example.com/v1
265
-
kind: JavaApplication
264
+
- group: example.com
265
+
names:
266
+
kind: JavaApplication
266
267
description: "A Kustomize function that represents a Java based app"
268
+
versions:
269
+
- name: v1
267
270
runtime:
268
271
container:
269
272
image: example/module_providers/java:v1.0.0
@@ -300,15 +303,18 @@ Kustomize can at a later date provide a built in Catalog for supporting official
300
303
In addition to container based functions, the `Catalog` will support discovery of Starlark and Exec based functions, via an HTTP(s), Git, or OCI reference as illustrated below:
301
304
302
305
```yaml
303
-
apiVersion: kustomize.io/v1
306
+
apiVersion: config.kubernetes.io/v1alpha1
304
307
kind: Catalog
305
308
metadata:
306
309
name: "example-co-functions"
307
310
spec:
308
311
krmFunctions:
309
-
- apiVersion: example.com/v1
310
-
kind: GroovyApplication
312
+
- group: example.com
313
+
names:
314
+
kind: GroovyApplication
311
315
description: "A Kustomize function that can handle groovy apps"
@@ -328,27 +334,36 @@ To do this, I build a new `Catalog` API resource:
328
334
329
335
```yaml
330
336
# catalog.yaml
331
-
apiVersion: kustomize.io/v1
337
+
apiVersion: config.kubernetes.io/v1alpha1
332
338
kind: Catalog
333
339
metadata:
334
340
name: "example-co-functions"
335
341
spec:
336
342
krmFunctions:
337
-
- apiVersion: example.com/v1
338
-
kind: JavaApplication
343
+
- group: example.com
344
+
names:
345
+
kind: JavaApplication
339
346
description: "A Kustomize function that can handle Java apps"
347
+
versions:
348
+
- name: v1
340
349
runtime:
341
350
container:
342
351
image: docker.example.co/functions/java:v1.0.0
343
-
- apiVersion: example.com/v1
344
-
kind: Logger
352
+
- group: example.com
353
+
names:
354
+
kind: Logger
345
355
description: "A Kustomize function that adds our bespoke logging"
356
+
versions:
357
+
- name: v1
346
358
runtime:
347
359
container:
348
360
image: docker.example.co/functions/logger:v1.0.0
349
-
- apiVersion: example.com/v1
350
-
kind: SecretSidecar
361
+
- group: example.com
362
+
names:
363
+
kind: SecretSidecar
351
364
description: "A Kustomize function that adds our bespoke secret sidecar"
365
+
versions:
366
+
- name: v1
352
367
runtime:
353
368
container:
354
369
image: docker.example.co/functions/secrets:v1.0.0
@@ -460,15 +475,18 @@ modules:
460
475
As a Kustomize developer, I want to build an `official` Helm extension module and publish it via the Kustomize official extension catalog. I build and publish the extension to the official Kustomize `gcr.io` project (or alternative, such as Github Package Registry). I then update the official Kustomize extension catalog:
461
476
462
477
```yaml
463
-
apiVersion: kustomize.io/v1
478
+
apiVersion: config.kubernetes.io/v1alpha1
464
479
kind: Catalog
465
480
metadata:
466
481
name: "official-kustomize-functions"
467
482
spec:
468
483
krmFunctions:
469
-
- apiVersion: kustomize.io/v1
470
-
kind: Helm
484
+
- group: kustomize.io
485
+
names:
486
+
kind: Helm
471
487
description: "A Kustomize function that can handle Helm charts"
488
+
versions:
489
+
- name: v1
472
490
runtime:
473
491
container:
474
492
image: k8s.gcr.io/kustomize/helm-function:v1.0.0
@@ -491,21 +509,27 @@ I publish the implementation of my function as a container to a public Docker re
491
509
Once this has been approved and included into the officially published catalog, my function is available for others to discover:
492
510
493
511
```yaml
494
-
apiVersion: kustomize.io/v1
512
+
apiVersion: config.kubernetes.io/v1alpha1
495
513
kind: Catalog
496
514
metadata:
497
515
name: "official-kustomize-functions"
498
516
spec:
499
517
krmFunctions:
500
-
- apiVersion: kustomize.io/v1
501
-
kind: Helm
518
+
- group: kustomize.io
519
+
names:
520
+
kind: Helm
502
521
description: "A Kustomize function that can handle Helm charts"
522
+
versions:
523
+
- name: v1
503
524
runtime:
504
525
container:
505
526
image: k8s.gcr.io/kustomize/helm-function:v1.0.0
506
-
- apiVersion: example.co/v1
507
-
kind: McGuffin
527
+
- group: example.co
528
+
names:
529
+
kind: McGuffin
508
530
description: "A KRM function that everyone is searching for"
0 commit comments