This is an automated email from the ASF dual-hosted git repository. gfournier pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 748354bcd feat(trait): Spectrum deprecation notice 748354bcd is described below commit 748354bcd81cc30ca04e4183f17afd9eb9752806 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Fri Apr 12 15:30:42 2024 +0200 feat(trait): Spectrum deprecation notice --- .github/workflows/builder.yml | 2 +- docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 8 ++++++-- helm/camel-k/crds/crd-build.yaml | 7 ++++--- pkg/apis/camel/v1/build_types.go | 8 ++++++-- pkg/apis/camel/v1/integrationplatform_types.go | 1 + pkg/apis/camel/v1/trait/builder.go | 2 +- pkg/resources/config/crd/bases/camel.apache.org_builds.yaml | 7 ++++--- pkg/trait/builder.go | 3 +++ 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 6c1c11586..cbecf7bd1 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -76,7 +76,7 @@ jobs: strategy: fail-fast: false matrix: - publisher: ["Jib", "Spectrum"] + publisher: ["Jib"] steps: - name: Checkout code diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index 8771e0e60..32cb242ae 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -878,6 +878,7 @@ will take care of producing the expected Camel/Camel-Quarkus runtime. * <<#_camel_apache_org_v1_Task, Task>> BuildahTask is used to configure Buildah. +Deprecated: no longer in use. [cols="2,2a",options="header"] |=== @@ -4181,6 +4182,7 @@ Properties -- * <<#_camel_apache_org_v1_Task, Task>> KanikoTask is used to configure Kaniko. +Deprecated: no longer in use. [cols="2,2a",options="header"] |=== @@ -4233,6 +4235,7 @@ docker image to use * <<#_camel_apache_org_v1_KanikoTask, KanikoTask>> KanikoTaskCache is used to configure Kaniko cache. +Deprecated: no longer in use. [cols="2,2a",options="header"] |=== @@ -5589,7 +5592,7 @@ a PackageTask, used to package the project a BuildahTask, for Buildah strategy -Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead +Deprecated: use jib, s2i or a custom publishing strategy instead |`kaniko` + *xref:#_camel_apache_org_v1_KanikoTask[KanikoTask]* @@ -5597,7 +5600,7 @@ Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead a KanikoTask, for Kaniko strategy -Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead +Deprecated: use jib, s2i or a custom publishing strategy instead |`spectrum` + *xref:#_camel_apache_org_v1_SpectrumTask[SpectrumTask]* @@ -5605,6 +5608,7 @@ Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead a SpectrumTask, for Spectrum strategy +Deprecated: use jib, s2i or a custom publishing strategy instead |`s2i` + *xref:#_camel_apache_org_v1_S2iTask[S2iTask]* diff --git a/helm/camel-k/crds/crd-build.yaml b/helm/camel-k/crds/crd-build.yaml index 31635f79d..4d3131d24 100644 --- a/helm/camel-k/crds/crd-build.yaml +++ b/helm/camel-k/crds/crd-build.yaml @@ -161,7 +161,7 @@ spec: properties: buildah: description: 'a BuildahTask, for Buildah strategy Deprecated: - use spectrum, jib, s2i or a custom publishing strategy instead' + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer @@ -1027,7 +1027,7 @@ spec: type: object kaniko: description: 'a KanikoTask, for Kaniko strategy Deprecated: - use spectrum, jib, s2i or a custom publishing strategy instead' + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer @@ -1789,7 +1789,8 @@ spec: type: string type: object spectrum: - description: a SpectrumTask, for Spectrum strategy + description: 'a SpectrumTask, for Spectrum strategy Deprecated: + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer diff --git a/pkg/apis/camel/v1/build_types.go b/pkg/apis/camel/v1/build_types.go index 7c1dc4e43..32db927af 100644 --- a/pkg/apis/camel/v1/build_types.go +++ b/pkg/apis/camel/v1/build_types.go @@ -67,12 +67,13 @@ type Task struct { // Application Publishing // a BuildahTask, for Buildah strategy - // Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead + // Deprecated: use jib, s2i or a custom publishing strategy instead Buildah *BuildahTask `json:"buildah,omitempty"` // a KanikoTask, for Kaniko strategy - // Deprecated: use spectrum, jib, s2i or a custom publishing strategy instead + // Deprecated: use jib, s2i or a custom publishing strategy instead Kaniko *KanikoTask `json:"kaniko,omitempty"` // a SpectrumTask, for Spectrum strategy + // Deprecated: use jib, s2i or a custom publishing strategy instead Spectrum *SpectrumTask `json:"spectrum,omitempty"` // a S2iTask, for S2I strategy S2i *S2iTask `json:"s2i,omitempty"` @@ -130,6 +131,7 @@ type PublishTask struct { } // BuildahTask is used to configure Buildah. +// Deprecated: no longer in use. type BuildahTask struct { BaseTask `json:",inline"` PublishTask `json:",inline"` @@ -142,6 +144,7 @@ type BuildahTask struct { } // KanikoTask is used to configure Kaniko. +// Deprecated: no longer in use. type KanikoTask struct { BaseTask `json:",inline"` PublishTask `json:",inline"` @@ -154,6 +157,7 @@ type KanikoTask struct { } // KanikoTaskCache is used to configure Kaniko cache. +// Deprecated: no longer in use. type KanikoTaskCache struct { // true if a cache is enabled Enabled *bool `json:"enabled,omitempty"` diff --git a/pkg/apis/camel/v1/integrationplatform_types.go b/pkg/apis/camel/v1/integrationplatform_types.go index 3adb13079..150401534 100644 --- a/pkg/apis/camel/v1/integrationplatform_types.go +++ b/pkg/apis/camel/v1/integrationplatform_types.go @@ -153,6 +153,7 @@ const ( IntegrationPlatformBuildPublishStrategyS2I IntegrationPlatformBuildPublishStrategy = "S2I" // IntegrationPlatformBuildPublishStrategySpectrum uses Spectrum project (https://github.com/container-tools/spectrum) // in order to push the incremental images to the image repository. It is the default choice on vanilla Kubernetes cluster. + // Deprecated: use jib, s2i or a custom publishing strategy instead. IntegrationPlatformBuildPublishStrategySpectrum IntegrationPlatformBuildPublishStrategy = "Spectrum" // IntegrationPlatformBuildPublishStrategyJib uses Jib maven plugin (https://github.com/GoogleContainerTools/jib) // in order to push the incremental images to the image repository. diff --git a/pkg/apis/camel/v1/trait/builder.go b/pkg/apis/camel/v1/trait/builder.go index 8c6ca571e..635623716 100644 --- a/pkg/apis/camel/v1/trait/builder.go +++ b/pkg/apis/camel/v1/trait/builder.go @@ -57,7 +57,7 @@ type BuilderTrait struct { // A list of tasks to be executed (available only when using `pod` strategy) with format `<name>;<container-image>;<container-command>`. Tasks []string `property:"tasks" json:"tasks,omitempty"` // A list of tasks sorted by the order of execution in a csv format, ie, `<taskName1>,<taskName2>,...`. - // Mind that you must include also the operator tasks (`builder`, `quarkus-native`, `package`, `jib`, `spectrum`, `s2i`) + // Mind that you must include also the operator tasks (`builder`, `quarkus-native`, `package`, `jib`, `s2i`) // if you need to execute them. Useful only with `pod` strategy. TasksFilter string `property:"tasks-filter" json:"tasksFilter,omitempty"` // A list of request cpu configuration for the specific task with format `<task-name>:<request-cpu-conf>`. diff --git a/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml b/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml index 31635f79d..4d3131d24 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_builds.yaml @@ -161,7 +161,7 @@ spec: properties: buildah: description: 'a BuildahTask, for Buildah strategy Deprecated: - use spectrum, jib, s2i or a custom publishing strategy instead' + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer @@ -1027,7 +1027,7 @@ spec: type: object kaniko: description: 'a KanikoTask, for Kaniko strategy Deprecated: - use spectrum, jib, s2i or a custom publishing strategy instead' + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer @@ -1789,7 +1789,8 @@ spec: type: string type: object spectrum: - description: a SpectrumTask, for Spectrum strategy + description: 'a SpectrumTask, for Spectrum strategy Deprecated: + use jib, s2i or a custom publishing strategy instead' properties: baseImage: description: base image layer diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index b30fa0cbe..2bd7b88ec 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -92,6 +92,9 @@ func (t *builderTrait) Configure(e *Environment) (bool, *TraitCondition, error) } condition := t.adaptDeprecatedFields() + if e.Platform.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategySpectrum { + condition = newOrAppend(condition, "Spectrum publishing strategy is deprecated and may be removed in future releases. Make sure to use any supported publishing strategy instead.") + } if e.IntegrationKitInPhase(v1.IntegrationKitPhaseBuildSubmitted) { if trait := e.Catalog.GetTrait(quarkusTraitID); trait != nil {