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
Add ProgressDeadlineSeconds #54
Conversation
Codecov Report
@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 76.14% 77.11% +0.96%
==========================================
Files 14 14
Lines 1417 1595 +178
==========================================
+ Hits 1079 1230 +151
- Misses 259 278 +19
- Partials 79 87 +8
Continue to review full report at Codecov.
|
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.
Added few comments. Can you use Patch instead of Update? Otherwise, we might get concurrent update errors.
controller/service.go
Outdated
c.recorder.Eventf(r, corev1.EventTypeWarning, conditions.ServiceNotFoundReason, msg) | ||
cond := conditions.NewRolloutCondition(v1alpha1.RolloutProgressing, corev1.ConditionFalse, conditions.ServiceNotFoundReason, msg) | ||
conditions.SetRolloutCondition(&r.Status, *cond) | ||
c.rolloutsclientset.ArgoprojV1alpha1().Rollouts(r.Namespace).Update(r) |
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 think we should use Patch to set conditions.
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.
👍
controller/service.go
Outdated
c.recorder.Eventf(r, corev1.EventTypeWarning, conditions.ServiceNotFoundReason, msg) | ||
cond := conditions.NewRolloutCondition(v1alpha1.RolloutProgressing, corev1.ConditionFalse, conditions.ServiceNotFoundReason, msg) | ||
conditions.SetRolloutCondition(&r.Status, *cond) | ||
c.rolloutsclientset.ArgoprojV1alpha1().Rollouts(r.Namespace).Update(r) |
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.
Return Update/Patch error
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.
👍
controller/service.go
Outdated
@@ -130,7 +134,11 @@ func (c *Controller) getPreviewAndActiveServices(r *v1alpha1.Rollout) (*corev1.S | |||
activeSvc, err = c.kubeclientset.CoreV1().Services(r.Namespace).Get(r.Spec.Strategy.BlueGreenStrategy.ActiveService, metav1.GetOptions{}) | |||
if err != nil { | |||
if errors.IsNotFound(err) { | |||
logCtx.Warnf("Service %v does not exist", r.Spec.Strategy.BlueGreenStrategy.PreviewService) | |||
msg := fmt.Sprintf(conditions.ServiceNotFoundMessage, "active", r.Spec.Strategy.BlueGreenStrategy.ActiveService) |
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.
Same as for line 126
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.
👍
utils/conditions/conditions.go
Outdated
|
||
// Reasons and Messages for rollout conditions | ||
|
||
// Progressing: |
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.
Delete this line?
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.
👍
6ae4313
to
370dc57
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.
Nice!
Additionally, I simplified the testing framework to allow developers to test specific fields within the objects sent to the Kubernetes API instead of the entire object.