Skip to content

Commit

Permalink
Do not override the container image name with Openshift configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez committed Aug 2, 2023
1 parent c00eb29 commit 154221b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import io.quarkus.container.image.deployment.ContainerImageConfig;
import io.quarkus.container.image.deployment.util.ImageUtil;
import io.quarkus.container.spi.BaseImageInfoBuildItem;
import io.quarkus.container.spi.ContainerImageCustomNameBuildItem;
import io.quarkus.container.spi.ContainerImageInfoBuildItem;
import io.quarkus.container.spi.ContainerImageLabelBuildItem;
import io.quarkus.container.spi.FallbackContainerImageRegistryBuildItem;
Expand Down Expand Up @@ -102,12 +101,6 @@ public void checkOpenshift(ApplicationInfoBuildItem applicationInfo, Capabilitie
}
}

@BuildStep
public void populateCustomImageName(OpenshiftConfig openshiftConfig,
BuildProducer<ContainerImageCustomNameBuildItem> containerImageCustomName) {
openshiftConfig.name.ifPresent(name -> containerImageCustomName.produce(new ContainerImageCustomNameBuildItem(name)));
}

@BuildStep
public void populateInternalRegistry(OpenshiftConfig openshiftConfig, ContainerImageConfig containerImageConfig,
Capabilities capabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@ public void assertGeneratedResources() throws IOException {
assertThat(t.getMetadata()).satisfies(metadata -> assertThat(metadata.getLabels()).containsAnyOf(
entry("app.kubernetes.io/name", CUSTOM_NAME),
entry("app.kubernetes.io/version", "0.1-SNAPSHOT")));

assertThat(t.getSpec()).satisfies(podSpec -> {
assertThat(podSpec.getContainers()).singleElement().satisfies(container -> {
assertThat(container.getImage())
.isEqualTo(
"testme/" + CUSTOM_NAME + ":0.1-SNAPSHOT");
});
});
});
});
});
Expand Down

0 comments on commit 154221b

Please sign in to comment.