Skip to content

Commit d4945c7

Browse files
committed
Add user stories and update proviers -> krmFunctions
Signed-off-by: Jeremy <[email protected]>
1 parent 7184e13 commit d4945c7

File tree

1 file changed

+72
-5
lines changed
  • keps/sig-cli/2906-kustomize-function-catalog

1 file changed

+72
-5
lines changed

keps/sig-cli/2906-kustomize-function-catalog/README.md

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ tags, and then generate with `hack/update-toc.sh`.
8484
- [Story 3](#story-3)
8585
- [Story 4](#story-4)
8686
- [Story 5](#story-5)
87+
- [Story 5](#story-5-1)
88+
- [Story 6](#story-6)
8789
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
8890
- [Risks and Mitigations](#risks-and-mitigations)
8991
- [Design Details](#design-details)
@@ -257,7 +259,7 @@ kind: Catalog
257259
metadata:
258260
name: "example-co-functionss"
259261
spec:
260-
providers:
262+
krmFunctions:
261263
- apiVersion: example.com/v1
262264
kind: JavaApplication
263265
description: "A Kustomize function that represents a Java based app"
@@ -302,7 +304,7 @@ kind: Catalog
302304
metadata:
303305
name: "example-co-functions"
304306
spec:
305-
providers:
307+
krmFunctions:
306308
- apiVersion: example.com/v1
307309
kind: GroovyApplication
308310
description: "A Kustomize function that can handle groovy apps"
@@ -330,7 +332,7 @@ kind: Catalog
330332
metadata:
331333
name: "example-co-functions"
332334
spec:
333-
providers:
335+
krmFunctions:
334336
- apiVersion: example.com/v1
335337
kind: JavaApplication
336338
description: "A Kustomize function that can handle Java apps"
@@ -462,7 +464,7 @@ kind: Catalog
462464
metadata:
463465
name: "official-kustomize-functions"
464466
spec:
465-
providers:
467+
krmFunctions:
466468
- apiVersion: kustomize.io/v1
467469
kind: Helm
468470
description: "A Kustomize function that can handle Helm charts"
@@ -475,6 +477,71 @@ This official extension will be embedded within the Kustomize binary and require
475477

476478
Alternatively, this could be published as an external resource that can be pulled by Kustomize as would any other catalog. This would decouple the release cadence of Kustomize and the official extensions, but would introduce extra latency for the end user.
477479

480+
#### Story 5
481+
482+
As a KRM function developer at company Example Co, I want to contribute a KRM function to the official extension catalog.
483+
484+
I publish the implementation of my function as a container to a public Docker registry. I then contribute the necessary metadata to the public catalog, including:
485+
486+
* Provider information
487+
* Network access requirements
488+
* Storage/volume requirements
489+
490+
Once this has been approved and included into the officially published catalog, my function is available for others to discover:
491+
492+
```yaml
493+
apiVersion: kustomize.io/v1
494+
kind: Catalog
495+
metadata:
496+
name: "official-kustomize-functions"
497+
spec:
498+
krmFunctions:
499+
- apiVersion: kustomize.io/v1
500+
kind: Helm
501+
description: "A Kustomize function that can handle Helm charts"
502+
provider:
503+
container:
504+
image: k8s.gcr.io/kustomize/helm-function:v1.0.0
505+
- apiVersion: example.co/v1
506+
kind: McGuffin
507+
description: "A KRM function that everyone is searching for"
508+
provider:
509+
container:
510+
image: docker.example.io/krm/mcguffin-function:v1.0.0
511+
```
512+
513+
#### Story 6
514+
515+
As a platform developer at enterprise company Example Co, I wish to publish a trusted function catalog containing functions published by multiple sources, with appropriate metadata:
516+
517+
* One plugin developed by Banana Co
518+
* One plugin developed by Watermelon Co
519+
* One plugin developed by my company Example Co
520+
521+
Using the provider information and the metadata for each function, I publish a trusted catalog for use at Example Co
522+
523+
```yaml
524+
apiVersion: kustomize.io/v1
525+
kind: Catalog
526+
metadata:
527+
name: "example-co-aggregated-catalog"
528+
spec:
529+
krmFunctions:
530+
- apiVersion: banana.co/v1
531+
kind: Split
532+
description: "A KRM function that splits a deployment into multiple deployments"
533+
provider:
534+
container:
535+
image: banana.gcr.io/functions/split-function:v1.0.0
536+
- apiVersion: watermelon.co/v1
537+
kind: Salt
538+
description: "A KRM function that applies salt"
539+
provider:
540+
container:
541+
image: watermelon.gcr.io/krm-functions/salt-function:v1.0.0
542+
```
543+
544+
478545
### Notes/Constraints/Caveats (Optional)
479546

480547
Not all registries currently support OCI Artifacts, which will constrain the use of that capability. Most major cloud providers and several open source projects, however, support this:
@@ -508,7 +575,7 @@ metadata:
508575
labels:
509576
author: ExampleCo
510577
spec:
511-
providers:
578+
krmFunctions:
512579
- apiVersion: example.com/v1
513580
kind: JavaApplication
514581
description: "A Kustomize function provider that can handle Java apps"

0 commit comments

Comments
 (0)