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

Take image-pull-policy config into account for init-containers #34126

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static Container convert(Map.Entry<String, ContainerConfig> e) {
private static ContainerBuilder convert(String name, ContainerConfig c) {
ContainerBuilder b = new ContainerBuilder();
b.withName(name);
b.withImagePullPolicy(c.imagePullPolicy);
c.image.ifPresent(b::withImage);
c.workingDir.ifPresent(b::withWorkingDir);
c.command.ifPresent(w -> b.withCommand(w.toArray(new String[0])));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void assertGeneratedResources() throws IOException {
assertThat(r.getLimits().get("cpu")).isEqualTo(new Quantity("500m"));
assertThat(r.getLimits().get("memory")).isEqualTo(new Quantity("128Mi"));
});
assertThat(c.getImagePullPolicy()).isEqualTo("Always");
});

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ quarkus.kubernetes.init-containers.foo.arguments=-c cp /some/file /somewhere/els
quarkus.kubernetes.init-containers.foo.resources.requests.cpu=250m
quarkus.kubernetes.init-containers.foo.resources.requests.memory=64Mi
quarkus.kubernetes.init-containers.foo.resources.limits.cpu=500m
quarkus.kubernetes.init-containers.foo.resources.limits.memory=128Mi
quarkus.kubernetes.init-containers.foo.resources.limits.memory=128Mi
quarkus.kubernetes.init-containers.foo.image-pull-policy=Always