Skip to content

Commit

Permalink
feat(api): deprecate Buildah and Kaniko
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Sep 14, 2023
1 parent 44ff4f0 commit 59fd4a6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: false
matrix:
publisher: ["Buildah", "Spectrum", "Kaniko", "Jib"]
publisher: ["Spectrum", Jib"]

steps:
- name: Checkout code
Expand Down
6 changes: 4 additions & 2 deletions config/crd/bases/camel.apache.org_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ spec:
task should be configured to represent the specific task chosen.
properties:
buildah:
description: a BuildahTask, for Buildah strategy
description: 'a BuildahTask, for Buildah strategy Deprecated:
use spectrum, jib or s2i instead'
properties:
baseImage:
description: base image layer
Expand Down Expand Up @@ -735,7 +736,8 @@ spec:
type: object
type: object
kaniko:
description: a KanikoTask, for Kaniko strategy
description: 'a KanikoTask, for Kaniko strategy Deprecated:
use spectrum, jib or s2i instead'
properties:
baseImage:
description: base image layer
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5160,13 +5160,15 @@ a BuilderTask, used to generate and package the project
a BuildahTask, for Buildah strategy
Deprecated: use spectrum, jib or s2i instead
|`kaniko` +
*xref:#_camel_apache_org_v1_KanikoTask[KanikoTask]*
|
a KanikoTask, for Kaniko strategy
Deprecated: use spectrum, jib or s2i instead
|`spectrum` +
*xref:#_camel_apache_org_v1_SpectrumTask[SpectrumTask]*
Expand Down
6 changes: 4 additions & 2 deletions helm/camel-k/crds/crd-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ spec:
task should be configured to represent the specific task chosen.
properties:
buildah:
description: a BuildahTask, for Buildah strategy
description: 'a BuildahTask, for Buildah strategy Deprecated:
use spectrum, jib or s2i instead'
properties:
baseImage:
description: base image layer
Expand Down Expand Up @@ -735,7 +736,8 @@ spec:
type: object
type: object
kaniko:
description: a KanikoTask, for Kaniko strategy
description: 'a KanikoTask, for Kaniko strategy Deprecated:
use spectrum, jib or s2i instead'
properties:
baseImage:
description: base image layer
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/camel/v1/build_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ type Task struct {
// Application Publishing

// a BuildahTask, for Buildah strategy
// Deprecated: use spectrum, jib or s2i instead
Buildah *BuildahTask `json:"buildah,omitempty"`
// a KanikoTask, for Kaniko strategy
// Deprecated: use spectrum, jib or s2i instead
Kaniko *KanikoTask `json:"kaniko,omitempty"`
// a SpectrumTask, for Spectrum strategy
Spectrum *SpectrumTask `json:"spectrum,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/camel/v1/integrationplatform_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ type IntegrationPlatformBuildPublishStrategy string
const (
// IntegrationPlatformBuildPublishStrategyBuildah uses Buildah project (https://buildah.io/)
// in order to push the incremental images to the image repository. It can be used with `pod` BuildStrategy.
// Deprecated: use Spectrum, Jib or S2I instead
IntegrationPlatformBuildPublishStrategyBuildah IntegrationPlatformBuildPublishStrategy = "Buildah"
// IntegrationPlatformBuildPublishStrategyKaniko uses Kaniko project (https://github.com/GoogleContainerTools/kaniko)
// in order to push the incremental images to the image repository. It can be used with `pod` BuildStrategy.
// Deprecated: use Spectrum, Jib or S2I instead
IntegrationPlatformBuildPublishStrategyKaniko IntegrationPlatformBuildPublishStrategy = "Kaniko"
// IntegrationPlatformBuildPublishStrategyS2I uses the Source to Images (S2I) feature
// (https://docs.openshift.com/container-platform/4.9/openshift_images/create-images.html#images-create-s2i_create-images)
Expand Down
2 changes: 2 additions & 0 deletions pkg/trait/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func (t *builderTrait) Apply(e *Environment) error {
}})

case v1.IntegrationPlatformBuildPublishStrategyBuildah:
t.L.Infof("Warning: Buildah publishing strategy is deprecated and may be removed in future releases. Use any alternative publishing strategy.")
var platform string
var found bool
if platform, found = e.Platform.Status.Build.PublishStrategyOptions[builder.BuildahPlatform]; !found {
Expand Down Expand Up @@ -169,6 +170,7 @@ func (t *builderTrait) Apply(e *Environment) error {
}})
//nolint: staticcheck,nolintlint
case v1.IntegrationPlatformBuildPublishStrategyKaniko:
t.L.Infof("Warning: Kaniko publishing strategy is deprecated and may be removed in future releases. Use any alternative publishing strategy.")
persistentVolumeClaim := e.Platform.Status.Build.PublishStrategyOptions[builder.KanikoPVCName]
cacheEnabled := e.Platform.Status.Build.IsOptionEnabled(builder.KanikoBuildCacheEnabled)

Expand Down

0 comments on commit 59fd4a6

Please sign in to comment.