diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java index badd3dd41eb38..f3c3aecbc4f3f 100644 --- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java +++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java @@ -11,6 +11,6 @@ public ChangeDeploymentTriggerDecorator(String containerName, String imageStream @Override public Class[] after() { - return new Class[] { ApplyDeploymentTriggerDecorator.class, RemoveDeploymentTriggerDecorator.class }; + return new Class[] { ApplyDeploymentTriggerDecorator.class }; } } diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftProcessor.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftProcessor.java index bad03339aa2ed..d73924830a867 100644 --- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftProcessor.java +++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftProcessor.java @@ -322,7 +322,7 @@ public List createDecorators(ApplicationInfoBuildItem applic String imageStreamWithTag = name + ":" + i.getTag(); result.add(new DecoratorBuildItem(OPENSHIFT, new ApplyContainerImageDecorator(name, imageStreamWithTag))); // remove the default trigger which has a wrong version - result.add(new DecoratorBuildItem(OPENSHIFT, new RemoveDeploymentTriggerDecorator())); + result.add(new DecoratorBuildItem(OPENSHIFT, new RemoveDeploymentTriggerDecorator(name))); // re-add the trigger with the correct version result.add(new DecoratorBuildItem(OPENSHIFT, new ChangeDeploymentTriggerDecorator(name, imageStreamWithTag))); }); diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/RemoveDeploymentTriggerDecorator.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/RemoveDeploymentTriggerDecorator.java index 80730366ffdb9..d59fad583e6cf 100644 --- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/RemoveDeploymentTriggerDecorator.java +++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/RemoveDeploymentTriggerDecorator.java @@ -4,19 +4,22 @@ import io.dekorate.kubernetes.decorator.Decorator; import io.dekorate.kubernetes.decorator.NamedResourceDecorator; -import io.dekorate.openshift.decorator.ApplyDeploymentTriggerDecorator; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.openshift.api.model.DeploymentConfigSpecFluent; public class RemoveDeploymentTriggerDecorator extends NamedResourceDecorator> { + public RemoveDeploymentTriggerDecorator(String name) { + super(name); + } + @Override public void andThenVisit(DeploymentConfigSpecFluent deploymentConfigSpec, ObjectMeta objectMeta) { deploymentConfigSpec.withTriggers(Collections.emptyList()); } @Override - public Class[] after() { - return new Class[] { ApplyDeploymentTriggerDecorator.class }; + public Class[] before() { + return new Class[] { ChangeDeploymentTriggerDecorator.class }; } }