-
Notifications
You must be signed in to change notification settings - Fork 71
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
Rolling Deployment in partition-style #115
Rolling Deployment in partition-style #115
Conversation
dc47c06
to
07380e0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #115 +/- ##
==========================================
- Coverage 44.74% 44.66% -0.08%
==========================================
Files 44 47 +3
Lines 4519 4865 +346
==========================================
+ Hits 2022 2173 +151
- Misses 2158 2335 +177
- Partials 339 357 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
07380e0
to
96b63c7
Compare
pkg/controller/batchrelease/control/partitionstyle/deployment/control.go
Show resolved
Hide resolved
pkg/controller/batchrelease/control/partitionstyle/deployment/control.go
Outdated
Show resolved
Hide resolved
pkg/controller/batchrelease/control/partitionstyle/deployment/control.go
Outdated
Show resolved
Hide resolved
pkg/controller/batchrelease/control/partitionstyle/deployment/control.go
Outdated
Show resolved
Hide resolved
pkg/controller/batchrelease/control/partitionstyle/deployment/control.go
Outdated
Show resolved
Hide resolved
7118c6b
to
28e4afc
Compare
/lgtm |
release, release.GetObjectKind().GroupVersionKind())) | ||
|
||
// Disable the native deployment controller | ||
d.Spec.Strategy = apps.DeploymentStrategy{Type: apps.RecreateDeploymentStrategyType} |
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.
webhook will also set strategy to recreate, is it necessary to duplicate the work here, or controller should duplicate the whole work here (also set pause=true) to avoid potential webhook failure
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.
done
pkg/util/controller_finder.go
Outdated
@@ -190,7 +271,6 @@ func (r *ControllerFinder) getDeployment(namespace string, ref *rolloutv1alpha1. | |||
workload.InRolloutProgressing = true | |||
// workload is continuous release, indicates rollback(v1 -> v2 -> v1) | |||
// delete auto-generated labels |
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.
remove comments?
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.
done
d := rc.object.DeepCopy() | ||
strategy.Partition = ctx.DesiredPartition | ||
d.Annotations[v1alpha1.DeploymentStrategyAnnotation] = util.DumpJSON(&strategy) | ||
return rc.client.Patch(context.TODO(), d, client.MergeFrom(rc.object)) |
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 we use StrategicMergeFrom from native k8s objects
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.
done
28e4afc
to
e658912
Compare
e658912
to
2d834a5
Compare
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
2d834a5
to
2a52b0c
Compare
9986217
to
5eb80c6
Compare
5eb80c6
to
b5e93f1
Compare
b5e93f1
to
e5613dc
Compare
Signed-off-by: mingzhou.swx <[email protected]>
e5613dc
to
55d9e02
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: mingzhou.swx [email protected]
Ⅰ. Describe what this PR does
We can rolling Deployment just like CloneSet/StatefulSet using
partition
!Ⅱ. Does this pull request fix one issue?
fixes #15