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

fix: Quarkus native base image read from properties (configurable) #2224

Merged
merged 1 commit into from
Jun 21, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Usage:
* Fix #1713: Add HelidonHealthCheckEnricher to add Kubernetes health checks for Helidon applications
* Fix #1714: Add HelidonGenerator to add opinionated container image for Helidon applications
* Fix #1985: Update outdated methods in Spring Boot CRD Maven Quickstart
* Fix #2224: Quarkus native base image read from properties (configurable)

### 1.13.1 (2023-06-16)
* Fix #2212: Bump Kubernetes Client version to 6.7.2 (fixes issues when trace-logging OpenShift builds -regression in 6.7.1-)
Expand Down
14 changes: 14 additions & 0 deletions jkube-kit/jkube-kit-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,18 @@
</dependency>

</dependencies>

<build>
<resources>
<!-- Copy over default images versions defined above -->
<resource>
<directory>src/main/resources-filtered</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
package org.eclipse.jkube.quarkus.generator;

import org.eclipse.jkube.generator.api.FromSelector;
import org.eclipse.jkube.generator.api.GeneratorConfig;
import org.eclipse.jkube.generator.api.GeneratorContext;
import org.eclipse.jkube.kit.common.Arguments;
Expand All @@ -21,7 +22,6 @@
import org.eclipse.jkube.kit.common.AssemblyFileSet;
import org.eclipse.jkube.kit.common.JavaProject;
import org.eclipse.jkube.kit.common.util.FileUtil;
import org.eclipse.jkube.kit.config.resource.RuntimeMode;

import java.util.Properties;

Expand All @@ -31,17 +31,16 @@

public class NativeGenerator extends AbstractQuarkusNestedGenerator {

private final FromSelector fromSelector;

public NativeGenerator(GeneratorContext generatorContext, GeneratorConfig generatorConfig) {
super(generatorContext, generatorConfig);
fromSelector = new FromSelector.Default(generatorContext, "quarkus-native");
}

@Override
public String getFrom() {
// TODO: use value from property
if (getRuntimeMode() != RuntimeMode.OPENSHIFT) {
return "registry.access.redhat.com/ubi8/ubi-minimal:8.6";
}
return "quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0";
return fromSelector.getFrom();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at:
#
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

# Properties for specifying the default images version to use
# The replacement values are defined in the parent pom.xml as properties

# Upstream images
quarkus-native.upstream.s2i=${image.quarkus-native.upstream.s2i}
quarkus-native.upstream.docker=${image.quarkus-native.upstream.docker}
quarkus-native.upstream.istag=${image.quarkus-native.upstream.istag}
5 changes: 5 additions & 0 deletions jkube-kit/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
<image.helidon-native.upstream.docker>registry.access.redhat.com/ubi8/ubi-minimal:${version.image.ubi-minimal}</image.helidon-native.upstream.docker>
<image.helidon-native.upstream.istag>registry.access.redhat.com/ubi8/ubi-minimal:${version.image.ubi-minimal}</image.helidon-native.upstream.istag>

<!-- Quarkus --> <!-- TODO: Bump UBI minimal image -->
<image.quarkus-native.upstream.s2i>quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0</image.quarkus-native.upstream.s2i>
<image.quarkus-native.upstream.docker>registry.access.redhat.com/ubi8/ubi-minimal:8.6</image.quarkus-native.upstream.docker>
<image.quarkus-native.upstream.istag>quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0</image.quarkus-native.upstream.istag>

<!-- karaf -->
<image.karaf.upstream.docker>quay.io/jkube/jkube-karaf:${version.image.karaf.upstream.docker}</image.karaf.upstream.docker>
<image.karaf.upstream.s2i>quay.io/jkube/jkube-karaf:${version.image.karaf.upstream.s2i}</image.karaf.upstream.s2i>
Expand Down