Skip to content

Commit

Permalink
Merge pull request #1871 from k-wall/issue-1859
Browse files Browse the repository at this point in the history
  • Loading branch information
fusesource-ci authored Nov 20, 2019
2 parents fcc59c2 + ed06915 commit fbb6901
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 4.7-SNAPSHOT
#### Bugs
* Fix disabled Integration tests
* Fix #1859 - Pass caller's propagation-policy/cascade options to the underlying replicaset when deleting a deployment

#### Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,18 @@ private void reapMatchingReplicaSets(LabelSelector selector) {
if (selector == null || (selector.getMatchLabels() == null && selector.getMatchExpressions() == null)) {
return;
}
ReplicaSetOperationsImpl rsOper = new ReplicaSetOperationsImpl(new RollingOperationContext()
RollingOperationContext context = new RollingOperationContext()
.withOkhttpClient(oper.client)
.withConfig(oper.config)
.withNamespace(oper.getNamespace()));
.withNamespace(oper.getNamespace());

if (oper.getPropagationPolicy() != null) {
context = context.withPropagationPolicy(oper.getPropagationPolicy());
} else if (oper.isCascading()) {
context = context.withCascading(oper.isCascading());
}

ReplicaSetOperationsImpl rsOper = new ReplicaSetOperationsImpl(context);
rsOper.inNamespace(oper.getNamespace()).withLabelSelector(selector).delete();
}
}
Expand Down

0 comments on commit fbb6901

Please sign in to comment.