Documentation
¶
Index ¶
Constants ¶
const (
MergeCommentPrefix = "kpt-merge:"
)
TODO(yuwenma): Those const vars are defined in kpt-functions-sdk/go/fn v0.0.0-20220706221933-7181f451a663+ we cannot import go/fn directly because the porch/set-namespace uses an older go/fn version. Bumping kpt module alone fails kpt CI. We should update porch/set-namespace once https://github.com/kptdev/krm-functions-catalog/pull/885 is released. and cleanup the const vars below
Variables ¶
This section is empty.
Functions ¶
func NsAndNameForMerge ¶
NsAndNameForMerge returns the namespace and name for merge from the line comment on the metadata field e.g. metadata: # kpt-merge: default/foo returns [default, foo]
func Process ¶
Process invokes AddMergeComment kyaml filter on the resources in input packages paths
func ProcessWithCleanup ¶
ProcessWithCleanup copies the input directory contents to new temp directory and adds merge comment to the resources in directory it also returns the cleanup function to clean the created temp directory
Types ¶
type AddMergeComment ¶
type AddMergeComment struct{}
AddMergeComment adds merge comments with format "kpt-merge: namespace/name" to all resources in the package