-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default update strategy to rolling update #50175
Conversation
/test pull-kubernetes-bazel |
pkg/apis/apps/v1beta2/defaults.go
Outdated
@@ -68,7 +68,8 @@ func SetDefaults_StatefulSet(obj *appsv1beta2.StatefulSet) { | |||
} | |||
|
|||
if obj.Spec.UpdateStrategy.Type == "" { | |||
obj.Spec.UpdateStrategy.Type = appsv1beta2.OnDeleteStatefulSetStrategyType | |||
obj.Spec.UpdateStrategy.Type = appsv1beta2.RollingUpdateStatefulSetStrategyType | |||
obj.Spec.UpdateStrategy.RollingUpdate = &appsv1beta2.RollingUpdateStatefulSetStrategy{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment that this will default below to specific values? I would group the update strategy defaulting code.
/lgtm |
pkg/generated/openapi/BUILD
Outdated
@@ -8,6 +8,8 @@ openapi_library( | |||
name = "go_default_library", | |||
srcs = ["doc.go"], | |||
openapi_targets = [ | |||
"_output/dockerized/go/src/github.com/miekg/coredns/vendor/k8s.io/client-go/1.5/pkg/runtime", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed these two lines were added by code generation and I removed them manually in #49983. Should they be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove them. Will revert that entire file; Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
7ea74ea
to
375ce72
Compare
375ce72
to
34fee76
Compare
@smarterclayton PTAL for approval |
/test pull-kubernetes-e2e-gce-etcd3 |
/test pull-kubernetes-e2e-gce-etcd3 |
The commits should be squashed. Were the comments in types.go already updated to reflect the new default values? |
@bgrant0607 None of the workloads API objects list a default value for updateStrategy fields. I'd prefer to issue a separate PR to clean this up for all of the API objects at once. |
34fee76
to
37091c3
Compare
@bgrant0607, PTAL. Discussed with @kow3ns offline. Updated the fields to indicate the new defaults; |
@foxish as per our discussion this looks correct and consistent to me. We should consider if updateStrategy also gets a comment for the default materialization of the struct in a separate PR. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bgrant0607, foxish, kargakis, kow3ns Associated issue: 49604 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Fixes #49604
Change default update strategy to rolling update for daemonset and statefulset in v1beta2
cc @kubernetes/sig-apps-pr-reviews @lukaszo @Kargakis
Release note: