mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Feat: support customizing application revision limit number in policy (#5995)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
@@ -27,6 +27,10 @@ const (
|
||||
|
||||
// GarbageCollectPolicySpec defines the spec of configuration drift
|
||||
type GarbageCollectPolicySpec struct {
|
||||
// ApplicationRevisionLimit if set, this application will use this number for application revision instead of
|
||||
// the global configuration
|
||||
ApplicationRevisionLimit *int `json:"applicationRevisionLimit,omitempty"`
|
||||
|
||||
// KeepLegacyResource if is set, outdated versioned resourcetracker will not be recycled automatically
|
||||
// outdated resources will be kept until resourcetracker be deleted manually
|
||||
KeepLegacyResource bool `json:"keepLegacyResource,omitempty"`
|
||||
|
||||
@@ -329,6 +329,11 @@ func (in *GarbageCollectPolicyRule) DeepCopy() *GarbageCollectPolicyRule {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GarbageCollectPolicySpec) DeepCopyInto(out *GarbageCollectPolicySpec) {
|
||||
*out = *in
|
||||
if in.ApplicationRevisionLimit != nil {
|
||||
in, out := &in.ApplicationRevisionLimit, &out.ApplicationRevisionLimit
|
||||
*out = new(int)
|
||||
**out = **in
|
||||
}
|
||||
if in.Rules != nil {
|
||||
in, out := &in.Rules, &out.Rules
|
||||
*out = make([]GarbageCollectPolicyRule, len(*in))
|
||||
|
||||
Reference in New Issue
Block a user