Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions input/v1beta1/resource_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,23 +226,3 @@ const (
FromFieldPathPolicyOptional FromFieldPathPolicy = "Optional"
FromFieldPathPolicyRequired FromFieldPathPolicy = "Required"
)

// A PatchPolicy configures the specifics of patching behaviour.
type PatchPolicy struct {
// FromFieldPath specifies how to patch from a field path. The default is
// 'Optional', which means the patch will be a no-op if the specified
// fromFieldPath does not exist. Use 'Required' if the patch should fail if
// the specified path does not exist.
// +kubebuilder:validation:Enum=Optional;Required
// +optional
FromFieldPath *FromFieldPathPolicy `json:"fromFieldPath,omitempty"`
MergeOptions *xpv1.MergeOptions `json:"mergeOptions,omitempty"`
}

// GetFromFieldPathPolicy returns the FromFieldPathPolicy for this PatchPolicy, defaulting to FromFieldPathPolicyOptional if not specified.
func (pp *PatchPolicy) GetFromFieldPathPolicy() FromFieldPathPolicy {
if pp == nil || pp.FromFieldPath == nil {
return FromFieldPathPolicyOptional
}
return *pp.FromFieldPath
}
25 changes: 0 additions & 25 deletions input/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading