Documentation ¶
Index ¶
Constants ¶
const (
MergeCommentPrefix = "kpt-merge:"
)
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]
Types ¶
type Merge3 ¶
type Merge3 struct { OriginalPath string UpdatedPath string DestPath string MatchFilesGlob []string MergeOnPath bool IncludeSubPackages bool }
Merge3 performs a 3-way merge on the original, upstream and destination packages. It provides support for doing this only for the parent package and ignore any subpackages. Whenever the boundaries of a package differs between original, upstream and destination, the boundaries in destination will be used.
type PruningLocalPackageReader ¶
type PruningLocalPackageReader struct { LocalPackageReader kio.LocalPackageReader Exclusions []string }
PruningLocalPackageReader implements the Reader interface. It is similar to the LocalPackageReader but allows for exclusion of subdirectories.
type ResourceMergeMatcher ¶
type ResourceMergeMatcher struct {
MergeOnPath bool
}
func (*ResourceMergeMatcher) IsSameResource ¶
func (rm *ResourceMergeMatcher) IsSameResource(node1, node2 *yaml.RNode) bool
IsSameResource determines if 2 resources are same to be merged by matching GKNN+filepath Group, Kind are derived from resource metadata directly, Namespace and Name are derived from merge comment which is of format "kpt-merge: namespace/name", if the merge comment is not present, then it falls back to Namespace and Name on the resource meta