-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8815 from geoand/minikube-pull-policy
Make deploying to Minikube effortless when not using a registry
- Loading branch information
Showing
5 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ContainerImageUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.quarkus.kubernetes.deployment; | ||
|
||
import static io.quarkus.container.image.deployment.util.ImageUtil.hasRegistry; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.container.image.deployment.ContainerImageCapabilitiesUtil; | ||
import io.quarkus.container.spi.ContainerImageInfoBuildItem; | ||
import io.quarkus.deployment.Capabilities; | ||
|
||
final class ContainerImageUtil { | ||
|
||
private ContainerImageUtil() { | ||
} | ||
|
||
static boolean isRegistryMissingAndNotS2I(Capabilities capabilities, ContainerImageInfoBuildItem containerImageInfo) { | ||
Optional<String> activeContainerImageCapability = ContainerImageCapabilitiesUtil | ||
.getActiveContainerImageCapability(capabilities); | ||
if (!activeContainerImageCapability.isPresent()) { // shouldn't ever happen when this method is called | ||
return false; | ||
} | ||
|
||
return !hasRegistry(containerImageInfo.getImage()) | ||
&& !Capabilities.CONTAINER_IMAGE_S2I.equals(activeContainerImageCapability.get()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters