kptdev / kpt

Automate Kubernetes Configuration Editing
https://kpt.dev
Apache License 2.0
1.71k stars 228 forks source link

Map function inputs to functions automatically via a catalog mechanism #3339

Open bgrant0607 opened 2 years ago

bgrant0607 commented 2 years ago

Forked from #3304 and #2528.

We've discussed using function catalogs to suggest functions based on metadata, such as applicable resource types intersected with types in a package, mutator vs validator, imperative vs idempotent, etc.

For cases where there is a specific KRM type that maps to a specific function, as with ApplyReplacements, my preferred solution is a function catalog mechanism, so that it doesn't need to be specified in the Kptfile at all. https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/2906-kustomize-function-catalog

We just added a temporary hack to add the apply-replacements function to the Kptfile automatically in the UI, because I forget to do that half the time when running demos. https://github.com/GoogleContainerTools/kpt-backstage-plugins/pull/56

justinsb commented 2 years ago

PoC in #3041

droot commented 1 year ago

I will be happy to guide someone to contribute to this. Marking it as good first issue to invite collaborators.