-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add KRM func suppport for PackageVariants (#3925)
* add deepcopy for kptfile funcs and selectors * add KRM func suppport for PackageVariants * add handling for removed mutators/validators * remove comment * allow for mutator/validator name to be empty * switch to getFileKubeObject utility func * edit validators/mutators in single loop * document functionality of ensureKRMFunctions * fix formatting after rebase * add deleting existin pv mutators/validators and pruning of pipeline field * Fix failing PVS unit test --------- Co-authored-by: John Belamaric <[email protected]>
- Loading branch information
1 parent
c1ed58d
commit f40fd3d
Showing
7 changed files
with
667 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ import ( | |
"sigs.k8s.io/kustomize/kyaml/yaml" | ||
) | ||
|
||
//go:generate go run sigs.k8s.io/controller-tools/cmd/[email protected] object object:headerFile="../../../../porch/scripts/boilerplate.go.txt" | ||
|
||
const ( | ||
KptFileName = "Kptfile" | ||
|
||
|
@@ -280,6 +282,7 @@ func (p *Pipeline) IsEmpty() bool { | |
} | ||
|
||
// Function specifies a KRM function. | ||
// +kubebuilder:object:generate=true | ||
type Function struct { | ||
// `Image` specifies the function container image. | ||
// It can either be fully qualified, e.g.: | ||
|
@@ -325,6 +328,7 @@ type Function struct { | |
|
||
// Selector specifies the selection criteria | ||
// please update IsEmpty method if more properties are added | ||
// +kubebuilder:object:generate=true | ||
type Selector struct { | ||
// APIVersion of the target resources | ||
APIVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"` | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.