@Override public Deployment scale(int count, boolean wait) { Deployment res = cascading(false).edit().editSpec().withReplicas(count).endSpec().done(); if (wait) { waitUntilDeploymentIsScaled(count); res = getMandatory(); } return res; }
@Override public boolean reap() { Deployment deployment = oper.cascading(false).edit().editSpec().withReplicas(0).endSpec().done(); //TODO: These checks shouldn't be used as they are not realistic. We just use them to support mock/crud tests. Need to find a cleaner way to do so. if (deployment.getStatus() != null) { waitForObservedGeneration(deployment.getStatus().getObservedGeneration()); } if (deployment.getSpec().getSelector() != null) { reapMatchingReplicaSets(deployment.getSpec().getSelector()); } return false; }