Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback specialized kubernetes config to vanilla kubernetes #34487

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Do not override the container image name with Openshift configuration
  • Loading branch information
radcortez committed Aug 2, 2023
commit 154221b9efe11de1670a1223185915149d23f0a1
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");
});
});
radcortez marked this conversation as resolved.
Show resolved Hide resolved
});
});
});
Expand Down