From a5fc5bf87166b96dc7a6a3a793a7c1d7a29bd7f2 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:41:07 +0200 Subject: [PATCH 1/9] feat(trait): service label --- pkg/apis/camel/v1/trait/service.go | 2 ++ pkg/trait/service.go | 14 +++++++++----- pkg/trait/service_test.go | 12 +++++++++++- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/pkg/apis/camel/v1/trait/service.go b/pkg/apis/camel/v1/trait/service.go index 924fbcc14d..ed3d53136f 100644 --- a/pkg/apis/camel/v1/trait/service.go +++ b/pkg/apis/camel/v1/trait/service.go @@ -37,6 +37,8 @@ type ServiceTrait struct { Type *ServiceType `property:"type" json:"type,omitempty"` // The annotations added to the Service object. Annotations map[string]string `property:"annotations" json:"annotations,omitempty"` + // The labels added to the Service object. + Labels map[string]string `property:"labels" json:"labels,omitempty"` } type ServiceType string diff --git a/pkg/trait/service.go b/pkg/trait/service.go index 2c42825761..c531f8febd 100644 --- a/pkg/trait/service.go +++ b/pkg/trait/service.go @@ -122,17 +122,21 @@ func (t *serviceTrait) Apply(e *Environment) error { } func (t *serviceTrait) getServiceFor(itName, itNamespace string) *corev1.Service { + labels := map[string]string{ + v1.IntegrationLabel: itName, + } + for k, v := range t.Labels { + labels[k] = v + } return &corev1.Service{ TypeMeta: metav1.TypeMeta{ Kind: "Service", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ - Name: itName, - Namespace: itNamespace, - Labels: map[string]string{ - v1.IntegrationLabel: itName, - }, + Name: itName, + Namespace: itNamespace, + Labels: labels, Annotations: t.Annotations, }, Spec: corev1.ServiceSpec{ diff --git a/pkg/trait/service_test.go b/pkg/trait/service_test.go index 2d9ab23539..25c6935c70 100644 --- a/pkg/trait/service_test.go +++ b/pkg/trait/service_test.go @@ -741,7 +741,7 @@ func TestServiceAutoConfiguration(t *testing.T) { assert.Equal(t, ptr.To(true), traits.Service.Enabled) } -func TestServiceAnnotations(t *testing.T) { +func TestServiceAnnotationsAndLables(t *testing.T) { catalog, err := camel.DefaultCatalog() require.NoError(t, err) @@ -782,6 +782,10 @@ func TestServiceAnnotations(t *testing.T) { "annotation-1": "value-1", "annotation-2": "value-2", }, + Labels: map[string]string{ + "label-1": "v1", + "label-2": "v2", + }, }, }, }, @@ -818,6 +822,12 @@ func TestServiceAnnotations(t *testing.T) { }) assert.NotNil(t, s) assert.NotNil(t, s.Annotations) + assert.Len(t, s.Annotations, 2) assert.Equal(t, "value-1", s.Annotations["annotation-1"]) assert.Equal(t, "value-2", s.Annotations["annotation-2"]) + // There are other labels added by other traits + assert.Len(t, s.Labels, 5) + assert.Equal(t, "v1", s.Labels["label-1"]) + assert.Equal(t, "v2", s.Labels["label-2"]) + assert.Equal(t, ServiceTestName, s.Labels[v1.IntegrationLabel]) } From e662dfcb245ee8b626827d3a4df6a39d1515e220 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:41:35 +0200 Subject: [PATCH 2/9] chore(trait): make public constant --- pkg/trait/builder.go | 4 ++-- pkg/trait/camel.go | 2 +- pkg/trait/camel_test.go | 4 ++-- pkg/trait/deployer.go | 2 +- pkg/trait/jvm.go | 2 +- pkg/trait/openapi.go | 2 +- pkg/trait/quarkus.go | 4 ++-- pkg/trait/service_binding.go | 2 +- pkg/trait/telemetry.go | 2 +- pkg/trait/trait_catalog.go | 2 +- pkg/trait/trait_condition_types.go | 6 +++--- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 24d28d7449..ae17e0872e 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -188,7 +188,7 @@ func (t *builderTrait) adaptDeprecatedFields() *TraitCondition { m := "The limit-memory parameter is deprecated and may be removed in future releases. Make sure to use tasks-limit-memory parameter instead." t.L.Info(m) if condition == nil { - condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, "") + condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, "") } condition = newOrAppend(condition, m) t.TasksLimitMemory = append(t.TasksLimitMemory, fmt.Sprintf("builder:%s", t.LimitMemory)) @@ -199,7 +199,7 @@ func (t *builderTrait) adaptDeprecatedFields() *TraitCondition { func newOrAppend(condition *TraitCondition, message string) *TraitCondition { if condition == nil { - condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message) + condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, message) } else { condition.message += "; " + message } diff --git a/pkg/trait/camel.go b/pkg/trait/camel.go index 53eccf51c3..6e2db3cdbc 100644 --- a/pkg/trait/camel.go +++ b/pkg/trait/camel.go @@ -90,7 +90,7 @@ func (t *camelTrait) Configure(e *Environment) (bool, *TraitCondition, error) { "Camel", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, fmt.Sprintf( "Operated with CamelCatalog version %s which may be different from the runtime used in the container", t.runtimeVersion, diff --git a/pkg/trait/camel_test.go b/pkg/trait/camel_test.go index 0513ebe9c7..a7d20d25cd 100644 --- a/pkg/trait/camel_test.go +++ b/pkg/trait/camel_test.go @@ -81,7 +81,7 @@ func TestApplyCamelTraitNonManagedBuild(t *testing.T) { "Camel", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, fmt.Sprintf( "Operated with CamelCatalog version %s which may be different from the runtime used in the container", "0.0.1", @@ -243,7 +243,7 @@ func TestApplyCamelTraitNonManagedBuildWithProperties(t *testing.T) { "Camel", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, fmt.Sprintf( "Operated with CamelCatalog version %s which may be different from the runtime used in the container", "0.0.1", diff --git a/pkg/trait/deployer.go b/pkg/trait/deployer.go index 65051e53a2..f88670ee4e 100644 --- a/pkg/trait/deployer.go +++ b/pkg/trait/deployer.go @@ -58,7 +58,7 @@ func (t *deployerTrait) Configure(e *Environment) (bool, *TraitCondition, error) "Deployer", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, "The use-ssa parameter is deprecated and may be removed in future releases.", ) } diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go index 096d315308..fc04dd5eb7 100644 --- a/pkg/trait/jvm.go +++ b/pkg/trait/jvm.go @@ -64,7 +64,7 @@ func (t *jvmTrait) Configure(e *Environment) (bool, *TraitCondition, error) { // Deprecated: the JVM has to be a platform trait and the user should not be able to disable it if !ptr.Deref(t.Enabled, true) { notice := userDisabledMessage + "; this configuration is deprecated and may be removed within next releases" - return false, NewIntegrationCondition("JVM", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, notice), nil + return false, NewIntegrationCondition("JVM", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, notice), nil } if (e.IntegrationKit != nil && !e.IntegrationKitInPhase(v1.IntegrationKitPhaseReady)) || !e.IntegrationInRunningPhases() { diff --git a/pkg/trait/openapi.go b/pkg/trait/openapi.go index 4b1a1100b8..4a8959164a 100644 --- a/pkg/trait/openapi.go +++ b/pkg/trait/openapi.go @@ -68,7 +68,7 @@ func (t *openAPITrait) Configure(e *Environment) (bool, *TraitCondition, error) "OpenApi", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, "OpenApi trait is deprecated and may be removed in future version: "+ "use Camel REST contract first instead, https://camel.apache.org/manual/rest-dsl-openapi.html", ) diff --git a/pkg/trait/quarkus.go b/pkg/trait/quarkus.go index 9c16382604..4cca2e35ae 100644 --- a/pkg/trait/quarkus.go +++ b/pkg/trait/quarkus.go @@ -148,7 +148,7 @@ func (t *quarkusTrait) Configure(e *Environment) (bool, *TraitCondition, error) message := "The sources contains some language marked as deprecated. This Integration may not be supported in future release." if condition == nil { condition = NewIntegrationCondition( - "Quarkus", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message) + "Quarkus", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, message) } else { condition.message += message } @@ -182,7 +182,7 @@ func (t *quarkusTrait) adaptDeprecatedFields() *TraitCondition { t.Modes = append(t.Modes, traitv1.JvmQuarkusMode) } } - return NewIntegrationCondition("Quarkus", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message) + return NewIntegrationCondition("Quarkus", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, message) } return nil diff --git a/pkg/trait/service_binding.go b/pkg/trait/service_binding.go index def9c6d628..ce790e8ae0 100644 --- a/pkg/trait/service_binding.go +++ b/pkg/trait/service_binding.go @@ -85,7 +85,7 @@ func (t *serviceBindingTrait) Configure(e *Environment) (bool, *TraitCondition, "ServiceBinding", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, "ServiceBinding trait is deprecated as the Service Binding Operator is no longer supported. It may be removed in future version.", ) } diff --git a/pkg/trait/telemetry.go b/pkg/trait/telemetry.go index c6be725749..3eb820e898 100644 --- a/pkg/trait/telemetry.go +++ b/pkg/trait/telemetry.go @@ -75,7 +75,7 @@ func (t *telemetryTrait) Configure(e *Environment) (bool, *TraitCondition, error "Telemetry", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, - traitConfigurationReason, + TraitConfigurationReason, "Telemetry addon configuration is deprecated and may be removed in future releases. Make sure to use Telemetry trait configuration instead.", ) } diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go index bdf62d009b..a76339bab3 100644 --- a/pkg/trait/trait_catalog.go +++ b/pkg/trait/trait_catalog.go @@ -182,7 +182,7 @@ func (c *Catalog) executedTraitCondition(executedTrait []Trait) (*TraitCondition message := fmt.Sprintf("Applied traits: %s", strings.Join(traitIds, ",")) c.L.Debugf(message) - return NewIntegrationCondition("", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message), traits, nil + return NewIntegrationCondition("", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, message), traits, nil } // Deprecated: remove this check when we include the addons traits into regular traits diff --git a/pkg/trait/trait_condition_types.go b/pkg/trait/trait_condition_types.go index 942a3dbd68..8baf4b1df1 100644 --- a/pkg/trait/trait_condition_types.go +++ b/pkg/trait/trait_condition_types.go @@ -26,7 +26,7 @@ import ( ) const ( - traitConfigurationReason = "TraitConfiguration" + TraitConfigurationReason = "TraitConfiguration" userDisabledMessage = "explicitly disabled by the user" userEnabledMessage = "explicitly enabled by the user" platformDisabledMessage = "explicitly disabled by the platform" @@ -53,11 +53,11 @@ func NewIntegrationCondition(traitID string, ict v1.IntegrationConditionType, cs } func NewIntegrationConditionUserDisabled(traitID string) *TraitCondition { - return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, userDisabledMessage) + return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, userDisabledMessage) } func NewIntegrationConditionPlatformDisabledWithMessage(traitID string, message string) *TraitCondition { - return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, fmt.Sprintf("%s: %s", platformDisabledMessage, message)) + return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, TraitConfigurationReason, fmt.Sprintf("%s: %s", platformDisabledMessage, message)) } func (tc *TraitCondition) integrationCondition() (v1.IntegrationConditionType, corev1.ConditionStatus, string, string) { From fe782d4b90333179295f43512c6c4d0e014a8c8c Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:41:52 +0200 Subject: [PATCH 3/9] feat(trait): deprecate resume --- addons/resume/resume.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/resume/resume.go b/addons/resume/resume.go index 36cb9fdded..7493535327 100644 --- a/addons/resume/resume.go +++ b/addons/resume/resume.go @@ -22,6 +22,7 @@ import ( traitv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait" "github.com/apache/camel-k/v2/pkg/trait" "github.com/apache/camel-k/v2/pkg/util" + corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" ) @@ -33,6 +34,8 @@ import ( // // The Resume trait is disabled by default. // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // The main different from the implementation on Core is that it's not necessary to bind the strategies to the // registry. This step will be done automatically by Camel K, after resolving the options passed to the trait. // @@ -41,6 +44,7 @@ import ( // -t resume.enabled=true -t resume.resume-path=camel-file-sets -t resume.resume-server="address-of-your-kafka:9092" // // +camel-k:trait=resume. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. @@ -81,7 +85,16 @@ func (r *resumeTrait) Configure(environment *trait.Environment) (bool, *trait.Tr return false, nil, nil } - return ptr.Deref(r.Enabled, false), nil, nil + condition := trait.NewIntegrationCondition( + "Resume", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "Resume trait is deprecated and may be removed in future version: "+ + "configure directly the Camel properties as required by the component instead", + ) + + return ptr.Deref(r.Enabled, false), condition, nil } func (r *resumeTrait) Apply(environment *trait.Environment) error { From 3946d345ee8b5626a66b18bb534cacb04849fe88 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:42:12 +0200 Subject: [PATCH 4/9] feat(trait): deprecate 3 scale --- addons/threescale/3scale.go | 15 ++++++++++++++- addons/threescale/3scale_test.go | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/addons/threescale/3scale.go b/addons/threescale/3scale.go index 54750c3370..d15faa09f4 100644 --- a/addons/threescale/3scale.go +++ b/addons/threescale/3scale.go @@ -20,6 +20,7 @@ package threescale import ( "strconv" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" @@ -33,7 +34,10 @@ import ( // // The 3scale trait is disabled by default. // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // +camel-k:trait=3scale. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash" json:",inline"` // Enables automatic configuration of the trait. @@ -95,6 +99,15 @@ func (t *threeScaleTrait) Configure(e *trait.Environment) (bool, *trait.TraitCon return false, nil, nil } + condition := trait.NewIntegrationCondition( + "3Scale", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "3Scale trait is deprecated and may be removed in future version: "+ + "use service trait to add 3Scale labels and annotations instead", + ) + if ptr.Deref(t.Auto, true) { if t.Scheme == "" { t.Scheme = ThreeScaleSchemeDefaultValue @@ -111,7 +124,7 @@ func (t *threeScaleTrait) Configure(e *trait.Environment) (bool, *trait.TraitCon } } - return true, nil, nil + return true, condition, nil } func (t *threeScaleTrait) Apply(e *trait.Environment) error { diff --git a/addons/threescale/3scale_test.go b/addons/threescale/3scale_test.go index 4aba8fdcea..0954e27456 100644 --- a/addons/threescale/3scale_test.go +++ b/addons/threescale/3scale_test.go @@ -54,7 +54,7 @@ func TestThreeScaleInjection(t *testing.T) { ok, condition, err := threeScale.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = threeScale.Apply(e) require.NoError(t, err) @@ -75,7 +75,7 @@ func TestThreeScaleInjectionNoAPIPath(t *testing.T) { ok, condition, err := threeScale.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = threeScale.Apply(e) require.NoError(t, err) From ecdebf075e01348010dea9e4f95d5c63ce03cfb8 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:42:28 +0200 Subject: [PATCH 5/9] feat(trait): deprecate aws secrets manager --- addons/vault/aws/aws_secrets_manager.go | 15 ++++++++++++++- addons/vault/aws/aws_secrets_manager_test.go | 8 ++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/addons/vault/aws/aws_secrets_manager.go b/addons/vault/aws/aws_secrets_manager.go index af7a1709a3..913316c035 100644 --- a/addons/vault/aws/aws_secrets_manager.go +++ b/addons/vault/aws/aws_secrets_manager.go @@ -26,6 +26,7 @@ import ( traitv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait" "github.com/apache/camel-k/v2/pkg/trait" "github.com/apache/camel-k/v2/pkg/util" + corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" ) @@ -43,7 +44,10 @@ import ( // the following trait options: // -t aws-secrets-manager.enabled=true -t aws-secrets-manager.access-key="aws-access-key" -t aws-secrets-manager.secret-key="aws-secret-key" -t aws-secrets-manager.region="aws-region" -t aws-secrets-manager.context-reload-enabled="true" -t aws-secrets-manager.refresh-enabled="true" -t aws-secrets-manager.refresh-period="30000" -t aws-secrets-manager.secrets="test*" // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // +camel-k:trait=aws-secrets-manager. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. @@ -100,7 +104,16 @@ func (t *awsSecretsManagerTrait) Configure(environment *trait.Environment) (bool t.RefreshEnabled = ptr.To(false) } - return true, nil, nil + condition := trait.NewIntegrationCondition( + "AWSSecretManager", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "AWSSecretManager trait is deprecated and may be removed in future version: "+ + "configure directly the Camel properties as required by the component instead", + ) + + return true, condition, nil } func (t *awsSecretsManagerTrait) Apply(environment *trait.Environment) error { diff --git a/addons/vault/aws/aws_secrets_manager_test.go b/addons/vault/aws/aws_secrets_manager_test.go index 8c9ab48ba0..aecfd83588 100644 --- a/addons/vault/aws/aws_secrets_manager_test.go +++ b/addons/vault/aws/aws_secrets_manager_test.go @@ -49,7 +49,7 @@ func TestAwsSecretsManagerTraitApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -72,7 +72,7 @@ func TestAwsSecretsManagerTraitNoDefaultCreds(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -112,7 +112,7 @@ func TestAwsSecretsManagerTraitWithSecrets(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -152,7 +152,7 @@ func TestAwsSecretsManagerTraitWithConfigMap(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) From bcc87317d0cc51648719f8662cccd9e8030eb278 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:42:45 +0200 Subject: [PATCH 6/9] feat(trait): deprecate azure key vault --- addons/vault/azure/azure_key_vault.go | 15 ++++++++++++++- addons/vault/azure/azure_key_vault_test.go | 8 ++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/addons/vault/azure/azure_key_vault.go b/addons/vault/azure/azure_key_vault.go index 44b283f787..638b8a7387 100644 --- a/addons/vault/azure/azure_key_vault.go +++ b/addons/vault/azure/azure_key_vault.go @@ -26,6 +26,7 @@ import ( traitv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait" "github.com/apache/camel-k/v2/pkg/trait" "github.com/apache/camel-k/v2/pkg/util" + corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" ) @@ -43,7 +44,10 @@ import ( // the following trait options: // -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name" -t azure-key-vault.context-reload-enabled="true" -t azure-key-vault.refresh-enabled="true" -t azure-key-vault.refresh-period="30000" -t azure-key-vault.secrets="test*" -t azure-key-vault.eventhub-connection-string="connection-string" -t azure-key-vault.blob-account-name="account-name" -t azure-key-vault.blob-container-name="container-name" -t azure-key-vault.blob-access-key="account-name" -t azure-key-vault.azure-identity-enabled="true" // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // +camel-k:trait=azure-key-vault. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. @@ -112,7 +116,16 @@ func (t *azureKeyVaultTrait) Configure(environment *trait.Environment) (bool, *t t.AzureIdentityEnabled = ptr.To(false) } - return true, nil, nil + condition := trait.NewIntegrationCondition( + "AzureKeyVault", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "AzureKeyVault trait is deprecated and may be removed in future version: "+ + "configure directly the Camel properties as required by the component instead", + ) + + return true, condition, nil } func (t *azureKeyVaultTrait) Apply(environment *trait.Environment) error { diff --git a/addons/vault/azure/azure_key_vault_test.go b/addons/vault/azure/azure_key_vault_test.go index e829ff0a96..4c3252ed25 100644 --- a/addons/vault/azure/azure_key_vault_test.go +++ b/addons/vault/azure/azure_key_vault_test.go @@ -47,7 +47,7 @@ func TestAzureKeyVaultTraitApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -90,7 +90,7 @@ func TestAzureKeyVaultTraitApplyWithConfigmapAndRefresh(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -137,7 +137,7 @@ func TestAzureKeyVaultTraitApplyWithSecretAndRefresh(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -185,7 +185,7 @@ func TestAzureKeyVaultTraitAzureIdentityEnabledApplyWithSecretAndRefresh(t *test ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) From bc414f4e611d2ca5c64559bc76ee670d165cb35c Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:43:00 +0200 Subject: [PATCH 7/9] feat(trait): deprecate gcp secret manager --- addons/vault/gcp/gcp_secret_manager.go | 15 ++++++++++++++- addons/vault/gcp/gcp_secret_manager_test.go | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/addons/vault/gcp/gcp_secret_manager.go b/addons/vault/gcp/gcp_secret_manager.go index 8fcdbfc0ee..9ac2b948e9 100644 --- a/addons/vault/gcp/gcp_secret_manager.go +++ b/addons/vault/gcp/gcp_secret_manager.go @@ -24,6 +24,7 @@ import ( traitv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait" "github.com/apache/camel-k/v2/pkg/trait" "github.com/apache/camel-k/v2/pkg/util" + corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" ) @@ -41,7 +42,10 @@ import ( // the following trait options: // -t gpc-secret-manager.enabled=true -t gpc-secret-manager.project-id="project-id" -t gpc-secret-manager.service-account-key="file:serviceaccount.json" -t gcp-secret-manager.subscription-name="pubsub-sub" -t gcp-secret-manager.context-reload-enabled="true" -t gcp-secret-manager.refresh-enabled="true" -t gcp-secret-manager.refresh-period="30000" -t gcp-secret-manager.secrets="test*" // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // +camel-k:trait=gcp-secret-manager. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. @@ -96,7 +100,16 @@ func (t *gcpSecretManagerTrait) Configure(environment *trait.Environment) (bool, t.RefreshEnabled = ptr.To(false) } - return true, nil, nil + condition := trait.NewIntegrationCondition( + "GCPSecretManager", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "GCPSecretManager trait is deprecated and may be removed in future version: "+ + "configure directly the Camel properties as required by the component instead", + ) + + return true, condition, nil } func (t *gcpSecretManagerTrait) Apply(environment *trait.Environment) error { diff --git a/addons/vault/gcp/gcp_secret_manager_test.go b/addons/vault/gcp/gcp_secret_manager_test.go index 1f36e9b96d..0759351a47 100644 --- a/addons/vault/gcp/gcp_secret_manager_test.go +++ b/addons/vault/gcp/gcp_secret_manager_test.go @@ -44,7 +44,7 @@ func TestGcpSecretManagerTraitApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -65,7 +65,7 @@ func TestGcpSecretManagerTraitNoDefaultCreds(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) From 51f61248649c081db298869f953bca4e3fe5cfc2 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:43:16 +0200 Subject: [PATCH 8/9] feat(trait): deprecate hashicorp vault --- addons/vault/hashicorp/hashicorp_vault.go | 15 ++++++++++++++- addons/vault/hashicorp/hashicorp_vault_test.go | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/addons/vault/hashicorp/hashicorp_vault.go b/addons/vault/hashicorp/hashicorp_vault.go index 399d912f09..05a3b94373 100644 --- a/addons/vault/hashicorp/hashicorp_vault.go +++ b/addons/vault/hashicorp/hashicorp_vault.go @@ -23,6 +23,7 @@ import ( "github.com/apache/camel-k/v2/pkg/trait" "github.com/apache/camel-k/v2/pkg/util" "github.com/apache/camel-k/v2/pkg/util/kubernetes" + corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" ) @@ -36,7 +37,10 @@ import ( // the following trait options: // -t hashicorp-vault.enabled=true -t hashicorp-vault.token="token" -t hashicorp-vault.port="port" -t hashicorp-vault.engine="engine" -t hashicorp-vault.port="port" -t hashicorp-vault.scheme="scheme" // +// WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. +// // +camel-k:trait=hashicorp-vault. +// +camel-k:deprecated=2.5.0. type Trait struct { traitv1.Trait `property:",squash"` // Enables automatic configuration of the trait. @@ -75,7 +79,16 @@ func (t *hashicorpVaultTrait) Configure(environment *trait.Environment) (bool, * return false, nil, nil } - return true, nil, nil + condition := trait.NewIntegrationCondition( + "HashicorpVault", + v1.IntegrationConditionTraitInfo, + corev1.ConditionTrue, + trait.TraitConfigurationReason, + "HashicorpVault trait is deprecated and may be removed in future version: "+ + "configure directly the Camel properties as required by the component instead", + ) + + return true, condition, nil } func (t *hashicorpVaultTrait) Apply(environment *trait.Environment) error { diff --git a/addons/vault/hashicorp/hashicorp_vault_test.go b/addons/vault/hashicorp/hashicorp_vault_test.go index 3e0c101cfd..a5d74d91f5 100644 --- a/addons/vault/hashicorp/hashicorp_vault_test.go +++ b/addons/vault/hashicorp/hashicorp_vault_test.go @@ -48,7 +48,7 @@ func TestHashicorpVaultTraitApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -82,7 +82,7 @@ func TestHashicorpVaultTraitWithSecretApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) @@ -116,7 +116,7 @@ func TestHashicorpVaultTraitWithConfigMapApply(t *testing.T) { ok, condition, err := secrets.Configure(e) require.NoError(t, err) assert.True(t, ok) - assert.Nil(t, condition) + assert.NotNil(t, condition) err = secrets.Apply(e) require.NoError(t, err) From eac27a94369e6b59f4594815f45653ce5e1c8278 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 25 Oct 2024 07:43:39 +0200 Subject: [PATCH 9/9] chore(trait): update autogen docs --- .../ROOT/partials/apis/camel-k-crds.adoc | 7 ++++ docs/modules/traits/pages/3scale.adoc | 3 ++ .../traits/pages/aws-secrets-manager.adoc | 3 ++ .../modules/traits/pages/azure-key-vault.adoc | 3 ++ .../traits/pages/gcp-secret-manager.adoc | 3 ++ .../modules/traits/pages/hashicorp-vault.adoc | 3 ++ docs/modules/traits/pages/resume.adoc | 3 ++ docs/modules/traits/pages/service.adoc | 4 ++ helm/camel-k/crds/camel-k-crds.yaml | 40 +++++++++++++++++++ .../camel/v1/trait/zz_generated.deepcopy.go | 7 ++++ ...camel.apache.org_integrationplatforms.yaml | 10 +++++ .../camel.apache.org_integrationprofiles.yaml | 10 +++++ .../bases/camel.apache.org_integrations.yaml | 10 +++++ .../camel.apache.org_kameletbindings.yaml | 5 +++ .../crd/bases/camel.apache.org_pipes.yaml | 5 +++ 15 files changed, 116 insertions(+) diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index 6a58a7a565..a933444b61 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -8797,6 +8797,13 @@ map[string]string The annotations added to the Service object. +|`labels` + +map[string]string +| + + +The labels added to the Service object. + |=== diff --git a/docs/modules/traits/pages/3scale.adoc b/docs/modules/traits/pages/3scale.adoc index d6fd68d9e5..247c7e0dd1 100755 --- a/docs/modules/traits/pages/3scale.adoc +++ b/docs/modules/traits/pages/3scale.adoc @@ -1,6 +1,7 @@ = 3scale Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The 3scale trait can be used to automatically create annotations that allow @@ -8,6 +9,8 @@ The 3scale trait can be used to automatically create annotations that allow The 3scale trait is disabled by default. +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. diff --git a/docs/modules/traits/pages/aws-secrets-manager.adoc b/docs/modules/traits/pages/aws-secrets-manager.adoc index 96db11ead1..ea4bc91708 100644 --- a/docs/modules/traits/pages/aws-secrets-manager.adoc +++ b/docs/modules/traits/pages/aws-secrets-manager.adoc @@ -1,6 +1,7 @@ = Aws Secrets Manager Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Secrets Manager trait can be used to use secrets from AWS Secrets Manager @@ -17,6 +18,8 @@ To enable the automatic context reload on secrets updates you should define the following trait options: -t aws-secrets-manager.enabled=true -t aws-secrets-manager.access-key="aws-access-key" -t aws-secrets-manager.secret-key="aws-secret-key" -t aws-secrets-manager.region="aws-region" -t aws-secrets-manager.context-reload-enabled="true" -t aws-secrets-manager.refresh-enabled="true" -t aws-secrets-manager.refresh-period="30000" -t aws-secrets-manager.secrets="test*" +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. diff --git a/docs/modules/traits/pages/azure-key-vault.adoc b/docs/modules/traits/pages/azure-key-vault.adoc index 454e11fd73..27e76f3567 100644 --- a/docs/modules/traits/pages/azure-key-vault.adoc +++ b/docs/modules/traits/pages/azure-key-vault.adoc @@ -1,6 +1,7 @@ = Azure Key Vault Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Azure Key Vault trait can be used to use secrets from Azure Key Vault service @@ -17,6 +18,8 @@ To enable the automatic context reload on secrets updates you should define the following trait options: -t azure-key-vault.enabled=true -t azure-key-vault.tenant-id="tenant-id" -t azure-key-vault.client-id="client-id" -t azure-key-vault.client-secret="client-secret" -t azure-key-vault.vault-name="vault-name" -t azure-key-vault.context-reload-enabled="true" -t azure-key-vault.refresh-enabled="true" -t azure-key-vault.refresh-period="30000" -t azure-key-vault.secrets="test*" -t azure-key-vault.eventhub-connection-string="connection-string" -t azure-key-vault.blob-account-name="account-name" -t azure-key-vault.blob-container-name="container-name" -t azure-key-vault.blob-access-key="account-name" -t azure-key-vault.azure-identity-enabled="true" +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. diff --git a/docs/modules/traits/pages/gcp-secret-manager.adoc b/docs/modules/traits/pages/gcp-secret-manager.adoc index 257f1824c7..ab8952e6b5 100644 --- a/docs/modules/traits/pages/gcp-secret-manager.adoc +++ b/docs/modules/traits/pages/gcp-secret-manager.adoc @@ -1,6 +1,7 @@ = Gcp Secret Manager Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Google Secret Manager trait can be used to use secrets from Google Secret Manager @@ -17,6 +18,8 @@ To enable the automatic context reload on secrets updates you should define the following trait options: -t gpc-secret-manager.enabled=true -t gpc-secret-manager.project-id="project-id" -t gpc-secret-manager.service-account-key="file:serviceaccount.json" -t gcp-secret-manager.subscription-name="pubsub-sub" -t gcp-secret-manager.context-reload-enabled="true" -t gcp-secret-manager.refresh-enabled="true" -t gcp-secret-manager.refresh-period="30000" -t gcp-secret-manager.secrets="test*" +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. diff --git a/docs/modules/traits/pages/hashicorp-vault.adoc b/docs/modules/traits/pages/hashicorp-vault.adoc index 8adb2106b1..3cb3346d79 100644 --- a/docs/modules/traits/pages/hashicorp-vault.adoc +++ b/docs/modules/traits/pages/hashicorp-vault.adoc @@ -1,6 +1,7 @@ = Hashicorp Vault Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Hashicorp Vault trait can be used to use secrets from Hashicorp Vault @@ -13,6 +14,8 @@ A sample execution of this trait, would require the following trait options: -t hashicorp-vault.enabled=true -t hashicorp-vault.token="token" -t hashicorp-vault.port="port" -t hashicorp-vault.engine="engine" -t hashicorp-vault.port="port" -t hashicorp-vault.scheme="scheme" +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**. diff --git a/docs/modules/traits/pages/resume.adoc b/docs/modules/traits/pages/resume.adoc index 779b9f1af7..0af5f45022 100644 --- a/docs/modules/traits/pages/resume.adoc +++ b/docs/modules/traits/pages/resume.adoc @@ -1,6 +1,7 @@ = Resume Trait // Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.5.0-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge] // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Resume trait can be used to manage and configure resume strategies. @@ -11,6 +12,8 @@ WARNING: this is an experimental implementation based on the support available o The Resume trait is disabled by default. +WARNING: The trait is **deprecated** and will removed in future release versions: configure directly the Camel properties as required by the component instead. + The main different from the implementation on Core is that it's not necessary to bind the strategies to the registry. This step will be done automatically by Camel K, after resolving the options passed to the trait. diff --git a/docs/modules/traits/pages/service.adoc b/docs/modules/traits/pages/service.adoc index e66dbcca07..6d72e7dce9 100755 --- a/docs/modules/traits/pages/service.adoc +++ b/docs/modules/traits/pages/service.adoc @@ -49,6 +49,10 @@ Deprecated: Use service type instead. | map[string]string | The annotations added to the Service object. +| service.labels +| map[string]string +| The labels added to the Service object. + |=== // End of autogenerated code - DO NOT EDIT! (configuration) diff --git a/helm/camel-k/crds/camel-k-crds.yaml b/helm/camel-k/crds/camel-k-crds.yaml index 3bb34c12b8..065e0c9e93 100644 --- a/helm/camel-k/crds/camel-k-crds.yaml +++ b/helm/camel-k/crds/camel-k-crds.yaml @@ -5231,6 +5231,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -7376,6 +7381,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -9424,6 +9434,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -11448,6 +11463,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -19513,6 +19533,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -21499,6 +21524,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -29640,6 +29670,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -40571,6 +40606,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go index 36235e591c..23790d11e5 100644 --- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go +++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go @@ -1163,6 +1163,13 @@ func (in *ServiceTrait) DeepCopyInto(out *ServiceTrait) { (*out)[key] = val } } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTrait. 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 dc2cb3a04a..3e824af03f 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml @@ -2073,6 +2073,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -4218,6 +4223,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). diff --git a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml index 748fba573b..f21c712ad9 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml @@ -1942,6 +1942,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -3966,6 +3971,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). diff --git a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml index fdf0894246..1df3fc4c6a 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml @@ -7962,6 +7962,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). @@ -9948,6 +9953,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). diff --git a/pkg/resources/config/crd/bases/camel.apache.org_kameletbindings.yaml b/pkg/resources/config/crd/bases/camel.apache.org_kameletbindings.yaml index bafbf10808..5cb1ed2f56 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_kameletbindings.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_kameletbindings.yaml @@ -8031,6 +8031,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`). diff --git a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml index 5c0bacc7b0..01bb038636 100644 --- a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml +++ b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml @@ -8029,6 +8029,11 @@ spec: description: Can be used to enable or disable a trait. All traits share this common property. type: boolean + labels: + additionalProperties: + type: string + description: The labels added to the Service object. + type: object nodePort: description: |- Enable Service to be exposed as NodePort (default `false`).