Skip to content

Commit

Permalink
fix: KubernetesDeployer now always deletes existing resources
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Feb 23, 2021
1 parent e00b616 commit 588db63
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

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 @@ -175,11 +174,7 @@ private DeploymentResultBuildItem deploy(DeploymentTargetEntry deploymentTarget,
try (FileInputStream fis = new FileInputStream(manifest)) {
KubernetesList list = Serialization.unmarshalAsList(fis);
distinct(list.getItems()).forEach(i -> {
if (KNATIVE.equals(deploymentTarget.getName().toLowerCase())) {
client.resource(i).inNamespace(namespace).deletingExisting().createOrReplace();
} else {
client.resource(i).inNamespace(namespace).createOrReplace();
}
client.resource(i).inNamespace(namespace).deletingExisting().createOrReplace();
log.info("Applied: " + i.getKind() + " " + i.getMetadata().getName() + ".");
});

Expand Down

0 comments on commit 588db63

Please sign in to comment.