You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2024/04/19 09:42:59 UTC
(camel-k) branch release-2.3.x updated (ff991a50a -> a790d13b0)
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a change to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
from ff991a50a chore: nightly automatic updates
new adf29881e fix(trait): condition kit type
new c6b73dec6 fix(trait): inherit platform configuration
new a790d13b0 chore(api): remove deprecated ip shortname
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
helm/camel-k/crds/crd-integration-platform.yaml | 1 -
pkg/apis/camel/v1/integrationplatform_types.go | 2 +-
.../crd/bases/camel.apache.org_integrationplatforms.yaml | 1 -
pkg/trait/builder.go | 11 +++++++++++
pkg/trait/trait_condition_types.go | 13 ++++++-------
5 files changed, 18 insertions(+), 10 deletions(-)
(camel-k) 01/03: fix(trait): condition kit type
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit adf29881e230e47f2d016ebb9c3ee8997ae48317
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Apr 18 15:49:06 2024 +0200
fix(trait): condition kit type
Closes #5381
---
pkg/trait/trait_condition_types.go | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/pkg/trait/trait_condition_types.go b/pkg/trait/trait_condition_types.go
index 2f245ea8e..906cf3b57 100644
--- a/pkg/trait/trait_condition_types.go
+++ b/pkg/trait/trait_condition_types.go
@@ -35,12 +35,11 @@ const (
// TraitCondition is used to get all information/warning about a trait configuration.
// It should either use an IntegrationConditionType or IntegrationKitConditionType.
type TraitCondition struct {
- traitID string
- integrationConditionType v1.IntegrationConditionType
- integrationKitConditionType v1.IntegrationKitConditionType
- conditionStatus corev1.ConditionStatus
- message string
- reason string
+ traitID string
+ integrationConditionType v1.IntegrationConditionType
+ conditionStatus corev1.ConditionStatus
+ message string
+ reason string
}
func NewIntegrationCondition(traitID string, ict v1.IntegrationConditionType, cs corev1.ConditionStatus, reason, message string) *TraitCondition {
@@ -73,7 +72,7 @@ func (tc *TraitCondition) integrationCondition() (v1.IntegrationConditionType, c
}
func (tc *TraitCondition) integrationKitCondition() (v1.IntegrationKitConditionType, corev1.ConditionStatus, string, string) {
- return v1.IntegrationKitConditionType(fmt.Sprintf("%s%s", tc.traitID, tc.integrationKitConditionType)),
+ return v1.IntegrationKitConditionType(fmt.Sprintf("%s%s", tc.traitID, tc.integrationConditionType)),
tc.conditionStatus,
tc.reason,
tc.message
(camel-k) 03/03: chore(api): remove deprecated ip shortname
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit a790d13b0af233c31a24ba9ddf01cfc5127965d4
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Apr 18 16:45:57 2024 +0200
chore(api): remove deprecated ip shortname
---
helm/camel-k/crds/crd-integration-platform.yaml | 1 -
pkg/apis/camel/v1/integrationplatform_types.go | 2 +-
.../config/crd/bases/camel.apache.org_integrationplatforms.yaml | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml
index c66c8dd5f..9d04b2ad8 100644
--- a/helm/camel-k/crds/crd-integration-platform.yaml
+++ b/helm/camel-k/crds/crd-integration-platform.yaml
@@ -34,7 +34,6 @@ spec:
listKind: IntegrationPlatformList
plural: integrationplatforms
shortNames:
- - ip
- itp
singular: integrationplatform
scope: Namespaced
diff --git a/pkg/apis/camel/v1/integrationplatform_types.go b/pkg/apis/camel/v1/integrationplatform_types.go
index 3adb13079..44a7c9a63 100644
--- a/pkg/apis/camel/v1/integrationplatform_types.go
+++ b/pkg/apis/camel/v1/integrationplatform_types.go
@@ -64,7 +64,7 @@ type IntegrationPlatformStatus struct {
// +genclient
// +kubebuilder:object:root=true
-// +kubebuilder:resource:path=integrationplatforms,scope=Namespaced,shortName=ip;itp,categories=kamel;camel
+// +kubebuilder:resource:path=integrationplatforms,scope=Namespaced,shortName=itp,categories=kamel;camel
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The integration platform phase"
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index c66c8dd5f..9d04b2ad8 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -34,7 +34,6 @@ spec:
listKind: IntegrationPlatformList
plural: integrationplatforms
shortNames:
- - ip
- itp
singular: integrationplatform
scope: Namespaced
(camel-k) 02/03: fix(trait): inherit platform configuration
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit c6b73dec67e53f32ea357652da63ba539d001467
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Apr 18 16:40:30 2024 +0200
fix(trait): inherit platform configuration
Closes #5289
---
pkg/trait/builder.go | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index b30fa0cbe..e4422eedf 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -93,6 +93,8 @@ func (t *builderTrait) Configure(e *Environment) (bool, *TraitCondition, error)
condition := t.adaptDeprecatedFields()
+ t.setPlatform(e)
+
if e.IntegrationKitInPhase(v1.IntegrationKitPhaseBuildSubmitted) {
if trait := e.Catalog.GetTrait(quarkusTraitID); trait != nil {
quarkus, ok := trait.(*quarkusTrait)
@@ -627,3 +629,12 @@ func publishingOrUserTask(t v1.Task) bool {
return false
}
+
+// Will set a default platform if either specified in the trait or the platform/profile configuration.
+func (t *builderTrait) setPlatform(e *Environment) {
+ if t.ImagePlatforms == nil {
+ if e.Platform != nil && e.Platform.Status.Build.BuildConfiguration.ImagePlatforms != nil {
+ t.ImagePlatforms = e.Platform.Status.Build.BuildConfiguration.ImagePlatforms
+ }
+ }
+}