Add DependentOverriders field to PropagationPolicy
Signed-off-by: RainbowMango <renhongcai@huawei.com> Co-authored-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
parent
9624634662
commit
77830aada3
|
@ -42,6 +42,18 @@ spec:
|
||||||
automatically. e.g. a ConfigMap referred by a Deployment. default
|
automatically. e.g. a ConfigMap referred by a Deployment. default
|
||||||
false.
|
false.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
dependentOverrides:
|
||||||
|
description: "DependentOverrides represents the list of overrides(OverridePolicy)
|
||||||
|
which must present before the current PropagationPolicy takes effect.
|
||||||
|
\n It used to explicitly specify overrides which current PropagationPolicy
|
||||||
|
rely on. A typical scenario is the users create OverridePolicy(ies)
|
||||||
|
and resources at the same time, they want to ensure the new-created
|
||||||
|
policies would be adopted. \n Note: For the overrides, OverridePolicy(ies)
|
||||||
|
in current namespace and ClusterOverridePolicy(ies), which not present
|
||||||
|
in this list will still be applied if they matches the resources."
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
placement:
|
placement:
|
||||||
description: Placement represents the rule for select clusters to
|
description: Placement represents the rule for select clusters to
|
||||||
propagate resources.
|
propagate resources.
|
||||||
|
|
|
@ -33,6 +33,18 @@ type PropagationSpec struct {
|
||||||
// Placement represents the rule for select clusters to propagate resources.
|
// Placement represents the rule for select clusters to propagate resources.
|
||||||
Placement Placement `json:"placement,omitempty"`
|
Placement Placement `json:"placement,omitempty"`
|
||||||
|
|
||||||
|
// DependentOverrides represents the list of overrides(OverridePolicy)
|
||||||
|
// which must present before the current PropagationPolicy takes effect.
|
||||||
|
//
|
||||||
|
// It used to explicitly specify overrides which current PropagationPolicy rely on.
|
||||||
|
// A typical scenario is the users create OverridePolicy(ies) and resources at the same time,
|
||||||
|
// they want to ensure the new-created policies would be adopted.
|
||||||
|
//
|
||||||
|
// Note: For the overrides, OverridePolicy(ies) in current namespace and ClusterOverridePolicy(ies),
|
||||||
|
// which not present in this list will still be applied if they matches the resources.
|
||||||
|
// +optional
|
||||||
|
DependentOverrides []string `json:"dependentOverrides,omitempty"`
|
||||||
|
|
||||||
// SchedulerName represents which scheduler to proceed the scheduling.
|
// SchedulerName represents which scheduler to proceed the scheduling.
|
||||||
// If specified, the policy will be dispatched by specified scheduler.
|
// If specified, the policy will be dispatched by specified scheduler.
|
||||||
// If not specified, the policy will be dispatched by default scheduler.
|
// If not specified, the policy will be dispatched by default scheduler.
|
||||||
|
|
|
@ -495,6 +495,11 @@ func (in *PropagationSpec) DeepCopyInto(out *PropagationSpec) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
in.Placement.DeepCopyInto(&out.Placement)
|
in.Placement.DeepCopyInto(&out.Placement)
|
||||||
|
if in.DependentOverrides != nil {
|
||||||
|
in, out := &in.DependentOverrides, &out.DependentOverrides
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue