Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/resourcebuilder/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ func (b *builder) checkDeploymentHealth(ctx context.Context, deployment *appsv1.
}
}

if progressingCondition != nil && progressingCondition.Status == corev1.ConditionFalse && progressingCondition.Reason == "ProgressDeadlineExceeded" {
return &payload.UpdateError{
Nested: fmt.Errorf("deployment %s is %s=%s: %s: %s", iden, progressingCondition.Type, progressingCondition.Status, progressingCondition.Reason, progressingCondition.Message),
Reason: "WorkloadNotProgressing",
Message: fmt.Sprintf("deployment %s is %s=%s: %s: %s", iden, progressingCondition.Type, progressingCondition.Status, progressingCondition.Reason, progressingCondition.Message),
Name: iden,
}
}

if availableCondition == nil && progressingCondition == nil && replicaFailureCondition == nil {
klog.Warningf("deployment %s is not setting any expected conditions, and is therefore in an unknown state", iden)
}
Expand Down
6 changes: 0 additions & 6 deletions lib/resourcemerge/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,13 @@ func ensureContainer(modified *bool, existing *corev1.Container, required corev1
}

func ensureEnvVar(modified *bool, existing *[]corev1.EnvVar, required []corev1.EnvVar) {
if required == nil {
return
}
if !equality.Semantic.DeepEqual(required, *existing) {
*existing = required
*modified = true
}
}

func ensureEnvFromSource(modified *bool, existing *[]corev1.EnvFromSource, required []corev1.EnvFromSource) {
if required == nil {
return
}
if !equality.Semantic.DeepEqual(required, *existing) {
*existing = required
*modified = true
Expand Down