Documentation ¶
Index ¶
- func DefaultKptfile(name string) *kptfilev1alpha2.KptFile
- func Equal(kf1, kf2 *kptfilev1alpha2.KptFile) (bool, error)
- func UpdateKptfile(localPath, updatedPath, originPath string, updateUpstream bool) error
- func UpdateKptfileWithoutOrigin(localPath, updatedPath string, updateUpstream bool) error
- func UpdateUpstreamLockFromGit(path string, spec *git.RepoSpec) error
- func ValidateInventory(inv *kptfilev1alpha2.Inventory) (bool, error)
- func WriteFile(dir string, k *kptfilev1alpha2.KptFile) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultKptfile ¶
func DefaultKptfile(name string) *kptfilev1alpha2.KptFile
DefaultKptfile returns a new minimal Kptfile.
func UpdateKptfile ¶
UpdateKptfile updates the Kptfile in the package specified by localPath with values from the packages specified in updatedPath using the package specified by originPath as the common ancestor. If updateUpstream is true, the values from the upstream and upstreamLock sections will also be copied into local.
func UpdateKptfileWithoutOrigin ¶
UpdateKptfileWithoutOrigin updates the Kptfile in the package specified by localPath with values from the package specified by updatedPath using a 3-way merge strategy, but where origin does not have any values. If updateUpstream is true, the values from the upstream and upstreamLock sections will also be copied into local.
func UpdateUpstreamLockFromGit ¶
UpdateUpstreamLockFromGit updates the upstreamLock of the package specified by path by using the values from spec. It will also populate the commit field in upstreamLock using the latest commit of the git repo given by spec.
func ValidateInventory ¶ added in v0.38.0
func ValidateInventory(inv *kptfilev1alpha2.Inventory) (bool, error)
ValidateInventory returns true and a nil error if the passed inventory is valid; otherwiste, false and the reason the inventory is not valid is returned. A valid inventory must have a non-empty namespace, name, and id.
Types ¶
This section is empty.