Skip to content

Commit

Permalink
Revert "fix: KubernetesDeployer now always deletes existing resources"
Browse files Browse the repository at this point in the history
This reverts commit 588db63.
  • Loading branch information
gsmet committed Mar 5, 2021
1 parent c315109 commit 6b7bf73
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

package io.quarkus.kubernetes.deployment;

import static io.quarkus.kubernetes.deployment.Constants.KNATIVE;
import static io.quarkus.kubernetes.deployment.Constants.KUBERNETES;
import static io.quarkus.kubernetes.deployment.Constants.MINIKUBE;
import static io.quarkus.kubernetes.deployment.Constants.OPENSHIFT;
Expand Down Expand Up @@ -174,7 +175,11 @@ private DeploymentResultBuildItem deploy(DeploymentTargetEntry deploymentTarget,
try (FileInputStream fis = new FileInputStream(manifest)) {
KubernetesList list = Serialization.unmarshalAsList(fis);
distinct(list.getItems()).forEach(i -> {
client.resource(i).inNamespace(namespace).deletingExisting().createOrReplace();
if (KNATIVE.equals(deploymentTarget.getName().toLowerCase())) {
client.resource(i).inNamespace(namespace).deletingExisting().createOrReplace();
} else {
client.resource(i).inNamespace(namespace).createOrReplace();
}
log.info("Applied: " + i.getKind() + " " + i.getMetadata().getName() + ".");
});

Expand Down

0 comments on commit 6b7bf73

Please sign in to comment.