From 899f8f007d2b9715a405771d394515619ed23f72 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Fri, 13 May 2022 09:23:49 +0200 Subject: [PATCH 01/28] restore core to upstream version update docker file for camel-k operator change makefile to build multiplatform image add platform parameter to buildah task --- build/Dockerfile | 2 +- go.mod | 1 + go.sum | 2 +- pkg/controller/build/build_pod.go | 5 ++++- script/Makefile | 22 +++++++++++++++++++--- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b8d28551da..a574e2c692 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM quay.io/quarkus/ubi-quarkus-mandrel:21.3.0.0-Final-java11 +FROM --platform=$BUILDPLATFORM quay.io/quarkus/ubi-quarkus-mandrel:22.1.0.0-Final-java11 ARG MAVEN_VERSION="3.8.4" ARG MAVEN_HOME="/usr/share/maven" diff --git a/go.mod b/go.mod index 1fd5047e7c..a3d8384650 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/apache/camel-k/pkg/client/camel v0.0.0 github.com/apache/camel-k/pkg/kamelet/repository v0.0.0 github.com/container-tools/spectrum v0.3.8 + github.com/containerd/containerd v1.5.8 github.com/evanphx/json-patch v4.12.0+incompatible github.com/fatih/camelcase v1.0.0 github.com/fatih/structs v1.1.0 diff --git a/go.sum b/go.sum index f155714a0a..e40098bfc7 100644 --- a/go.sum +++ b/go.sum @@ -308,6 +308,7 @@ github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7 github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw= github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -2042,7 +2043,6 @@ k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8 k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= -k8s.io/code-generator v0.22.5 h1:jn+mYXI5q7rzo7Bz/n8xZIgbe61SeXlIjU5jA8jLVps= k8s.io/code-generator v0.22.5/go.mod h1:sbdWCOVob+KaQ5O7xs8PNNaCTpbWVqNgA6EPwLOmRNk= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 00cab13aa3..9d58b9308c 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -20,6 +20,7 @@ package build import ( "context" "fmt" + "github.com/containerd/containerd/platforms" "os" "path" "strconv" @@ -30,7 +31,6 @@ import ( corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - ctrl "sigs.k8s.io/controller-runtime/pkg/client" v1 "github.com/apache/camel-k/pkg/apis/camel/v1" @@ -38,6 +38,7 @@ import ( "github.com/apache/camel-k/pkg/platform" "github.com/apache/camel-k/pkg/util/defaults" "github.com/apache/camel-k/pkg/util/kubernetes" + _ "github.com/containerd/containerd/platforms" ) const ( @@ -243,6 +244,8 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta "buildah", "bud", "--storage-driver=vfs", + "--arch", + platforms.DefaultSpec().Architecture, "-f", "Dockerfile", "-t", diff --git a/script/Makefile b/script/Makefile index 2bfb00e07e..dad2afe89f 100644 --- a/script/Makefile +++ b/script/Makefile @@ -29,6 +29,7 @@ OPM_VERSION := v1.21.0 BASE_IMAGE := adoptopenjdk/openjdk11:slim LOCAL_REPOSITORY := /tmp/artifacts/m2 IMAGE_NAME := docker.io/apache/camel-k +IMAGE_TARGET_PLATFORM := linux/amd64 # # Situations when user wants to override @@ -86,6 +87,15 @@ TEST_PREBUILD = build #GOLDFLAGS += -X github.com/apache/camel-k/pkg/util/olm.DefaultStartingCSV= #GOLDFLAGS += -X github.com/apache/camel-k/pkg/util/olm.DefaultGlobalNamespace=openshift-operators +# Define target platform for docker build +ifeq ($(shell uname -r), x86_x64) +IMAGE_TARGET_PLATFORM = linux/amd64 +endif + +ifeq ($(shell uname -r), aarch64) +IMAGE_TARGET_PLATFORM = linux/arm64 +endif + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -324,7 +334,9 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) else cp kamel build/_output/bin endif - docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + docker buildx rm --all-inactive --force + docker buildx create --append --name builder + docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-dev: bundle-kamelets test package-artifacts maven-overlay mkdir -p build/_maven_output @@ -334,7 +346,9 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) else cp kamel build/_output/bin endif - docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + docker buildx rm --all-inactive --force + docker buildx create --append --name builder + docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-push: docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION) @@ -539,4 +553,6 @@ endif # Build the bundle image. bundle-build: bundle - cd bundle && docker build -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . + docker buildx rm --all-inactive --force + docker buildx create --append --name builder + cd bundle && docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . From 680fc7fe56796548eb2667547bf01e03ecda8072 Mon Sep 17 00:00:00 2001 From: rob Date: Sun, 15 May 2022 10:41:19 +0200 Subject: [PATCH 02/28] correct image and make file script --- build/Dockerfile | 2 +- script/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index a574e2c692..799e65da5c 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=$BUILDPLATFORM quay.io/quarkus/ubi-quarkus-mandrel:22.1.0.0-Final-java11 +FROM --platform=$BUILDPLATFORM ghcr.io/graalvm/graalvm-ce:ol8-java11-22.1.0 ARG MAVEN_VERSION="3.8.4" ARG MAVEN_HOME="/usr/share/maven" diff --git a/script/Makefile b/script/Makefile index dad2afe89f..a4f5243598 100644 --- a/script/Makefile +++ b/script/Makefile @@ -88,11 +88,11 @@ TEST_PREBUILD = build #GOLDFLAGS += -X github.com/apache/camel-k/pkg/util/olm.DefaultGlobalNamespace=openshift-operators # Define target platform for docker build -ifeq ($(shell uname -r), x86_x64) +ifeq ($(shell uname -m), x86_x64) IMAGE_TARGET_PLATFORM = linux/amd64 endif -ifeq ($(shell uname -r), aarch64) +ifeq ($(shell uname -m), aarch64) IMAGE_TARGET_PLATFORM = linux/arm64 endif From aaef9e47989d221bf3b703514cfd50ad9e667d61 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 17 May 2022 01:24:53 +0200 Subject: [PATCH 03/28] update buildah image version for multi platform support --- pkg/util/defaults/defaults.go | 2 +- script/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index e6ba7de4c2..1ee3ba5a8a 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -29,7 +29,7 @@ const ( DefaultRuntimeVersion = "1.13.0" // BuildahVersion -- - BuildahVersion = "1.14.0" + BuildahVersion = "1.23.3" // KanikoVersion -- KanikoVersion = "0.17.1" diff --git a/script/Makefile b/script/Makefile index a4f5243598..1f309c486a 100644 --- a/script/Makefile +++ b/script/Makefile @@ -19,7 +19,7 @@ OPERATOR_VERSION := $(subst -SNAPSHOT,,$(VERSION)) LAST_RELEASED_IMAGE_NAME := camel-k-operator LAST_RELEASED_VERSION := 1.9.0 RUNTIME_VERSION := 1.13.0 -BUILDAH_VERSION := 1.14.0 +BUILDAH_VERSION := 1.23.3 KANIKO_VERSION := 0.17.1 INSTALL_DEFAULT_KAMELETS := true CONTROLLER_GEN_VERSION := v0.6.1 From 868d9aabdd6f171fe8575217b003071168bb4863 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 17 May 2022 02:13:28 +0200 Subject: [PATCH 04/28] replace arch with platform --- pkg/controller/build/build_pod.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 9d58b9308c..cd2ac82525 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -244,8 +244,8 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta "buildah", "bud", "--storage-driver=vfs", - "--arch", - platforms.DefaultSpec().Architecture, + "--platform", + platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture, "-f", "Dockerfile", "-t", From 9610b54b6c8724f39d04c9803305c54592901337 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 17 May 2022 10:24:41 +0200 Subject: [PATCH 05/28] add variant field and change the policy --- pkg/controller/build/build_pod.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index cd2ac82525..1a03ae8ce3 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -245,7 +245,8 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta "bud", "--storage-driver=vfs", "--platform", - platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture, + platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant, + "--pull-always", "-f", "Dockerfile", "-t", From 82de032e916ba243f9ab28299c9d6548cc309033 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 17 May 2022 10:35:54 +0200 Subject: [PATCH 06/28] add docker.io inside baseimage --- pkg/util/defaults/defaults.go | 2 +- script/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index 1ee3ba5a8a..fcd47293f3 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -35,7 +35,7 @@ const ( KanikoVersion = "0.17.1" // baseImage -- - baseImage = "adoptopenjdk/openjdk11:slim" + baseImage = "docker.io/adoptopenjdk/openjdk11:slim" // LocalRepository -- LocalRepository = "/tmp/artifacts/m2" diff --git a/script/Makefile b/script/Makefile index 1f309c486a..39507bf781 100644 --- a/script/Makefile +++ b/script/Makefile @@ -26,7 +26,7 @@ CONTROLLER_GEN_VERSION := v0.6.1 OPERATOR_SDK_VERSION := v1.14.0 KUSTOMIZE_VERSION := v4.1.2 OPM_VERSION := v1.21.0 -BASE_IMAGE := adoptopenjdk/openjdk11:slim +BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim LOCAL_REPOSITORY := /tmp/artifacts/m2 IMAGE_NAME := docker.io/apache/camel-k IMAGE_TARGET_PLATFORM := linux/amd64 From 883606f239c72b6a3582b2bd2aa774f937bcbad6 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 24 May 2022 19:40:42 +0200 Subject: [PATCH 07/28] obtain architecture value from PublishStrategyOptions add buildah go file inside builder package add Architecture field inside publish task and mapping to buildah --- pkg/apis/camel/v1/build_types.go | 2 ++ pkg/builder/buildah.go | 20 ++++++++++++++++++++ pkg/controller/build/build_pod.go | 3 +-- pkg/trait/builder.go | 13 +++++++++++-- 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pkg/builder/buildah.go diff --git a/pkg/apis/camel/v1/build_types.go b/pkg/apis/camel/v1/build_types.go index f045fa6449..248aa0accd 100644 --- a/pkg/apis/camel/v1/build_types.go +++ b/pkg/apis/camel/v1/build_types.go @@ -95,6 +95,8 @@ type MavenBuildSpec struct { type PublishTask struct { // can be useful to share info with other tasks ContextDir string `json:"contextDir,omitempty"` + // Architecture of image + Architecture string `json:"baseImage,omitempty"` // base image layer BaseImage string `json:"baseImage,omitempty"` // final image name diff --git a/pkg/builder/buildah.go b/pkg/builder/buildah.go new file mode 100644 index 0000000000..0e44ab140e --- /dev/null +++ b/pkg/builder/buildah.go @@ -0,0 +1,20 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package builder + +const Architecture = "Architecture" diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 1a03ae8ce3..97e47dad75 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -20,7 +20,6 @@ package build import ( "context" "fmt" - "github.com/containerd/containerd/platforms" "os" "path" "strconv" @@ -245,7 +244,7 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta "bud", "--storage-driver=vfs", "--platform", - platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant, + task.Architecture, "--pull-always", "-f", "Dockerfile", diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 21908ed032..59ea0cd240 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -19,6 +19,7 @@ package trait import ( "fmt" + "github.com/containerd/containerd/platforms" "sort" corev1 "k8s.io/api/core/v1" @@ -101,13 +102,20 @@ func (t *builderTrait) Apply(e *Environment) error { }}) case v1.IntegrationPlatformBuildPublishStrategyBuildah: + var architecture string + var found bool + if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.Architecture]; !found { + architecture = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant + } + e.BuildTasks = append(e.BuildTasks, v1.Task{Buildah: &v1.BuildahTask{ BaseTask: v1.BaseTask{ Name: "buildah", }, PublishTask: v1.PublishTask{ - Image: getImageName(e), - Registry: e.Platform.Status.Build.Registry, + Architecture: architecture, + Image: getImageName(e), + Registry: e.Platform.Status.Build.Registry, }, Verbose: t.Verbose, }}) @@ -151,6 +159,7 @@ func (t *builderTrait) builderTask(e *Environment) (*v1.BuilderTask, error) { for _, repo := range e.IntegrationKit.Spec.Repositories { maven.Repositories = append(maven.Repositories, mvn.NewRepository(repo)) } + task := &v1.BuilderTask{ BaseTask: v1.BaseTask{ Name: "builder", From 0d25484f8c22f356aefdbfa11e43cb06926e5d86 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 24 May 2022 19:49:14 +0200 Subject: [PATCH 08/28] replace name of buildah property --- pkg/builder/buildah.go | 2 +- pkg/trait/builder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/builder/buildah.go b/pkg/builder/buildah.go index 0e44ab140e..ea311a6a95 100644 --- a/pkg/builder/buildah.go +++ b/pkg/builder/buildah.go @@ -17,4 +17,4 @@ limitations under the License. package builder -const Architecture = "Architecture" +const BuildahArchitecturePlatform = "BuildahArchitecturePlatform" diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 59ea0cd240..8cf8c880f1 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -104,7 +104,7 @@ func (t *builderTrait) Apply(e *Environment) error { case v1.IntegrationPlatformBuildPublishStrategyBuildah: var architecture string var found bool - if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.Architecture]; !found { + if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahArchitecturePlatform]; !found { architecture = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant } From 80b5fa6e25e950c2e73c1ece1f62215164fa7521 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 24 May 2022 22:10:50 +0200 Subject: [PATCH 09/28] correct buildah attribute --- pkg/builder/buildah.go | 2 +- pkg/trait/builder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/builder/buildah.go b/pkg/builder/buildah.go index ea311a6a95..d900ec1fed 100644 --- a/pkg/builder/buildah.go +++ b/pkg/builder/buildah.go @@ -17,4 +17,4 @@ limitations under the License. package builder -const BuildahArchitecturePlatform = "BuildahArchitecturePlatform" +const BuildahPlatform = "BuildahPlatform" diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 8cf8c880f1..42887e30ae 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -104,7 +104,7 @@ func (t *builderTrait) Apply(e *Environment) error { case v1.IntegrationPlatformBuildPublishStrategyBuildah: var architecture string var found bool - if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahArchitecturePlatform]; !found { + if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { architecture = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant } From f0a2e7a1661c02e4b9e1f5711535b80bd90a2a35 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Thu, 26 May 2022 16:03:57 +0200 Subject: [PATCH 10/28] correct attribute name platform attribute moved to BuildahTask --- pkg/apis/camel/v1/build_types.go | 4 ++-- pkg/controller/build/build_pod.go | 2 +- pkg/trait/builder.go | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/apis/camel/v1/build_types.go b/pkg/apis/camel/v1/build_types.go index 248aa0accd..79ae0dbc39 100644 --- a/pkg/apis/camel/v1/build_types.go +++ b/pkg/apis/camel/v1/build_types.go @@ -95,8 +95,6 @@ type MavenBuildSpec struct { type PublishTask struct { // can be useful to share info with other tasks ContextDir string `json:"contextDir,omitempty"` - // Architecture of image - Architecture string `json:"baseImage,omitempty"` // base image layer BaseImage string `json:"baseImage,omitempty"` // final image name @@ -109,6 +107,8 @@ type PublishTask struct { type BuildahTask struct { BaseTask `json:",inline"` PublishTask `json:",inline"` + // The platform of build image + Platform string `json:"baseImage,omitempty"` // log more information Verbose *bool `json:"verbose,omitempty"` } diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 97e47dad75..ecca80528e 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -244,7 +244,7 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta "bud", "--storage-driver=vfs", "--platform", - task.Architecture, + task.Platform, "--pull-always", "-f", "Dockerfile", diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 42887e30ae..28054a9b12 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -102,20 +102,20 @@ func (t *builderTrait) Apply(e *Environment) error { }}) case v1.IntegrationPlatformBuildPublishStrategyBuildah: - var architecture string + var platform string var found bool - if architecture, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { - architecture = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant + if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { + platform = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant } e.BuildTasks = append(e.BuildTasks, v1.Task{Buildah: &v1.BuildahTask{ + Platform: platform, BaseTask: v1.BaseTask{ Name: "buildah", }, PublishTask: v1.PublishTask{ - Architecture: architecture, - Image: getImageName(e), - Registry: e.Platform.Status.Build.Registry, + Image: getImageName(e), + Registry: e.Platform.Status.Build.Registry, }, Verbose: t.Verbose, }}) From b28dd3a7ab057cf744a870c4772638b30066c238 Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 26 May 2022 21:19:08 +0200 Subject: [PATCH 11/28] add Dockerfile.arch to support arm64 add images-arch images-dev-arch bundle-build-arch for manual build --- build/Dockerfile | 2 +- build/Dockerfile.arch | 47 +++++++++++++++++++++++++++++++++++++++++++ script/Makefile | 24 ++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 build/Dockerfile.arch diff --git a/build/Dockerfile b/build/Dockerfile index 799e65da5c..b8d28551da 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=$BUILDPLATFORM ghcr.io/graalvm/graalvm-ce:ol8-java11-22.1.0 +FROM quay.io/quarkus/ubi-quarkus-mandrel:21.3.0.0-Final-java11 ARG MAVEN_VERSION="3.8.4" ARG MAVEN_HOME="/usr/share/maven" diff --git a/build/Dockerfile.arch b/build/Dockerfile.arch new file mode 100644 index 0000000000..799e65da5c --- /dev/null +++ b/build/Dockerfile.arch @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM --platform=$BUILDPLATFORM ghcr.io/graalvm/graalvm-ce:ol8-java11-22.1.0 + +ARG MAVEN_VERSION="3.8.4" +ARG MAVEN_HOME="/usr/share/maven" +ARG SHA="a9b2d825eacf2e771ed5d6b0e01398589ac1bfa4171f36154d1b5787879605507802f699da6f7cfc80732a5282fd31b28e4cd6052338cbef0fa1358b48a5e3c8" +ARG BASE_URL="https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries" + +USER 0 + +RUN mkdir -p ${MAVEN_HOME} \ + && curl -Lso /tmp/maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && echo "${SHA} /tmp/maven.tar.gz" | sha512sum -c - \ + && tar -xzC ${MAVEN_HOME} --strip-components=1 -f /tmp/maven.tar.gz \ + && rm -v /tmp/maven.tar.gz \ + && ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn \ + && rm ${MAVEN_HOME}/lib/maven-slf4j-provider* + +ADD build/_maven_output /tmp/artifacts/m2 +ADD build/_kamelets /kamelets +COPY build/_maven_overlay/ /usr/share/maven/lib/ +ADD build/logback.xml /usr/share/maven/conf/ + +ENV MAVEN_OPTS="${MAVEN_OPTS} -Dlogback.configurationFile=/usr/share/maven/conf/logback.xml" + +RUN chgrp -R 0 /tmp/artifacts/m2 \ + && chmod -R g=u /tmp/artifacts/m2 \ + && chgrp -R 0 /kamelets \ + && chmod -R g=u /kamelets + +USER 1000 + +ADD build/_output/bin/kamel /usr/local/bin/kamel diff --git a/script/Makefile b/script/Makefile index 39507bf781..ac7c7d835c 100644 --- a/script/Makefile +++ b/script/Makefile @@ -333,6 +333,16 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) GOOS=linux go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go else cp kamel build/_output/bin +endif + docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + +images-arch: bundle-kamelets test maven-overlay + mkdir -p build/_maven_output + mkdir -p build/_output/bin +ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) + GOOS=linux go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go +else + cp kamel build/_output/bin endif docker buildx rm --all-inactive --force docker buildx create --append --name builder @@ -345,6 +355,16 @@ ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) GOOS=linux go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go else cp kamel build/_output/bin +endif + docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + +images-arch-dev: bundle-kamelets test package-artifacts maven-overlay + mkdir -p build/_maven_output + mkdir -p build/_output/bin +ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) + GOOS=linux go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go +else + cp kamel build/_output/bin endif docker buildx rm --all-inactive --force docker buildx create --append --name builder @@ -553,6 +573,10 @@ endif # Build the bundle image. bundle-build: bundle + cd bundle && docker build -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . + +# Build the bundle image. +bundle-build-arch: bundle docker buildx rm --all-inactive --force docker buildx create --append --name builder cd bundle && docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . From 6b6a3b00ceca9869d386d7bdb82b6905ea95431c Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Fri, 27 May 2022 08:47:52 +0200 Subject: [PATCH 12/28] remove useless import --- pkg/controller/build/build_pod.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index ecca80528e..3d800bff4b 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -37,7 +37,6 @@ import ( "github.com/apache/camel-k/pkg/platform" "github.com/apache/camel-k/pkg/util/defaults" "github.com/apache/camel-k/pkg/util/kubernetes" - _ "github.com/containerd/containerd/platforms" ) const ( From db4cfa1d9a511b6ce75761e446ecb908b524e85f Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Fri, 27 May 2022 09:04:57 +0200 Subject: [PATCH 13/28] execute goimports lint --- pkg/trait/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 28054a9b12..e491619154 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -19,7 +19,6 @@ package trait import ( "fmt" - "github.com/containerd/containerd/platforms" "sort" corev1 "k8s.io/api/core/v1" @@ -28,6 +27,7 @@ import ( "github.com/apache/camel-k/pkg/builder" mvn "github.com/apache/camel-k/pkg/util/maven" "github.com/apache/camel-k/pkg/util/property" + "github.com/containerd/containerd/platforms" ) // The builder trait is internally used to determine the best strategy to From 90a0fa60a35ce748e761df9f5c08ff4209f375b6 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Fri, 27 May 2022 11:42:26 +0200 Subject: [PATCH 14/28] correct docker file for buildx --- script/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/Makefile b/script/Makefile index 5765fce663..5d52598d8a 100644 --- a/script/Makefile +++ b/script/Makefile @@ -350,7 +350,7 @@ else endif docker buildx rm --all-inactive --force docker buildx create --append --name builder - docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . images-dev: bundle-kamelets test package-artifacts maven-overlay mkdir -p build/_maven_output @@ -372,7 +372,7 @@ else endif docker buildx rm --all-inactive --force docker buildx create --append --name builder - docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . + docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . images-push: docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION) @@ -586,4 +586,4 @@ bundle-build: bundle bundle-build-arch: bundle docker buildx rm --all-inactive --force docker buildx create --append --name builder - cd bundle && docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . + cd bundle && docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -f Dockerfile.arch -t $(BUNDLE_IMAGE_NAME) . From 83c725648ff94586eac377d824ff5aa488fba787 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 31 May 2022 10:47:29 +0200 Subject: [PATCH 15/28] correct makefile command use platform attribute if exists docker.io from defaults.go --- pkg/apis/camel/v1/build_types.go | 2 +- pkg/controller/build/build_pod.go | 40 +++++++++++++++++++++---------- pkg/trait/builder.go | 4 +++- pkg/util/defaults/defaults.go | 2 +- script/Makefile | 36 +++++++++++++++------------- 5 files changed, 53 insertions(+), 31 deletions(-) diff --git a/pkg/apis/camel/v1/build_types.go b/pkg/apis/camel/v1/build_types.go index 79ae0dbc39..07a7cfa630 100644 --- a/pkg/apis/camel/v1/build_types.go +++ b/pkg/apis/camel/v1/build_types.go @@ -108,7 +108,7 @@ type BuildahTask struct { BaseTask `json:",inline"` PublishTask `json:",inline"` // The platform of build image - Platform string `json:"baseImage,omitempty"` + Platform string `json:"platform,omitempty"` // log more information Verbose *bool `json:"verbose,omitempty"` } diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 3d800bff4b..cc01952b49 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -238,18 +238,34 @@ func addBuildTaskToPod(build *v1.Build, taskName string, pod *corev1.Pod) { } func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, task *v1.BuildahTask, pod *corev1.Pod) error { - bud := []string{ - "buildah", - "bud", - "--storage-driver=vfs", - "--platform", - task.Platform, - "--pull-always", - "-f", - "Dockerfile", - "-t", - task.Image, - ".", + bud := []string{} + + if task.Platform != "" { + bud = []string{ + "buildah", + "bud", + "--storage-driver=vfs", + "--platform", + task.Platform, + "--pull-always", + "-f", + "Dockerfile", + "-t", + task.Image, + ".", + } + } else { + bud = []string{ + "buildah", + "bud", + "--storage-driver=vfs", + "--pull-always", + "-f", + "Dockerfile", + "-t", + task.Image, + ".", + } } push := []string{ diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index e491619154..8849b3b4a2 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -104,8 +104,10 @@ func (t *builderTrait) Apply(e *Environment) error { case v1.IntegrationPlatformBuildPublishStrategyBuildah: var platform string var found bool - if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { + if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; found { platform = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant + } else { + platform = "" } e.BuildTasks = append(e.BuildTasks, v1.Task{Buildah: &v1.BuildahTask{ diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index 90ca3eb159..81a66a13f0 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -35,7 +35,7 @@ const ( KanikoVersion = "0.17.1" // baseImage -- - baseImage = "docker.io/adoptopenjdk/openjdk11:slim" + baseImage = "adoptopenjdk/openjdk11:slim" // LocalRepository -- LocalRepository = "/tmp/artifacts/m2" diff --git a/script/Makefile b/script/Makefile index 5d52598d8a..2be2b83ba9 100644 --- a/script/Makefile +++ b/script/Makefile @@ -29,7 +29,6 @@ OPM_VERSION := v1.21.0 BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim LOCAL_REPOSITORY := /tmp/artifacts/m2 IMAGE_NAME := docker.io/apache/camel-k -IMAGE_TARGET_PLATFORM := linux/amd64 # # Situations when user wants to override @@ -91,15 +90,6 @@ TEST_PREBUILD = build #GOLDFLAGS += -X github.com/apache/camel-k/pkg/util/olm.DefaultStartingCSV= #GOLDFLAGS += -X github.com/apache/camel-k/pkg/util/olm.DefaultGlobalNamespace=openshift-operators -# Define target platform for docker build -ifeq ($(shell uname -m), x86_x64) -IMAGE_TARGET_PLATFORM = linux/amd64 -endif - -ifeq ($(shell uname -m), aarch64) -IMAGE_TARGET_PLATFORM = linux/arm64 -endif - # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -341,6 +331,16 @@ endif docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-arch: bundle-kamelets test maven-overlay +IMAGE_TARGET_PLATFORM := linux/amd64 +# Define target platform for docker build +ifeq ($(shell uname -m), x86_x64) + IMAGE_TARGET_PLATFORM = linux/amd64 +endif + +ifeq ($(shell uname -m), aarch64) + IMAGE_TARGET_PLATFORM = linux/arm64 +endif + mkdir -p build/_maven_output mkdir -p build/_output/bin ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) @@ -363,6 +363,16 @@ endif docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-arch-dev: bundle-kamelets test package-artifacts maven-overlay +IMAGE_TARGET_PLATFORM := linux/amd64 +# Define target platform for docker build +ifeq ($(shell uname -m), x86_x64) + IMAGE_TARGET_PLATFORM = linux/amd64 +endif + +ifeq ($(shell uname -m), aarch64) + IMAGE_TARGET_PLATFORM = linux/arm64 +endif + mkdir -p build/_maven_output mkdir -p build/_output/bin ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) @@ -581,9 +591,3 @@ endif # Build the bundle image. bundle-build: bundle cd bundle && docker build -f Dockerfile -t $(BUNDLE_IMAGE_NAME) . - -# Build the bundle image. -bundle-build-arch: bundle - docker buildx rm --all-inactive --force - docker buildx create --append --name builder - cd bundle && docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -f Dockerfile.arch -t $(BUNDLE_IMAGE_NAME) . From 9b9cc8df80f623d7c9201e0c4290a5aa7dbbf5d4 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 31 May 2022 10:50:54 +0200 Subject: [PATCH 16/28] fix platform initialize --- pkg/trait/builder.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 8849b3b4a2..0384ccfea9 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -27,7 +27,6 @@ import ( "github.com/apache/camel-k/pkg/builder" mvn "github.com/apache/camel-k/pkg/util/maven" "github.com/apache/camel-k/pkg/util/property" - "github.com/containerd/containerd/platforms" ) // The builder trait is internally used to determine the best strategy to @@ -104,9 +103,7 @@ func (t *builderTrait) Apply(e *Environment) error { case v1.IntegrationPlatformBuildPublishStrategyBuildah: var platform string var found bool - if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; found { - platform = platforms.DefaultSpec().OS + "/" + platforms.DefaultSpec().Architecture + "/" + platforms.DefaultSpec().Variant - } else { + if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { platform = "" } From ee084aa64c4a1be002e1af726ace88f4b394f67b Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 31 May 2022 12:08:24 +0200 Subject: [PATCH 17/28] improve readibility of bud command --- pkg/controller/build/build_pod.go | 38 ++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index cc01952b49..afefb0e854 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -240,34 +240,26 @@ func addBuildTaskToPod(build *v1.Build, taskName string, pod *corev1.Pod) { func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, task *v1.BuildahTask, pod *corev1.Pod) error { bud := []string{} + bud = []string{ + "buildah", + "bud", + "--storage-driver=vfs", + } + if task.Platform != "" { - bud = []string{ - "buildah", - "bud", - "--storage-driver=vfs", - "--platform", + bud = append(bud, []string{ task.Platform, "--pull-always", - "-f", - "Dockerfile", - "-t", - task.Image, - ".", - } - } else { - bud = []string{ - "buildah", - "bud", - "--storage-driver=vfs", - "--pull-always", - "-f", - "Dockerfile", - "-t", - task.Image, - ".", - } + }...) } + bud = append(bud, []string{"-f", + "Dockerfile", + "-t", + task.Image, + ".", + }...) + push := []string{ "buildah", "push", From 9f55b65d3f612f07efcc08dce1922e719f436169 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Tue, 31 May 2022 12:08:52 +0200 Subject: [PATCH 18/28] remove useless containerd dependency --- go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/go.mod b/go.mod index a3d8384650..1fd5047e7c 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/apache/camel-k/pkg/client/camel v0.0.0 github.com/apache/camel-k/pkg/kamelet/repository v0.0.0 github.com/container-tools/spectrum v0.3.8 - github.com/containerd/containerd v1.5.8 github.com/evanphx/json-patch v4.12.0+incompatible github.com/fatih/camelcase v1.0.0 github.com/fatih/structs v1.1.0 From 8b6d1c8c9a4c26af3ff31c5b0aeee34eabd459b1 Mon Sep 17 00:00:00 2001 From: raspberry Date: Wed, 1 Jun 2022 12:45:39 +0200 Subject: [PATCH 19/28] Fix makefile images-arch command --- script/Makefile | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/script/Makefile b/script/Makefile index 2be2b83ba9..8562facb59 100644 --- a/script/Makefile +++ b/script/Makefile @@ -28,7 +28,7 @@ KUSTOMIZE_VERSION := v4.1.2 OPM_VERSION := v1.21.0 BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim LOCAL_REPOSITORY := /tmp/artifacts/m2 -IMAGE_NAME := docker.io/apache/camel-k +IMAGE_NAME := docker.io/camel-k # # Situations when user wants to override @@ -331,16 +331,6 @@ endif docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-arch: bundle-kamelets test maven-overlay -IMAGE_TARGET_PLATFORM := linux/amd64 -# Define target platform for docker build -ifeq ($(shell uname -m), x86_x64) - IMAGE_TARGET_PLATFORM = linux/amd64 -endif - -ifeq ($(shell uname -m), aarch64) - IMAGE_TARGET_PLATFORM = linux/arm64 -endif - mkdir -p build/_maven_output mkdir -p build/_output/bin ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) @@ -350,7 +340,12 @@ else endif docker buildx rm --all-inactive --force docker buildx create --append --name builder - docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +ifeq ($(shell uname -m), x86_x64) + docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +endif +ifeq ($(shell uname -m), aarch64) + docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +endif images-dev: bundle-kamelets test package-artifacts maven-overlay mkdir -p build/_maven_output @@ -363,16 +358,6 @@ endif docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile . images-arch-dev: bundle-kamelets test package-artifacts maven-overlay -IMAGE_TARGET_PLATFORM := linux/amd64 -# Define target platform for docker build -ifeq ($(shell uname -m), x86_x64) - IMAGE_TARGET_PLATFORM = linux/amd64 -endif - -ifeq ($(shell uname -m), aarch64) - IMAGE_TARGET_PLATFORM = linux/arm64 -endif - mkdir -p build/_maven_output mkdir -p build/_output/bin ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) @@ -382,7 +367,12 @@ else endif docker buildx rm --all-inactive --force docker buildx create --append --name builder - docker buildx build --platform=$(IMAGE_TARGET_PLATFORM) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +ifeq ($(shell uname -m), x86_x64) + docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +endif +ifeq ($(shell uname -m), aarch64) + docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . +endif images-push: docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION) From 6b65f16d52800c5210ab64f09c2b757c923f54cf Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Wed, 1 Jun 2022 12:50:15 +0200 Subject: [PATCH 20/28] correct docker image name --- script/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Makefile b/script/Makefile index 8562facb59..8abe60abaa 100644 --- a/script/Makefile +++ b/script/Makefile @@ -28,7 +28,7 @@ KUSTOMIZE_VERSION := v4.1.2 OPM_VERSION := v1.21.0 BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim LOCAL_REPOSITORY := /tmp/artifacts/m2 -IMAGE_NAME := docker.io/camel-k +IMAGE_NAME := docker.io/apache/camel-k # # Situations when user wants to override From cb94bb5a0fc54ee56e3634a5fd17725cce78f509 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Wed, 1 Jun 2022 12:54:02 +0200 Subject: [PATCH 21/28] add default docker.io to baseimage because buildah required it correct bud initialization --- pkg/controller/build/build_pod.go | 2 +- pkg/util/defaults/defaults.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index afefb0e854..3191b8c5ce 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -238,7 +238,7 @@ func addBuildTaskToPod(build *v1.Build, taskName string, pod *corev1.Pod) { } func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, task *v1.BuildahTask, pod *corev1.Pod) error { - bud := []string{} + var bud []string bud = []string{ "buildah", diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go index 81a66a13f0..90ca3eb159 100644 --- a/pkg/util/defaults/defaults.go +++ b/pkg/util/defaults/defaults.go @@ -35,7 +35,7 @@ const ( KanikoVersion = "0.17.1" // baseImage -- - baseImage = "adoptopenjdk/openjdk11:slim" + baseImage = "docker.io/adoptopenjdk/openjdk11:slim" // LocalRepository -- LocalRepository = "/tmp/artifacts/m2" From ae3509cbbffdf6bdb5d2124bdc7f09c9fd1cc1f8 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Wed, 1 Jun 2022 13:18:01 +0200 Subject: [PATCH 22/28] correct bud command --- pkg/controller/build/build_pod.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index 3191b8c5ce..d710790e6a 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -249,11 +249,12 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta if task.Platform != "" { bud = append(bud, []string{ task.Platform, - "--pull-always", }...) } - bud = append(bud, []string{"-f", + bud = append(bud, []string{ + "--pull-always", + "-f", "Dockerfile", "-t", task.Image, From ddba5aacb93bf7eda43c78c151ca6f4cc7f46568 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Wed, 1 Jun 2022 15:45:47 +0200 Subject: [PATCH 23/28] correct bud command with platform --- pkg/controller/build/build_pod.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go index d710790e6a..1ebb74c52f 100644 --- a/pkg/controller/build/build_pod.go +++ b/pkg/controller/build/build_pod.go @@ -248,6 +248,7 @@ func addBuildahTaskToPod(ctx context.Context, c ctrl.Reader, build *v1.Build, ta if task.Platform != "" { bud = append(bud, []string{ + "--platform", task.Platform, }...) } From 746ec58ad05cc1c8ea486c00e97e6cc86cf3ca62 Mon Sep 17 00:00:00 2001 From: ConsNavarraRoberto Date: Wed, 1 Jun 2022 15:53:27 +0200 Subject: [PATCH 24/28] add log to trace platform attribute --- pkg/trait/builder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 0384ccfea9..9b7ea2e647 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -105,6 +105,9 @@ func (t *builderTrait) Apply(e *Environment) error { var found bool if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found { platform = "" + t.L.Infof("Attribute platform for buildah not found, default from host will be used!") + } else { + t.L.Infof("User defined %s platform, will be used from buildah!", platform) } e.BuildTasks = append(e.BuildTasks, v1.Task{Buildah: &v1.BuildahTask{ From b7b37eba49b63904d01a7c13f42bc9b1e0dfabea Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 2 Jun 2022 16:25:04 +0200 Subject: [PATCH 25/28] add docs page to describe multi architecture use --- .../configuration/multi-architecture.adoc | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 docs/modules/ROOT/pages/configuration/multi-architecture.adoc diff --git a/docs/modules/ROOT/pages/configuration/multi-architecture.adoc b/docs/modules/ROOT/pages/configuration/multi-architecture.adoc new file mode 100644 index 0000000000..210f5816fb --- /dev/null +++ b/docs/modules/ROOT/pages/configuration/multi-architecture.adoc @@ -0,0 +1,81 @@ +[[multi-architecture-props]] += Multi Architecture + +To use kamel inside other architecture like arm64 you must build it and use Buildah as builder strategy. + +NOTE: For now only arm64 is supported + +[[multi-architecture-build]] +== Build and Publish Kamel + +As first step it's necessary to build kamel project `https://github.com/apache/camel-k` manually and push image to own docker repository. + +I suggest to create a free docker image repository with `docker-hub` or `ghcr`. + +[source,shell] +.script/Makefile +---- +make build images-arch images-push +---- + +NOTE: The base image of kamel operator is graalvm because multi architecture quarkus-mandrel image not published yet + +[[multi-architecture-install]] +== Install Kamel + +Proceed with installation of kamel inside kubernetes cluster with the below command + +[source,shell] +---- +./kamel install --build-publish-strategy=Buildah --registry YOUR_REGISTRY --registry-auth-username YOUR_USERNAME --registry-auth-password YOUR_PASSWORD +---- + +[[multi-architecture-use]] +== Use kamel + +Build and run an integration + +[source,groovy] +.hello.groovy +---- +from('timer:tick?period=3000') + .setBody().constant('Hello world from Camel K') + .to('log:info') +---- + +Send the groovy file to kamel operator to build, publish and run it +[source,shell] +---- +kamel run hello.groovy +---- + +[[multi-architecture-configure-optional]] +== Optional Buildah Configuration + +If you want change the default architecture of buildah build strategy, you must edit integration platform manually. + +[source,shell] +---- +kubectl edit ip +---- + +This command will open the editor with the yaml of `IntegrationPlatform`, to change the architecture you can fill inside `spec.build.PublishStrategyOptions` as below +[source,yaml] +---- +spec: + build: + PublishStrategyOptions: + BuildahPlatform: linux/arm/v8 +---- + +After few seconds the yaml will be updated and that field is imported inside status + +[source,yaml] +---- +status: + build: + PublishStrategyOptions: + BuildahPlatform: linux/arm/v8 +---- + +NOTE: It's important to know buidah supports only amd64 and arm64 From 801722162066ceedec671544aca8593aaa5f89dd Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 2 Jun 2022 16:26:12 +0200 Subject: [PATCH 26/28] add note --- docs/modules/ROOT/pages/configuration/multi-architecture.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/configuration/multi-architecture.adoc b/docs/modules/ROOT/pages/configuration/multi-architecture.adoc index 210f5816fb..45c0c2e4be 100644 --- a/docs/modules/ROOT/pages/configuration/multi-architecture.adoc +++ b/docs/modules/ROOT/pages/configuration/multi-architecture.adoc @@ -3,7 +3,7 @@ To use kamel inside other architecture like arm64 you must build it and use Buildah as builder strategy. -NOTE: For now only arm64 is supported +NOTE: For now only arm64 is supported as other architectures [[multi-architecture-build]] == Build and Publish Kamel From 2d8239e3e3a731b5380cfb4a3276d9babfd378e8 Mon Sep 17 00:00:00 2001 From: raspberry Date: Fri, 3 Jun 2022 14:29:23 +0200 Subject: [PATCH 27/28] Generate CRD --- .../duck/v1alpha1/zz_generated.deepcopy.go | 1 + .../duck/v1beta2/zz_generated.deepcopy.go | 1 + config/crd/bases/camel.apache.org_builds.yaml | 6 +- .../bases/camel.apache.org_camelcatalogs.yaml | 3 +- .../camel.apache.org_integrationkits.yaml | 3 +- ...camel.apache.org_integrationplatforms.yaml | 3 +- .../bases/camel.apache.org_integrations.yaml | 45 +++++----- .../camel.apache.org_kameletbindings.yaml | 23 +++-- .../crd/bases/camel.apache.org_kamelets.yaml | 3 +- .../ROOT/partials/apis/camel-k-crds.adoc | 89 +++++++++++++++++++ go.sum | 1 + helm/camel-k/crds/crd-build.yaml | 6 +- helm/camel-k/crds/crd-camel-catalog.yaml | 3 +- helm/camel-k/crds/crd-integration-kit.yaml | 3 +- .../crds/crd-integration-platform.yaml | 3 +- helm/camel-k/crds/crd-integration.yaml | 45 +++++----- helm/camel-k/crds/crd-kamelet-binding.yaml | 23 +++-- helm/camel-k/crds/crd-kamelet.yaml | 3 +- pkg/apis/camel/v1/zz_generated.deepcopy.go | 1 + .../camel/v1alpha1/zz_generated.deepcopy.go | 1 + 20 files changed, 176 insertions(+), 90 deletions(-) diff --git a/addons/keda/duck/v1alpha1/zz_generated.deepcopy.go b/addons/keda/duck/v1alpha1/zz_generated.deepcopy.go index 9762e390a8..7bbeb3f446 100644 --- a/addons/keda/duck/v1alpha1/zz_generated.deepcopy.go +++ b/addons/keda/duck/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. diff --git a/addons/strimzi/duck/v1beta2/zz_generated.deepcopy.go b/addons/strimzi/duck/v1beta2/zz_generated.deepcopy.go index 6a7dd3b77b..3a04649356 100644 --- a/addons/strimzi/duck/v1beta2/zz_generated.deepcopy.go +++ b/addons/strimzi/duck/v1beta2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. diff --git a/config/crd/bases/camel.apache.org_builds.yaml b/config/crd/bases/camel.apache.org_builds.yaml index f13c379149..ce720087d8 100644 --- a/config/crd/bases/camel.apache.org_builds.yaml +++ b/config/crd/bases/camel.apache.org_builds.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -107,6 +107,9 @@ spec: name: description: name of the task type: string + platform: + description: The platform of build image + type: string registry: description: where to publish the final image properties: @@ -797,4 +800,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/config/crd/bases/camel.apache.org_camelcatalogs.yaml b/config/crd/bases/camel.apache.org_camelcatalogs.yaml index dc89a50e45..c762b2cba1 100644 --- a/config/crd/bases/camel.apache.org_camelcatalogs.yaml +++ b/config/crd/bases/camel.apache.org_camelcatalogs.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -409,4 +409,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/config/crd/bases/camel.apache.org_integrationkits.yaml b/config/crd/bases/camel.apache.org_integrationkits.yaml index 94c534481f..ed79c601d0 100644 --- a/config/crd/bases/camel.apache.org_integrationkits.yaml +++ b/config/crd/bases/camel.apache.org_integrationkits.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -256,4 +256,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/config/crd/bases/camel.apache.org_integrationplatforms.yaml index 8da22b4b4d..70ae76432f 100644 --- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml +++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -664,4 +664,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/config/crd/bases/camel.apache.org_integrations.yaml b/config/crd/bases/camel.apache.org_integrations.yaml index 09d67be816..c19bf17ab4 100644 --- a/config/crd/bases/camel.apache.org_integrations.yaml +++ b/config/crd/bases/camel.apache.org_integrations.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -4048,13 +4048,13 @@ spec: with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler - to schedule the pod in any location, but giving - higher precedence to topologies that would help reduce - the skew. A constraint is considered "Unsatisfiable" - for an incoming pod if and only if every possible - node assigment for that pod would violate "MaxSkew" - on some topology. For example, in a 3-zone cluster, - MaxSkew is set to 1, and pods with the same labelSelector + to schedule the pod in any location, but giving higher + precedence to topologies that would help reduce the + skew. A constraint is considered "Unsatisfiable" for + an incoming pod if and only if every possible node + assigment for that pod would violate "MaxSkew" on + some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) @@ -4486,13 +4486,12 @@ spec: when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is - specified through a storage class, and d) the storage - driver supports dynamic volume provisioning through - \ a PersistentVolumeClaim (see EphemeralVolumeSource - for more information on the connection between - this volume type and PersistentVolumeClaim). \n - Use PersistentVolumeClaim or one of the vendor-specific + tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver + supports dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on + the connection between this volume type and PersistentVolumeClaim). + \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant @@ -4602,14 +4601,15 @@ spec: are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types - of objects, DataSourceRef allows any - non-core object, as well as PersistentVolumeClaim + of objects, DataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed - values (dropping them), DataSourceRef preserves - all values, and generates an error if - a disallowed value is specified. (Alpha) - Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + values (dropping them), DataSourceRef + preserves all values, and generates an + error if a disallowed value is specified. + (Alpha) Using this field requires the + AnyVolumeDataSource feature gate to be + enabled.' properties: apiGroup: description: APIGroup is the group for @@ -5949,4 +5949,3 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas - status: {} diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_kameletbindings.yaml index 0604bff566..15677c6fe7 100644 --- a/config/crd/bases/camel.apache.org_kameletbindings.yaml +++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -4246,8 +4246,8 @@ spec: constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any - location, but giving higher precedence to topologies - that would help reduce the skew. A constraint + location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assigment for that pod would violate "MaxSkew" on some topology. @@ -4710,12 +4710,12 @@ spec: deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) - the storage driver is specified through a storage + snapshot or capacity tracking are needed, c) the + storage driver is specified through a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information - on the connection between this volume type and + volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information + on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of @@ -4832,13 +4832,13 @@ spec: differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of - objects, DataSourceRef allows any + objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), - DataSourceRef preserves all values, + DataSourceRef preserves all values, and generates an error if a disallowed - value is specified. (Alpha) Using + value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -6685,4 +6685,3 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas - status: {} diff --git a/config/crd/bases/camel.apache.org_kamelets.yaml b/config/crd/bases/camel.apache.org_kamelets.yaml index 48176545f9..beae6fa034 100644 --- a/config/crd/bases/camel.apache.org_kamelets.yaml +++ b/config/crd/bases/camel.apache.org_kamelets.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -498,4 +498,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index f2bd9a4dcb..3095e14c63 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -546,6 +546,13 @@ BuildahTask is used to configure Buildah +|`platform` + +string +| + + +The platform of build image + |`verbose` + bool | @@ -2301,6 +2308,13 @@ base Maven specification additional repositories +|`servers` + +*xref:#_camel_apache_org_v1_Server[[\]Server]* +| + + +Servers (auth) + |=== @@ -2346,6 +2360,7 @@ the Maven settings. | +Deprecated: use CASecrets The Secret name and key, containing the CA certificate(s) used to connect to remote Maven repositories. It can contain X.509 certificates, and PKCS#7 formatted certificate chains. @@ -2353,6 +2368,18 @@ A JKS formatted keystore is automatically created to store the CA certificate(s) and configured to be used as a trusted certificate(s) by the Maven commands. Note that the root CA certificates are also imported into the created keystore. +|`caSecrets` + +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#secretkeyselector-v1-core[[\]Kubernetes core/v1.SecretKeySelector]* +| + + +The Secrets name and key, containing the CA certificate(s) used to connect +to remote Maven repositories. +It can contain X.509 certificates, and PKCS#7 formatted certificate chains. +A JKS formatted keystore is automatically created to store the CA certificate(s), +and configured to be used as a trusted certificate(s) by the Maven commands. +Note that the root CA certificates are also imported into the created keystore. + |`extension` + *xref:#_camel_apache_org_v1_MavenArtifact[[\]MavenArtifact]* | @@ -2484,6 +2511,16 @@ the specification |=== +[#_camel_apache_org_v1_Properties] +=== Properties(`map[string]string` alias) + +*Appears on:* + +* <<#_camel_apache_org_v1_Server, Server>> + + + + [#_camel_apache_org_v1_PublishTask] === PublishTask @@ -2856,6 +2893,58 @@ string used by the ImageStream +|=== + +[#_camel_apache_org_v1_Server] +=== Server + +*Appears on:* + +* <<#_camel_apache_org_v1_MavenBuildSpec, MavenBuildSpec>> + + + +[cols="2,2a",options="header"] +|=== +|Field +|Description + +|`-` + +encoding/xml.Name +| + + + + +|`id` + +string +| + + + + +|`username` + +string +| + + + + +|`password` + +string +| + + + + +|`configuration` + +*xref:#_camel_apache_org_v1_Properties[Properties]* +| + + + + + |=== [#_camel_apache_org_v1_SourceSpec] diff --git a/go.sum b/go.sum index e40098bfc7..8476eac497 100644 --- a/go.sum +++ b/go.sum @@ -2043,6 +2043,7 @@ k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8 k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.22.5 h1:jn+mYXI5q7rzo7Bz/n8xZIgbe61SeXlIjU5jA8jLVps= k8s.io/code-generator v0.22.5/go.mod h1:sbdWCOVob+KaQ5O7xs8PNNaCTpbWVqNgA6EPwLOmRNk= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= diff --git a/helm/camel-k/crds/crd-build.yaml b/helm/camel-k/crds/crd-build.yaml index f13c379149..ce720087d8 100644 --- a/helm/camel-k/crds/crd-build.yaml +++ b/helm/camel-k/crds/crd-build.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -107,6 +107,9 @@ spec: name: description: name of the task type: string + platform: + description: The platform of build image + type: string registry: description: where to publish the final image properties: @@ -797,4 +800,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/helm/camel-k/crds/crd-camel-catalog.yaml b/helm/camel-k/crds/crd-camel-catalog.yaml index dc89a50e45..c762b2cba1 100644 --- a/helm/camel-k/crds/crd-camel-catalog.yaml +++ b/helm/camel-k/crds/crd-camel-catalog.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -409,4 +409,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/helm/camel-k/crds/crd-integration-kit.yaml b/helm/camel-k/crds/crd-integration-kit.yaml index 94c534481f..ed79c601d0 100644 --- a/helm/camel-k/crds/crd-integration-kit.yaml +++ b/helm/camel-k/crds/crd-integration-kit.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -256,4 +256,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml index 8da22b4b4d..70ae76432f 100644 --- a/helm/camel-k/crds/crd-integration-platform.yaml +++ b/helm/camel-k/crds/crd-integration-platform.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -664,4 +664,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/helm/camel-k/crds/crd-integration.yaml b/helm/camel-k/crds/crd-integration.yaml index 09d67be816..c19bf17ab4 100644 --- a/helm/camel-k/crds/crd-integration.yaml +++ b/helm/camel-k/crds/crd-integration.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -4048,13 +4048,13 @@ spec: with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler - to schedule the pod in any location, but giving - higher precedence to topologies that would help reduce - the skew. A constraint is considered "Unsatisfiable" - for an incoming pod if and only if every possible - node assigment for that pod would violate "MaxSkew" - on some topology. For example, in a 3-zone cluster, - MaxSkew is set to 1, and pods with the same labelSelector + to schedule the pod in any location, but giving higher + precedence to topologies that would help reduce the + skew. A constraint is considered "Unsatisfiable" for + an incoming pod if and only if every possible node + assigment for that pod would violate "MaxSkew" on + some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) @@ -4486,13 +4486,12 @@ spec: when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is - specified through a storage class, and d) the storage - driver supports dynamic volume provisioning through - \ a PersistentVolumeClaim (see EphemeralVolumeSource - for more information on the connection between - this volume type and PersistentVolumeClaim). \n - Use PersistentVolumeClaim or one of the vendor-specific + tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver + supports dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on + the connection between this volume type and PersistentVolumeClaim). + \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant @@ -4602,14 +4601,15 @@ spec: are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types - of objects, DataSourceRef allows any - non-core object, as well as PersistentVolumeClaim + of objects, DataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed - values (dropping them), DataSourceRef preserves - all values, and generates an error if - a disallowed value is specified. (Alpha) - Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + values (dropping them), DataSourceRef + preserves all values, and generates an + error if a disallowed value is specified. + (Alpha) Using this field requires the + AnyVolumeDataSource feature gate to be + enabled.' properties: apiGroup: description: APIGroup is the group for @@ -5949,4 +5949,3 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas - status: {} diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml index 0604bff566..15677c6fe7 100644 --- a/helm/camel-k/crds/crd-kamelet-binding.yaml +++ b/helm/camel-k/crds/crd-kamelet-binding.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -4246,8 +4246,8 @@ spec: constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any - location, but giving higher precedence to topologies - that would help reduce the skew. A constraint + location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assigment for that pod would violate "MaxSkew" on some topology. @@ -4710,12 +4710,12 @@ spec: deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) - the storage driver is specified through a storage + snapshot or capacity tracking are needed, c) the + storage driver is specified through a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information - on the connection between this volume type and + volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information + on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of @@ -4832,13 +4832,13 @@ spec: differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of - objects, DataSourceRef allows any + objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), - DataSourceRef preserves all values, + DataSourceRef preserves all values, and generates an error if a disallowed - value is specified. (Alpha) Using + value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -6685,4 +6685,3 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas - status: {} diff --git a/helm/camel-k/crds/crd-kamelet.yaml b/helm/camel-k/crds/crd-kamelet.yaml index 48176545f9..beae6fa034 100644 --- a/helm/camel-k/crds/crd-kamelet.yaml +++ b/helm/camel-k/crds/crd-kamelet.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.1 + controller-gen.kubebuilder.io/version: v0.9.0 creationTimestamp: null labels: app: camel-k @@ -498,4 +498,3 @@ spec: served: true storage: true subresources: - status: {} diff --git a/pkg/apis/camel/v1/zz_generated.deepcopy.go b/pkg/apis/camel/v1/zz_generated.deepcopy.go index b1f04c1f68..e787e152d4 100644 --- a/pkg/apis/camel/v1/zz_generated.deepcopy.go +++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go index b2148b9e29..e760a6b422 100644 --- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. From b95f642a7c82607dce50248905b895c2d5e04909 Mon Sep 17 00:00:00 2001 From: raspberry Date: Sat, 18 Jun 2022 14:11:21 +0200 Subject: [PATCH 28/28] regenerate crd --- config/crd/bases/camel.apache.org_builds.yaml | 3 +- .../bases/camel.apache.org_camelcatalogs.yaml | 3 +- .../camel.apache.org_integrationkits.yaml | 3 +- ...camel.apache.org_integrationplatforms.yaml | 3 +- .../bases/camel.apache.org_integrations.yaml | 45 ++++++++++--------- .../camel.apache.org_kameletbindings.yaml | 23 +++++----- .../crd/bases/camel.apache.org_kamelets.yaml | 3 +- .../ROOT/partials/apis/camel-k-crds.adoc | 33 ++++++++++++-- .../ROOT/partials/apis/kamelets-crds.adoc | 14 ++++++ helm/camel-k/crds/crd-build.yaml | 3 +- helm/camel-k/crds/crd-camel-catalog.yaml | 3 +- helm/camel-k/crds/crd-integration-kit.yaml | 3 +- .../crds/crd-integration-platform.yaml | 3 +- helm/camel-k/crds/crd-integration.yaml | 45 ++++++++++--------- helm/camel-k/crds/crd-kamelet-binding.yaml | 23 +++++----- helm/camel-k/crds/crd-kamelet.yaml | 3 +- 16 files changed, 134 insertions(+), 79 deletions(-) diff --git a/config/crd/bases/camel.apache.org_builds.yaml b/config/crd/bases/camel.apache.org_builds.yaml index f7283d83e3..7976161a86 100644 --- a/config/crd/bases/camel.apache.org_builds.yaml +++ b/config/crd/bases/camel.apache.org_builds.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -805,3 +805,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/config/crd/bases/camel.apache.org_camelcatalogs.yaml b/config/crd/bases/camel.apache.org_camelcatalogs.yaml index c762b2cba1..dc89a50e45 100644 --- a/config/crd/bases/camel.apache.org_camelcatalogs.yaml +++ b/config/crd/bases/camel.apache.org_camelcatalogs.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -409,3 +409,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/config/crd/bases/camel.apache.org_integrationkits.yaml b/config/crd/bases/camel.apache.org_integrationkits.yaml index 333832a4f1..ca5c8f90f8 100644 --- a/config/crd/bases/camel.apache.org_integrationkits.yaml +++ b/config/crd/bases/camel.apache.org_integrationkits.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -261,3 +261,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/config/crd/bases/camel.apache.org_integrationplatforms.yaml index e7e8da192f..1b82862f51 100644 --- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml +++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -669,3 +669,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/config/crd/bases/camel.apache.org_integrations.yaml b/config/crd/bases/camel.apache.org_integrations.yaml index 828368643a..764a2e332e 100644 --- a/config/crd/bases/camel.apache.org_integrations.yaml +++ b/config/crd/bases/camel.apache.org_integrations.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -4216,13 +4216,13 @@ spec: with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler - to schedule the pod in any location, but giving higher - precedence to topologies that would help reduce the - skew. A constraint is considered "Unsatisfiable" for - an incoming pod if and only if every possible node - assigment for that pod would violate "MaxSkew" on - some topology. For example, in a 3-zone cluster, MaxSkew - is set to 1, and pods with the same labelSelector + to schedule the pod in any location, but giving + higher precedence to topologies that would help reduce + the skew. A constraint is considered "Unsatisfiable" + for an incoming pod if and only if every possible + node assigment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) @@ -4654,12 +4654,13 @@ spec: when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver - supports dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on - the connection between this volume type and PersistentVolumeClaim). - \n Use PersistentVolumeClaim or one of the vendor-specific + \ tracking are needed, c) the storage driver is + specified through a storage class, and d) the storage + driver supports dynamic volume provisioning through + \ a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between + this volume type and PersistentVolumeClaim). \n + Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant @@ -4769,15 +4770,14 @@ spec: are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types - of objects, DataSourceRef allows any non-core - object, as well as PersistentVolumeClaim + of objects, DataSourceRef allows any + non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed - values (dropping them), DataSourceRef - preserves all values, and generates an - error if a disallowed value is specified. - (Alpha) Using this field requires the - AnyVolumeDataSource feature gate to be - enabled.' + values (dropping them), DataSourceRef preserves + all values, and generates an error if + a disallowed value is specified. (Alpha) + Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for @@ -6122,3 +6122,4 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas + status: {} diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_kameletbindings.yaml index 05147cd76e..549e42c83f 100644 --- a/config/crd/bases/camel.apache.org_kameletbindings.yaml +++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -4418,8 +4418,8 @@ spec: constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any - location, but giving higher precedence to topologies - that would help reduce the skew. A constraint + location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assigment for that pod would violate "MaxSkew" on some topology. @@ -4882,12 +4882,12 @@ spec: deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) the - storage driver is specified through a storage + snapshot or capacity tracking are needed, c) + the storage driver is specified through a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information - on the connection between this volume type and + volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information + on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of @@ -5004,13 +5004,13 @@ spec: differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of - objects, DataSourceRef allows any + objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), - DataSourceRef preserves all values, + DataSourceRef preserves all values, and generates an error if a disallowed - value is specified. (Alpha) Using + value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -6862,3 +6862,4 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas + status: {} diff --git a/config/crd/bases/camel.apache.org_kamelets.yaml b/config/crd/bases/camel.apache.org_kamelets.yaml index 13038ac633..8f10f5f7b8 100644 --- a/config/crd/bases/camel.apache.org_kamelets.yaml +++ b/config/crd/bases/camel.apache.org_kamelets.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -503,3 +503,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index c99f703c44..bf0e60ae6e 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -431,6 +431,13 @@ BuildStatus defines the observed state of Build |Field |Description +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this Build. + |`phase` + *xref:#_camel_apache_org_v1_BuildPhase[BuildPhase]* | @@ -1432,6 +1439,13 @@ IntegrationKitStatus defines the observed state of IntegrationKit |Field |Description +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this IntegrationKit. + |`phase` + *xref:#_camel_apache_org_v1_IntegrationKitPhase[IntegrationKitPhase]* | @@ -1868,6 +1882,13 @@ IntegrationPlatformStatus defines the observed state of IntegrationPlatform +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this IntegrationPlatform. + |`phase` + *xref:#_camel_apache_org_v1_IntegrationPlatformPhase[IntegrationPlatformPhase]* | @@ -2021,6 +2042,13 @@ IntegrationStatus defines the observed state of Integration |Field |Description +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this Integration. + |`phase` + *xref:#_camel_apache_org_v1_IntegrationPhase[IntegrationPhase]* | @@ -2484,9 +2512,8 @@ NodeSelector TopologySpreadConstraints - |`securityContext` + -*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#podsecuritycontext-v1-core[[\]Kubernetes core/v1.PodSecurityContext]* +*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#podsecuritycontext-v1-core[Kubernetes core/v1.PodSecurityContext]* | @@ -3203,4 +3230,4 @@ Selects a key of a ConfigMap. Selects a key of a secret. -|=== +|=== \ No newline at end of file diff --git a/docs/modules/ROOT/partials/apis/kamelets-crds.adoc b/docs/modules/ROOT/partials/apis/kamelets-crds.adoc index fe8e1b828c..04aab42a9d 100644 --- a/docs/modules/ROOT/partials/apis/kamelets-crds.adoc +++ b/docs/modules/ROOT/partials/apis/kamelets-crds.adoc @@ -874,6 +874,13 @@ KameletBindingStatus specify the status of a binding |Field |Description +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this KameletBinding. + |`phase` + *xref:#_camel_apache_org_v1alpha1_KameletBindingPhase[KameletBindingPhase]* | @@ -1096,6 +1103,13 @@ KameletStatus defines the observed state of Kamelet |Field |Description +|`observedGeneration` + +int64 +| + + +ObservedGeneration is the most recent generation observed for this Kamelet. + |`phase` + *xref:#_camel_apache_org_v1alpha1_KameletPhase[KameletPhase]* | diff --git a/helm/camel-k/crds/crd-build.yaml b/helm/camel-k/crds/crd-build.yaml index f7283d83e3..7976161a86 100644 --- a/helm/camel-k/crds/crd-build.yaml +++ b/helm/camel-k/crds/crd-build.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -805,3 +805,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/helm/camel-k/crds/crd-camel-catalog.yaml b/helm/camel-k/crds/crd-camel-catalog.yaml index c762b2cba1..dc89a50e45 100644 --- a/helm/camel-k/crds/crd-camel-catalog.yaml +++ b/helm/camel-k/crds/crd-camel-catalog.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -409,3 +409,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/helm/camel-k/crds/crd-integration-kit.yaml b/helm/camel-k/crds/crd-integration-kit.yaml index 333832a4f1..ca5c8f90f8 100644 --- a/helm/camel-k/crds/crd-integration-kit.yaml +++ b/helm/camel-k/crds/crd-integration-kit.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -261,3 +261,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml index e7e8da192f..1b82862f51 100644 --- a/helm/camel-k/crds/crd-integration-platform.yaml +++ b/helm/camel-k/crds/crd-integration-platform.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -669,3 +669,4 @@ spec: served: true storage: true subresources: + status: {} diff --git a/helm/camel-k/crds/crd-integration.yaml b/helm/camel-k/crds/crd-integration.yaml index 828368643a..764a2e332e 100644 --- a/helm/camel-k/crds/crd-integration.yaml +++ b/helm/camel-k/crds/crd-integration.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -4216,13 +4216,13 @@ spec: with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler - to schedule the pod in any location, but giving higher - precedence to topologies that would help reduce the - skew. A constraint is considered "Unsatisfiable" for - an incoming pod if and only if every possible node - assigment for that pod would violate "MaxSkew" on - some topology. For example, in a 3-zone cluster, MaxSkew - is set to 1, and pods with the same labelSelector + to schedule the pod in any location, but giving + higher precedence to topologies that would help reduce + the skew. A constraint is considered "Unsatisfiable" + for an incoming pod if and only if every possible + node assigment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) @@ -4654,12 +4654,13 @@ spec: when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver - supports dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on - the connection between this volume type and PersistentVolumeClaim). - \n Use PersistentVolumeClaim or one of the vendor-specific + \ tracking are needed, c) the storage driver is + specified through a storage class, and d) the storage + driver supports dynamic volume provisioning through + \ a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between + this volume type and PersistentVolumeClaim). \n + Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant @@ -4769,15 +4770,14 @@ spec: are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types - of objects, DataSourceRef allows any non-core - object, as well as PersistentVolumeClaim + of objects, DataSourceRef allows any + non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed - values (dropping them), DataSourceRef - preserves all values, and generates an - error if a disallowed value is specified. - (Alpha) Using this field requires the - AnyVolumeDataSource feature gate to be - enabled.' + values (dropping them), DataSourceRef preserves + all values, and generates an error if + a disallowed value is specified. (Alpha) + Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for @@ -6122,3 +6122,4 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas + status: {} diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml index 05147cd76e..549e42c83f 100644 --- a/helm/camel-k/crds/crd-kamelet-binding.yaml +++ b/helm/camel-k/crds/crd-kamelet-binding.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -4418,8 +4418,8 @@ spec: constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any - location, but giving higher precedence to topologies - that would help reduce the skew. A constraint + location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assigment for that pod would violate "MaxSkew" on some topology. @@ -4882,12 +4882,12 @@ spec: deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) the - storage driver is specified through a storage + snapshot or capacity tracking are needed, c) + the storage driver is specified through a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information - on the connection between this volume type and + volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information + on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of @@ -5004,13 +5004,13 @@ spec: differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of - objects, DataSourceRef allows any + objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), - DataSourceRef preserves all values, + DataSourceRef preserves all values, and generates an error if a disallowed - value is specified. (Alpha) Using + value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -6862,3 +6862,4 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.replicas + status: {} diff --git a/helm/camel-k/crds/crd-kamelet.yaml b/helm/camel-k/crds/crd-kamelet.yaml index 13038ac633..8f10f5f7b8 100644 --- a/helm/camel-k/crds/crd-kamelet.yaml +++ b/helm/camel-k/crds/crd-kamelet.yaml @@ -19,7 +19,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.0 + controller-gen.kubebuilder.io/version: v0.6.1 creationTimestamp: null labels: app: camel-k @@ -503,3 +503,4 @@ spec: served: true storage: true subresources: + status: {}