From 987b7006b5ddeafc79aa921c8e5719632bef6f53 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 3 May 2023 10:54:17 +0200 Subject: [PATCH] refactor: remove unused `jkube.docker.apiVersion` and minimalApiVersion fields Signed-off-by: Marc Nuri --- .../asciidoc/inc/_groovy-configuration.adoc | 5 -- .../gradle/plugin/KubernetesExtension.java | 6 --- .../gradle/plugin/task/AbstractJKubeTask.java | 1 - .../jkube/gradle/plugin/task/TaskUtil.java | 1 - .../KubernetesExtensionPropertyTest.java | 2 - .../plugin/TestKubernetesExtension.java | 5 -- .../gradle/plugin/TestOpenShiftExtension.java | 5 -- .../service/docker/DockerAccessFactory.java | 1 - .../service/docker/helper/ConfigHelper.java | 53 ++++++------------- .../docker/helper/ImageNameFormatter.java | 2 +- .../docker/ImageConfigurationTest.java | 47 ---------------- .../docker/helper/ConfigHelperTest.java | 10 ++-- .../inc/goals/build/_jkube-build.adoc | 9 +--- .../plugin/mojo/build/AbstractDockerMojo.java | 8 +-- .../maven/plugin/mojo/build/ResourceMojo.java | 1 - 15 files changed, 25 insertions(+), 131 deletions(-) delete mode 100644 jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/ImageConfigurationTest.java diff --git a/gradle-plugin/doc/src/main/asciidoc/inc/_groovy-configuration.adoc b/gradle-plugin/doc/src/main/asciidoc/inc/_groovy-configuration.adoc index e465301d1f..a76eb33c09 100644 --- a/gradle-plugin/doc/src/main/asciidoc/inc/_groovy-configuration.adoc +++ b/gradle-plugin/doc/src/main/asciidoc/inc/_groovy-configuration.adoc @@ -8,11 +8,6 @@ |==== | Element | Description | Property -| *apiVersion* -| Use this variable if you are using an older version of docker not compatible with the current default use to -communicate with the server. -| `jkube.docker.apiVersion` - | *authConfig* | Authentication information when pulling from or pushing to Docker registry. There is a dedicated section <> for how to do security. diff --git a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/KubernetesExtension.java b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/KubernetesExtension.java index f4c37512fd..5e8188f57a 100644 --- a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/KubernetesExtension.java +++ b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/KubernetesExtension.java @@ -141,8 +141,6 @@ public abstract class KubernetesExtension { public abstract Property getCertPath(); - public abstract Property getMinimalApiVersion(); - public abstract Property getSkipMachine(); public abstract Property getForcePull(); @@ -585,10 +583,6 @@ public String getFilterOrNull() { return getOrDefaultString("jkube.image.filter", this::getFilter, null); } - public String getApiVersionOrNull() { - return getOrDefaultString("jkube.docker.apiVersion", this::getApiVersion, null); - } - public String getImagePullPolicyOrNull() { return getOrDefaultString("jkube.docker.imagePullPolicy", this::getImagePullPolicy, null); } diff --git a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/AbstractJKubeTask.java b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/AbstractJKubeTask.java index b6336b91f8..a678f74132 100644 --- a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/AbstractJKubeTask.java +++ b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/AbstractJKubeTask.java @@ -179,7 +179,6 @@ protected ProcessorConfig extractGeneratorConfig() { protected List resolveImages(ImageConfigResolver imageConfigResolver) throws IOException { return initImageConfiguration( - kubernetesExtension.getApiVersionOrNull(), getBuildTimestamp(null, null, kubernetesExtension.javaProject.getBuildDirectory().getAbsolutePath(), DOCKER_BUILD_TIMESTAMP), kubernetesExtension.images, imageConfigResolver, kitLogger, diff --git a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/TaskUtil.java b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/TaskUtil.java index 1a90aac9fc..46d15f461a 100644 --- a/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/TaskUtil.java +++ b/gradle-plugin/kubernetes/src/main/java/org/eclipse/jkube/gradle/plugin/task/TaskUtil.java @@ -53,7 +53,6 @@ public static DockerAccess initDockerAccess(KubernetesExtension kubernetesExtens .dockerHost(kubernetesExtension.getDockerHostOrNull()) .certPath(kubernetesExtension.getCertPathOrNull()) .machine(kubernetesExtension.machine) - .minimalApiVersion(kubernetesExtension.getMinimalApiVersion().getOrNull()) .skipMachine(kubernetesExtension.getSkipMachineOrDefault()) .build(); DockerAccessFactory dockerAccessFactory = new DockerAccessFactory(); diff --git a/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/KubernetesExtensionPropertyTest.java b/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/KubernetesExtensionPropertyTest.java index f21b0a8393..62576bd27a 100644 --- a/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/KubernetesExtensionPropertyTest.java +++ b/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/KubernetesExtensionPropertyTest.java @@ -90,7 +90,6 @@ static Stream defaultValues() { arguments("getUseColorOrDefault", true), arguments("getMaxConnectionsOrDefault", 100), arguments("getFilterOrNull", null), - arguments("getApiVersionOrNull", null), arguments("getImagePullPolicyOrNull", null), arguments("getAutoPullOrNull", null), arguments("getDockerHostOrNull", null), @@ -178,7 +177,6 @@ static Stream propertiesAndValues() { arguments("getUseColorOrDefault", "jkube.useColor", "false", false), arguments("getMaxConnectionsOrDefault", "jkube.docker.maxConnections", "1337", 1337), arguments("getFilterOrNull", "jkube.image.filter", "foo", "foo"), - arguments("getApiVersionOrNull", "jkube.docker.apiVersion", "1.24", "1.24"), arguments("getImagePullPolicyOrNull", "jkube.docker.imagePullPolicy", "Always", "Always"), arguments("getAutoPullOrNull", "jkube.docker.autoPull", "true", "true"), arguments("getDockerHostOrNull", "jkube.docker.host", "unix:///var/run/docker.sock", "unix:///var/run/docker.sock"), diff --git a/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/TestKubernetesExtension.java b/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/TestKubernetesExtension.java index c071cc9f1f..d4e25e3e0e 100644 --- a/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/TestKubernetesExtension.java +++ b/gradle-plugin/kubernetes/src/test/java/org/eclipse/jkube/gradle/plugin/TestKubernetesExtension.java @@ -87,11 +87,6 @@ public Property getCertPath() { return new DefaultProperty<>(String.class); } - @Override - public Property getMinimalApiVersion() { - return new DefaultProperty<>(String.class); - } - @Override public Property getSkipMachine() { return new DefaultProperty<>(Boolean.class); diff --git a/gradle-plugin/openshift/src/test/java/org/eclipse/jkube/gradle/plugin/TestOpenShiftExtension.java b/gradle-plugin/openshift/src/test/java/org/eclipse/jkube/gradle/plugin/TestOpenShiftExtension.java index d7bc38f3f6..b861e0c665 100644 --- a/gradle-plugin/openshift/src/test/java/org/eclipse/jkube/gradle/plugin/TestOpenShiftExtension.java +++ b/gradle-plugin/openshift/src/test/java/org/eclipse/jkube/gradle/plugin/TestOpenShiftExtension.java @@ -84,11 +84,6 @@ public Property getCertPath() { return new DefaultProperty<>(String.class); } - @Override - public Property getMinimalApiVersion() { - return new DefaultProperty<>(String.class); - } - @Override public Property getSkipMachine() { return new DefaultProperty<>(Boolean.class); diff --git a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/DockerAccessFactory.java b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/DockerAccessFactory.java index 01aed1fe6d..79ff1ca162 100644 --- a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/DockerAccessFactory.java +++ b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/DockerAccessFactory.java @@ -127,7 +127,6 @@ public static class DockerAccessContext implements Serializable { private DockerMachineConfiguration machine; private List dockerHostProviders; private boolean skipMachine; - private String minimalApiVersion; private String dockerHost; private String certPath; private int maxConnections; diff --git a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelper.java b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelper.java index 17b6a99cd0..d3b4887286 100644 --- a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelper.java +++ b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelper.java @@ -21,7 +21,6 @@ import org.eclipse.jkube.kit.build.service.docker.config.handler.property.PropertyMode; import org.eclipse.jkube.kit.common.JavaProject; import org.eclipse.jkube.kit.common.KitLogger; -import org.eclipse.jkube.kit.common.util.EnvUtil; import org.eclipse.jkube.kit.common.util.JKubeProjectUtil; import java.io.File; @@ -119,22 +118,6 @@ public static String getExternalConfigActivationProperty(JavaProject project) { return value; } - /** - * Initialize and validate the configuration. - * - * - * @param images the images to check - * @param apiVersion the original API version intended to use - * @param nameFormatter formatter for image names - */ - private static void initAndValidate(List images, String apiVersion, NameFormatter nameFormatter, KitLogger log, JKubeConfiguration jKubeConfiguration) { - // Init and validate configs. After this step, getResolvedImages() contains the valid configuration. - for (ImageConfiguration imageConfiguration : images) { - apiVersion = EnvUtil.extractLargerVersion(apiVersion, initAndValidate(nameFormatter, imageConfiguration)); - printDockerfileInfoIfDockerfileMode(imageConfiguration, log, jKubeConfiguration); - } - } - // Check if the provided image configuration matches the given public static boolean matchesConfiguredImages(String imageList, ImageConfiguration imageConfig) { if (imageList == null) { @@ -181,16 +164,15 @@ private static void verifyImageNames(List ret) { } } - public static List initImageConfiguration(String apiVersion, Date buildTimeStamp, List images, ImageConfigResolver imageConfigResolver, KitLogger log, String filter, ConfigHelper.Customizer customizer, JKubeConfiguration jKubeConfiguration) { - List resolvedImages; - ImageNameFormatter imageNameFormatter = new ImageNameFormatter(jKubeConfiguration.getProject(), buildTimeStamp); + public static List initImageConfiguration(Date buildTimeStamp, List unresolvedImages, ImageConfigResolver imageConfigResolver, KitLogger log, String filter, ConfigHelper.Customizer customizer, JKubeConfiguration jKubeConfiguration) { + final ImageNameFormatter imageNameFormatter = new ImageNameFormatter(jKubeConfiguration.getProject(), buildTimeStamp); // Resolve images - resolvedImages = ConfigHelper.resolveImages( + final List resolvedImages = ConfigHelper.resolveImages( log, - images, // Unresolved images + unresolvedImages, (ImageConfiguration image) -> imageConfigResolver.resolve(image, jKubeConfiguration.getProject()), filter, // A filter which image to process - customizer); // customizer (can be overwritten by a subclass) + customizer); // customizer (can be overwritten by a subclass) // Check for simple Dockerfile mode ImageConfiguration dockerFileImageConfig = createImageConfigurationForSimpleDockerfile(resolvedImages, jKubeConfiguration, imageNameFormatter); @@ -202,8 +184,17 @@ public static List initImageConfiguration(String apiVersion, } } - // Initialize configuration and detect minimal API version - initAndValidate(resolvedImages, apiVersion, imageNameFormatter, log, jKubeConfiguration); + // Init and validate Image configurations. After this step, getResolvedImages() contains the valid configuration. + for (ImageConfiguration imageConfiguration : resolvedImages) { + imageConfiguration.setName(imageNameFormatter.format(imageConfiguration.getName())); + if (imageConfiguration.getBuild() != null) { + imageConfiguration.getBuild().initAndValidate(); + } + if (imageConfiguration.getRun() != null) { + imageConfiguration.getRun().initAndValidate(); + } + printDockerfileInfoIfDockerfileMode(imageConfiguration, log, jKubeConfiguration); + } return resolvedImages; } @@ -249,18 +240,6 @@ private interface Resolver { List resolve(ImageConfiguration image); } - public static String initAndValidate(ConfigHelper.NameFormatter nameFormatter, ImageConfiguration imageConfiguration) { - imageConfiguration.setName(nameFormatter.format(imageConfiguration.getName())); - String minimalApiVersion = null; - if (imageConfiguration.getBuild() != null) { - minimalApiVersion = imageConfiguration.getBuild().initAndValidate(); - } - if (imageConfiguration.getRun() != null) { - minimalApiVersion = EnvUtil.extractLargerVersion(minimalApiVersion, imageConfiguration.getRun().initAndValidate()); - } - return minimalApiVersion; - } - /** * Format an image name by replacing certain placeholders */ diff --git a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ImageNameFormatter.java b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ImageNameFormatter.java index 2c1ca06b1f..c0f7b892f3 100644 --- a/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ImageNameFormatter.java +++ b/jkube-kit/build/service/docker/src/main/java/org/eclipse/jkube/kit/build/service/docker/helper/ImageNameFormatter.java @@ -43,7 +43,7 @@ public class ImageNameFormatter implements ConfigHelper.NameFormatter { private final FormatParameterReplacer formatParamReplacer; private final Date now; - private JavaProject project; + private final JavaProject project; public ImageNameFormatter(JavaProject project, Date now) { this.now = now; diff --git a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/ImageConfigurationTest.java b/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/ImageConfigurationTest.java deleted file mode 100644 index 238325020b..0000000000 --- a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/ImageConfigurationTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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 - */ -package org.eclipse.jkube.kit.build.service.docker; - - -import org.eclipse.jkube.kit.build.service.docker.helper.ConfigHelper; -import org.eclipse.jkube.kit.config.image.RunImageConfiguration; -import org.eclipse.jkube.kit.config.image.ImageConfiguration; -import org.eclipse.jkube.kit.config.image.build.BuildConfiguration; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -class ImageConfigurationTest { - - @Test - void initAndValidateWithBuildAndRun() { - ConfigHelper.NameFormatter nameFormatter = mock(ConfigHelper.NameFormatter.class); - BuildConfiguration buildConfiguration = mock(BuildConfiguration.class); - RunImageConfiguration runImageConfiguration = mock(RunImageConfiguration.class); - // Given - final ImageConfiguration imageConfiguration = ImageConfiguration.builder() - .build(buildConfiguration) - .run(runImageConfiguration) - .build(); - when(buildConfiguration.initAndValidate()).thenReturn("1.337"); - when(runImageConfiguration.initAndValidate()).thenReturn("13.37"); - // When - final String result = ConfigHelper.initAndValidate(nameFormatter, imageConfiguration); - // Then - assertThat(result).isEqualTo("13.37"); - } -} diff --git a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelperTest.java b/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelperTest.java index 1fa96fc136..a5e1ed1514 100644 --- a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelperTest.java +++ b/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/helper/ConfigHelperTest.java @@ -74,7 +74,7 @@ void initImageConfiguration_withSimpleImageConfiguration_shouldReturnImageConfig when(imageConfigResolver.resolve(dummyImageConfiguration, javaProject)).thenReturn(images); // When - List resolvedImages = ConfigHelper.initImageConfiguration("1.12", new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); + List resolvedImages = ConfigHelper.initImageConfiguration(new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); // Then assertThat(resolvedImages).isNotNull() @@ -93,7 +93,7 @@ void initImageConfiguration_withSimpleDockerFileInProjectBaseDir_shouldCreateIma .build(); // When - List resolvedImages = ConfigHelper.initImageConfiguration("1.12", new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); + List resolvedImages = ConfigHelper.initImageConfiguration(new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); // Then assertThat(resolvedImages).isNotNull() @@ -119,7 +119,7 @@ void initImageConfiguration_withSimpleDockerFileModeEnabledAndImageConfiguration when(imageConfigResolver.resolve(dummyImageConfiguration, jKubeConfiguration.getProject())).thenReturn(images); // When - List resolvedImages = ConfigHelper.initImageConfiguration("1.12", new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); + List resolvedImages = ConfigHelper.initImageConfiguration(new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration); // Then assertThat(resolvedImages).isNotNull() @@ -140,7 +140,7 @@ void initImageConfiguration_whenImageConfigurationNameBlank_thenThrowException() // When + Then assertThatIllegalArgumentException() - .isThrownBy(() -> ConfigHelper.initImageConfiguration("1.12", new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration)) + .isThrownBy(() -> ConfigHelper.initImageConfiguration(new Date(), images, imageConfigResolver, logger, null, configs -> configs, jKubeConfiguration)) .withMessage("Configuration error: must have a non-null "); } @@ -152,7 +152,7 @@ void initImageConfiguration_whenNoMatchForImageFilter_thenLogWarning() { when(imageConfigResolver.resolve(dummyImageConfiguration, javaProject)).thenReturn(images); // When - ConfigHelper.initImageConfiguration("1.12", new Date(), images, imageConfigResolver, logger, "i-dont-exist", configs -> configs, jKubeConfiguration); + ConfigHelper.initImageConfiguration(new Date(), images, imageConfigResolver, logger, "i-dont-exist", configs -> configs, jKubeConfiguration); // Then verify(logger).warn("None of the resolved images [%s] match the configured filter '%s'", "foo/bar:latest", "i-dont-exist"); diff --git a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_jkube-build.adoc b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_jkube-build.adoc index 9e71b11bf0..6538359cff 100644 --- a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_jkube-build.adoc +++ b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_jkube-build.adoc @@ -138,7 +138,7 @@ a| Defines what build strategy to choose while building container image. Possible values are `docker` and `jib` out of which `docker` is default. ifeval::["{goal-prefix}" == "oc"] -If the effective <> is `openshift` an additional `s2i` option is available +If the build is performed in an OpenShift cluster an additional `s2i` option is available and selected by default. Available strategies for OpenShift are: @@ -149,11 +149,6 @@ Available strategies for OpenShift are: endif::[] | `jkube.build.strategy` -| *apiVersion* -| Use this variable if you are using an older version of docker not compatible with the current default use to - communicate with the server. -| `jkube.docker.apiVersion` - | *authConfig* | Authentication information when pulling from or pushing to Docker registry. There is a dedicated section <> for how to do security. @@ -170,7 +165,7 @@ a| Decide how to pull missing base images or images to start: | `jkube.docker.autoPull` | *buildRecreate* -a| If the effective <> is `openshift` then this option decides how the OpenShift resource objects +a| If the build is performed in an OpenShift cluster then this option decides how the OpenShift resource objects associated with the build should be treated when they already exist: * `buildConfig` or `bc` : Only the BuildConfig is recreated diff --git a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/AbstractDockerMojo.java b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/AbstractDockerMojo.java index 166e014fed..51bca2459e 100644 --- a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/AbstractDockerMojo.java +++ b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/AbstractDockerMojo.java @@ -113,9 +113,6 @@ public abstract class AbstractDockerMojo extends AbstractMojo @Parameter(defaultValue = "${mojoExecution}", readonly = true) protected MojoExecution mojoExecution; - @Parameter(property = "jkube.docker.apiVersion") - protected String apiVersion; - // For verbose output @Parameter(property = "jkube.docker.verbose", defaultValue = "false") protected String verbose; @@ -322,8 +319,6 @@ public abstract class AbstractDockerMojo extends AbstractMojo protected LogOutputSpecFactory logOutputSpecFactory; - protected String minimalApiVersion; - // Access for creating OpenShift binary builds protected ClusterAccess clusterAccess; @@ -447,7 +442,7 @@ protected void doExecute() throws MojoExecutionException { .buildServiceConfig(buildServiceConfigBuilder().build()) .offline(offline) .build(); - resolvedImages = ConfigHelper.initImageConfiguration(apiVersion, getBuildTimestamp(getPluginContext(), CONTEXT_KEY_BUILD_TIMESTAMP, project.getBuild().getDirectory(), DOCKER_BUILD_TIMESTAMP), images, imageConfigResolver, log, filter, this, jkubeServiceHub.getConfiguration()); + resolvedImages = ConfigHelper.initImageConfiguration(getBuildTimestamp(getPluginContext(), CONTEXT_KEY_BUILD_TIMESTAMP, project.getBuild().getDirectory(), DOCKER_BUILD_TIMESTAMP), images, imageConfigResolver, log, filter, this, jkubeServiceHub.getConfiguration()); executeInternal(); } catch (IOException | DependencyResolutionRequiredException exp) { logException(exp); @@ -520,7 +515,6 @@ protected DockerAccessFactory.DockerAccessContext getDockerAccessContext() { .certPath(certPath) .machine(machine) .maxConnections(maxConnections) - .minimalApiVersion(minimalApiVersion) .projectProperties(project.getProperties()) .skipMachine(skipMachine) .log(log) diff --git a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/ResourceMojo.java b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/ResourceMojo.java index 420c9a9182..a9e6d3d449 100644 --- a/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/ResourceMojo.java +++ b/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/ResourceMojo.java @@ -323,7 +323,6 @@ private ProcessorConfig extractGeneratorConfig() throws IOException { private List getResolvedImages(List images, final KitLogger log) throws IOException { return ConfigHelper.initImageConfiguration( - null /* no minimal api version */, getBuildTimestamp(getPluginContext(), CONTEXT_KEY_BUILD_TIMESTAMP, project.getBuild().getDirectory(), DOCKER_BUILD_TIMESTAMP), images, imageConfigResolver,