mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Improvements to kyaml fn framework
This commit creates a new version of the alpha configuration functions framework. Goals include: - Make it easy to build multi-version APIs with the framework (not previously facilitated at all). - Simplify the framework's APIs where redundant configuration options exist (leaving the most powerful, replacing others with helpers to maintain usability they provided). - Make the Framework's APIs more consistent (e.g. between the various template types, usage of kio.Filter, field names) - Decouple responsibilities (e.g. command creation, resource list processing, generation of templating functions). - Make the framework even more powerfully pluggable (e.g. any kio.Filter can be a selector, and the selector the framework provides is itself a filter built from reusable abstractions). - Improve documentation. - Make container patches merge fields (notably list fields like `env`) correctly.
This commit is contained in:
@@ -2,8 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Package main contains an example using the the framework.
|
||||
// The example annotates all resources in the input with the value provided as a flag.
|
||||
//
|
||||
// To execute the function, run:
|
||||
//
|
||||
// $ cat input/cm.yaml | go run ./main.go --value=foo
|
||||
//
|
||||
// To generate the Dockerfile for the function image run:
|
||||
//
|
||||
// $ go run ./main.go .
|
||||
// $ go run ./main.go gen ./
|
||||
package main
|
||||
|
||||
Reference in New Issue
Block a user