Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zhang committed Nov 25, 2024
1 parent 01acd89 commit 571b8e4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apis/placement/v1alpha1/override_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ type OverridePolicy struct {
// OverrideRules defines an array of override rules to be applied on the selected resources.
// The order of the rules determines the override order.
// When there are two rules selecting the same fields on the target cluster, the last one will win.
// There can only be one override rule if it is a `Delete` type override rule.
// You can have 1-20 rules.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
Expand All @@ -67,12 +66,6 @@ type OverridePolicy struct {

// OverrideRule defines how to override the selected resources on the target clusters.
type OverrideRule struct {
// OverrideType defines the type of the override rules.
// +kubebuilder:validation:Enum=JSONPatch;Delete
// +kubebuilder:default:JSONPatch
// +optional
OverrideType OverrideType `json:"overrideType,omitempty"`

// ClusterSelectors selects the target clusters.
// The resources will be overridden before applying to the matching clusters.
// An empty clusterSelector selects ALL the member clusters.
Expand All @@ -81,7 +74,14 @@ type OverrideRule struct {
// +optional
ClusterSelector *placementv1beta1.ClusterSelector `json:"clusterSelector,omitempty"`

// OverrideType defines the type of the override rules.
// +kubebuilder:validation:Enum=JSONPatch;Delete
// +kubebuilder:default:JSONPatch
// +optional
OverrideType OverrideType `json:"overrideType,omitempty"`

// JSONPatchOverrides defines a list of JSON patch override rules.
// This field is only allowed when OverrideType is JSONPatch.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=20
Expand Down

0 comments on commit 571b8e4

Please sign in to comment.