mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Increase default value of DeploymentSpec.RevisionHistoryLimit to 10
This commit is contained in:
parent
1bc56825a2
commit
7b45e5344b
@ -102,7 +102,7 @@ func SetDefaults_StatefulSet(obj *appsv1beta2.StatefulSet) {
|
||||
// in extensions. These addons are:
|
||||
// - MaxUnavailable during rolling update set to 25% (1 in extensions)
|
||||
// - MaxSurge value during rolling update set to 25% (1 in extensions)
|
||||
// - RevisionHistoryLimit set to 2 (not set in extensions)
|
||||
// - RevisionHistoryLimit set to 10 (not set in extensions)
|
||||
// - ProgressDeadlineSeconds set to 600s (not set in extensions)
|
||||
func SetDefaults_Deployment(obj *appsv1beta2.Deployment) {
|
||||
// Default labels and selector to labels from pod template spec.
|
||||
@ -144,7 +144,7 @@ func SetDefaults_Deployment(obj *appsv1beta2.Deployment) {
|
||||
}
|
||||
if obj.Spec.RevisionHistoryLimit == nil {
|
||||
obj.Spec.RevisionHistoryLimit = new(int32)
|
||||
*obj.Spec.RevisionHistoryLimit = 2
|
||||
*obj.Spec.RevisionHistoryLimit = 10
|
||||
}
|
||||
if obj.Spec.ProgressDeadlineSeconds == nil {
|
||||
obj.Spec.ProgressDeadlineSeconds = new(int32)
|
||||
|
@ -186,7 +186,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
MaxUnavailable: &defaultIntOrString,
|
||||
},
|
||||
},
|
||||
RevisionHistoryLimit: newInt32(2),
|
||||
RevisionHistoryLimit: newInt32(10),
|
||||
ProgressDeadlineSeconds: newInt32(600),
|
||||
Template: defaultTemplate,
|
||||
},
|
||||
@ -213,7 +213,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
MaxUnavailable: &defaultIntOrString,
|
||||
},
|
||||
},
|
||||
RevisionHistoryLimit: newInt32(2),
|
||||
RevisionHistoryLimit: newInt32(10),
|
||||
ProgressDeadlineSeconds: newInt32(600),
|
||||
Template: defaultTemplate,
|
||||
},
|
||||
@ -239,7 +239,7 @@ func TestSetDefaultDeployment(t *testing.T) {
|
||||
MaxUnavailable: &defaultIntOrString,
|
||||
},
|
||||
},
|
||||
RevisionHistoryLimit: newInt32(2),
|
||||
RevisionHistoryLimit: newInt32(10),
|
||||
ProgressDeadlineSeconds: newInt32(600),
|
||||
Template: defaultTemplate,
|
||||
},
|
||||
|
@ -307,7 +307,7 @@ type DeploymentSpec struct {
|
||||
|
||||
// The number of old ReplicaSets to retain to allow rollback.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 2.
|
||||
// Defaults to 10.
|
||||
// +optional
|
||||
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user