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
+92-44Lines changed: 92 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,7 @@ A successful implementation of this API should have the following characteristic
243
243
244
244
### Non-Goals
245
245
246
-
1. Support anything other than KRM-style fyunctions that follow the [functions spec](https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md)
246
+
1. Support anything other than KRM-style functions that follow the [functions spec](https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md)
247
247
1. Directly implement capabilities to publish function or other resources to OCI registries
248
248
249
249
## Proposal
@@ -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
-
name: "example-co-functionss"
261
+
name: "example-co-functions"
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"
Copy file name to clipboardExpand all lines: keps/sig-cli/2985-public-krm-functions-registry/README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -559,17 +559,18 @@ using [mdBook](https://github.com/rust-lang/mdBook).
559
559
560
560
### Function Metadata
561
561
562
-
We will use `KRMFunction` kind whose schema is defined in [KEP-2906](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2906-kustomize-function-catalog#function-metadata-schema) to capture the metadata for a single KRM function.
562
+
We will use `KRMFunctionDefinition` kind whose schema is defined in [KEP-2906](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2906-kustomize-function-catalog#function-metadata-schema) to capture the metadata for a single KRM function.
563
563
564
564
The following is an example function metadata for a container-based KRM
565
565
function. We will support it starting from the alpha phase.
566
566
567
567
```yaml
568
-
apiVersion: config.k8s.io/v1alpha1
569
-
kind: KRMFunction
568
+
apiVersion: config.kubernetes.io/v1alpha1
569
+
kind: KRMFunctionDefinition
570
570
spec:
571
571
group: example.com
572
-
kind: SetNamespace
572
+
names:
573
+
kind: SetNamespace
573
574
description: "A short description of the KRM function"
574
575
publisher: example.com
575
576
versions:
@@ -602,11 +603,12 @@ The following is an example for exec-based KRM function. We will support it
602
603
starting from the beta phase.
603
604
604
605
```yaml
605
-
apiVersion: config.k8s.io/v1alpha1
606
-
kind: KRMFunction
606
+
apiVersion: config.kubernetes.io/v1alpha1
607
+
kind: KRMFunctionDefinition
607
608
spec:
608
609
group: example.com
609
-
kind: SetNamespace
610
+
names:
611
+
kind: SetNamespace
610
612
description: "A short description of the KRM function"
611
613
publisher: example.com
612
614
versions:
@@ -1172,4 +1174,4 @@ new subproject, repos requested, or GitHub details. Listing these here allows a
1172
1174
SIG to get the process for these resources started right away.
0 commit comments