This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 41c8132ae18c5107d3df4acf66c6ef65dba3010e Author: Thomas Diesler <tdies...@redhat.com> AuthorDate: Thu Apr 25 13:10:12 2024 +0200 (#5424) Generate badges for deprecated traits --- addons/tracing/tracing.go | 3 +- cmd/util/doc-gen/generators/traitdocgen.go | 52 +++++++++++++++++++--- cmd/util/doc-gen/generators/traitmetadatagen.go | 2 +- docs/modules/ROOT/partials/apis/camel-k-crds.adoc | 2 - docs/modules/traits/pages/3scale.adoc | 2 + docs/modules/traits/pages/affinity.adoc | 2 + docs/modules/traits/pages/aws-secrets-manager.adoc | 2 + docs/modules/traits/pages/azure-key-vault.adoc | 2 + docs/modules/traits/pages/builder.adoc | 2 + docs/modules/traits/pages/camel.adoc | 2 + docs/modules/traits/pages/container.adoc | 2 + docs/modules/traits/pages/cron.adoc | 2 + docs/modules/traits/pages/dependencies.adoc | 3 ++ docs/modules/traits/pages/deployer.adoc | 2 + docs/modules/traits/pages/deployment.adoc | 2 + docs/modules/traits/pages/environment.adoc | 2 + docs/modules/traits/pages/error-handler.adoc | 2 + docs/modules/traits/pages/gc.adoc | 2 + docs/modules/traits/pages/gcp-secret-manager.adoc | 2 + docs/modules/traits/pages/hashicorp-vault.adoc | 2 + docs/modules/traits/pages/health.adoc | 2 + docs/modules/traits/pages/ingress.adoc | 2 + docs/modules/traits/pages/istio.adoc | 2 + docs/modules/traits/pages/jolokia.adoc | 2 + docs/modules/traits/pages/jvm.adoc | 2 + docs/modules/traits/pages/kamelets.adoc | 2 + docs/modules/traits/pages/keda.adoc | 2 + docs/modules/traits/pages/knative-service.adoc | 2 + docs/modules/traits/pages/knative.adoc | 2 + docs/modules/traits/pages/logging.adoc | 2 + docs/modules/traits/pages/master.adoc | 2 + docs/modules/traits/pages/mount.adoc | 2 + docs/modules/traits/pages/openapi.adoc | 2 + docs/modules/traits/pages/owner.adoc | 2 + docs/modules/traits/pages/pdb.adoc | 2 + docs/modules/traits/pages/platform.adoc | 2 + docs/modules/traits/pages/pod.adoc | 2 + docs/modules/traits/pages/prometheus.adoc | 2 + docs/modules/traits/pages/pull-secret.adoc | 2 + docs/modules/traits/pages/quarkus.adoc | 2 + docs/modules/traits/pages/registry.adoc | 5 ++- docs/modules/traits/pages/resume.adoc | 2 + docs/modules/traits/pages/route.adoc | 2 + docs/modules/traits/pages/service-binding.adoc | 2 + docs/modules/traits/pages/service.adoc | 2 + docs/modules/traits/pages/telemetry.adoc | 2 + docs/modules/traits/pages/toleration.adoc | 2 + docs/modules/traits/pages/tracing.adoc | 3 ++ pkg/apis/camel/v1/trait/dependencies.go | 3 +- pkg/apis/camel/v1/trait/registry.go | 5 +-- 50 files changed, 143 insertions(+), 17 deletions(-) diff --git a/addons/tracing/tracing.go b/addons/tracing/tracing.go index 52cb6684c..808da4903 100644 --- a/addons/tracing/tracing.go +++ b/addons/tracing/tracing.go @@ -37,7 +37,8 @@ import ( // // WARNING: The Tracing trait can't be enabled at the same time as the Telemetry trait. // -// +camel-k:trait=tracing. +// +camel-k:trait=tracing +// +camel-k:deprecated=2.3.0 type Trait struct { traitv1.Trait `property:",squash" json:",inline"` // Enables automatic configuration of the trait, including automatic discovery of the tracing endpoint. diff --git a/cmd/util/doc-gen/generators/traitdocgen.go b/cmd/util/doc-gen/generators/traitdocgen.go index c867cb370..8d52bd8f6 100644 --- a/cmd/util/doc-gen/generators/traitdocgen.go +++ b/cmd/util/doc-gen/generators/traitdocgen.go @@ -40,12 +40,16 @@ import ( ) const ( - tagTrait = "+camel-k:trait" - tagLint = "nolint" + tagTrait = "+camel-k:trait" + tagDeprecated = "+camel-k:deprecated" + tagLint = "nolint" adocCommonMarkerStart = "// Start of autogenerated code - DO NOT EDIT!" adocCommonMarkerEnd = "// End of autogenerated code - DO NOT EDIT!" + adocBadgesMarkerStart = adocCommonMarkerStart + " (badges)" + adocBadgesMarkerEnd = adocCommonMarkerEnd + " (badges)" + adocDescriptionMarkerStart = adocCommonMarkerStart + " (description)" adocDescriptionMarkerEnd = adocCommonMarkerEnd + " (description)" @@ -56,7 +60,8 @@ const ( adocNavMarkerEnd = adocCommonMarkerEnd + " (trait-nav)" ) -var tagTraitID = regexp.MustCompile(fmt.Sprintf("%s=([a-z0-9-]+)", regexp.QuoteMeta(tagTrait))) +var tagTraitRegex = regexp.MustCompile(fmt.Sprintf("%s=([a-z0-9-]+)", regexp.QuoteMeta(tagTrait))) +var tagDeprecatedRegex = regexp.MustCompile(fmt.Sprintf("%s=(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)", regexp.QuoteMeta(tagDeprecated))) // traitDocGen produces documentation about traits. type traitDocGen struct { @@ -104,7 +109,8 @@ func (g *traitDocGen) GenerateType(context *generator.Context, t *types.Type, ou return util.WithFileContent(filename, func(file *os.File, data []byte) error { content := strings.Split(string(data), "\n") - writeTitle(traitID, &content) + writeTitle(t, traitID, &content) + writeBadges(t, traitID, &content) writeDescription(t, traitID, &content) writeFields(t, traitID, &content) @@ -153,11 +159,11 @@ func traitNameFromFile(file string) string { return name } -func writeTitle(traitID string, content *[]string) { +func writeTitle(t *types.Type, traitID string, content *[]string) { res := append([]string(nil), *content...) + // Check if we already have a title for _, s := range res { if strings.HasPrefix(s, "= ") { - // Already has a title return } } @@ -165,6 +171,26 @@ func writeTitle(traitID string, content *[]string) { *content = res } +// Write badges +// https://shields.io/badges/static-badge +func writeBadges(t *types.Type, traitID string, content *[]string) { + pre, post := split(*content, adocBadgesMarkerStart, adocBadgesMarkerEnd) + // When there are no badges in the generated output already + // assume that we want to have them just after the title + if len(post) == 0 { + pre = (*content)[:2] + post = (*content)[2:] + } + res := append([]string(nil), pre...) + res = append(res, adocBadgesMarkerStart) + if ver := getDeprecatedVersion(t); ver != "" { + res = append(res, "image:https://img.shields.io/badge/"+ver+"-white?label=Deprecated&labelColor=C40C0C&color=gray[Deprecated Badge]") + } + res = append(res, adocBadgesMarkerEnd) + res = append(res, post...) + *content = res +} + func writeDescription(t *types.Type, traitID string, content *[]string) { pre, post := split(*content, adocDescriptionMarkerStart, adocDescriptionMarkerEnd) res := append([]string(nil), pre...) @@ -234,7 +260,7 @@ func writeMembers(t *types.Type, traitID string, content *[]string) { func getTraitID(t *types.Type) string { for _, s := range t.CommentLines { if strings.Contains(s, tagTrait) { - matches := tagTraitID.FindStringSubmatch(s) + matches := tagTraitRegex.FindStringSubmatch(s) if len(matches) < 2 { panic(fmt.Sprintf("unable to extract trait ID from tag line `%s`", s)) } @@ -244,6 +270,18 @@ func getTraitID(t *types.Type) string { panic(fmt.Sprintf("trait ID not found in type %s", t.Name.Name)) } +func getDeprecatedVersion(t *types.Type) string { + for _, s := range t.CommentLines { + if strings.Contains(s, tagDeprecated) { + matches := tagDeprecatedRegex.FindStringSubmatch(s) + if len(matches) == 4 { + return fmt.Sprintf("%s.%s.%s", matches[1], matches[2], matches[3]) + } + } + } + return "" +} + func filterOutTagsAndComments(comments []string) []string { res := make([]string, 0, len(comments)) for _, l := range comments { diff --git a/cmd/util/doc-gen/generators/traitmetadatagen.go b/cmd/util/doc-gen/generators/traitmetadatagen.go index 49c987bc3..40bae9c6c 100644 --- a/cmd/util/doc-gen/generators/traitmetadatagen.go +++ b/cmd/util/doc-gen/generators/traitmetadatagen.go @@ -90,7 +90,7 @@ func (g *traitMetaDataGen) GenerateType(context *generator.Context, t *types.Typ func (g *traitMetaDataGen) getTraitID(t *types.Type) string { for _, s := range t.CommentLines { if strings.Contains(s, tagTrait) { - matches := tagTraitID.FindStringSubmatch(s) + matches := tagTraitRegex.FindStringSubmatch(s) if len(matches) < 2 { panic(fmt.Sprintf("unable to extract trait ID from tag line `%s`", s)) } diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index 1287f9efe..2bc10b2e8 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -8240,8 +8240,6 @@ Deprecated: for backward compatibility. * <<#_camel_apache_org_v1_IntegrationKitTraits, IntegrationKitTraits>> * <<#_camel_apache_org_v1_Traits, Traits>> -WARNING: The Registry trait is **deprecated** and will removed in future release versions. - The Registry trait sets up Maven to use the Image registry as a Maven repository. diff --git a/docs/modules/traits/pages/3scale.adoc b/docs/modules/traits/pages/3scale.adoc index b76741dcf..4e410ddd0 100755 --- a/docs/modules/traits/pages/3scale.adoc +++ b/docs/modules/traits/pages/3scale.adoc @@ -1,5 +1,7 @@ = 3scale Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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 3scale to discover the generated service and make it available for API management. diff --git a/docs/modules/traits/pages/affinity.adoc b/docs/modules/traits/pages/affinity.adoc index a67ae2dbb..91691b40f 100755 --- a/docs/modules/traits/pages/affinity.adoc +++ b/docs/modules/traits/pages/affinity.adoc @@ -1,5 +1,7 @@ = Affinity Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) Allows constraining which nodes the integration pod(s) are eligible to be scheduled on, based on labels on the node, or with inter-pod affinity and anti-affinity, based on labels on pods that are already running on the nodes. diff --git a/docs/modules/traits/pages/aws-secrets-manager.adoc b/docs/modules/traits/pages/aws-secrets-manager.adoc index d221f8280..7bf60ee29 100644 --- a/docs/modules/traits/pages/aws-secrets-manager.adoc +++ b/docs/modules/traits/pages/aws-secrets-manager.adoc @@ -1,5 +1,7 @@ = Aws Secrets Manager Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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 diff --git a/docs/modules/traits/pages/azure-key-vault.adoc b/docs/modules/traits/pages/azure-key-vault.adoc index 6ff6e162d..79873afcb 100644 --- a/docs/modules/traits/pages/azure-key-vault.adoc +++ b/docs/modules/traits/pages/azure-key-vault.adoc @@ -1,5 +1,7 @@ = Azure Key Vault Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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 diff --git a/docs/modules/traits/pages/builder.adoc b/docs/modules/traits/pages/builder.adoc index 254557338..af1d9a6c5 100755 --- a/docs/modules/traits/pages/builder.adoc +++ b/docs/modules/traits/pages/builder.adoc @@ -1,5 +1,7 @@ = Builder Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The builder trait is internally used to determine the best strategy to build and configure IntegrationKits. diff --git a/docs/modules/traits/pages/camel.adoc b/docs/modules/traits/pages/camel.adoc index 627fd79a1..b6cde7896 100755 --- a/docs/modules/traits/pages/camel.adoc +++ b/docs/modules/traits/pages/camel.adoc @@ -1,5 +1,7 @@ = Camel Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Camel trait can be used to configure versions of Apache Camel K runtime and related libraries, it cannot be disabled. diff --git a/docs/modules/traits/pages/container.adoc b/docs/modules/traits/pages/container.adoc index ac11432d1..3bf2f6c90 100755 --- a/docs/modules/traits/pages/container.adoc +++ b/docs/modules/traits/pages/container.adoc @@ -1,5 +1,7 @@ = Container Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Container trait can be used to configure properties of the container where the integration will run. diff --git a/docs/modules/traits/pages/cron.adoc b/docs/modules/traits/pages/cron.adoc index 6b5cbb098..2134f8ef2 100755 --- a/docs/modules/traits/pages/cron.adoc +++ b/docs/modules/traits/pages/cron.adoc @@ -1,5 +1,7 @@ = Cron Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Cron trait can be used to customize the behaviour of periodic timer/cron based integrations. diff --git a/docs/modules/traits/pages/dependencies.adoc b/docs/modules/traits/pages/dependencies.adoc index 4acecfd6d..c23b75a28 100755 --- a/docs/modules/traits/pages/dependencies.adoc +++ b/docs/modules/traits/pages/dependencies.adoc @@ -1,5 +1,8 @@ = Dependencies Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.4.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 Dependencies trait is internally used to automatically add runtime dependencies based on the integration that the user wants to run. diff --git a/docs/modules/traits/pages/deployer.adoc b/docs/modules/traits/pages/deployer.adoc index e57d64d83..ebcd18e0b 100755 --- a/docs/modules/traits/pages/deployer.adoc +++ b/docs/modules/traits/pages/deployer.adoc @@ -1,5 +1,7 @@ = Deployer Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The deployer trait is responsible for deploying the resources owned by the integration, and can be used to explicitly select the underlying controller that will manage the integration pods. diff --git a/docs/modules/traits/pages/deployment.adoc b/docs/modules/traits/pages/deployment.adoc index b7177b399..2127bb342 100755 --- a/docs/modules/traits/pages/deployment.adoc +++ b/docs/modules/traits/pages/deployment.adoc @@ -1,5 +1,7 @@ = Deployment Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Deployment trait is responsible for generating the Kubernetes deployment that will make sure the integration will run in the cluster. diff --git a/docs/modules/traits/pages/environment.adoc b/docs/modules/traits/pages/environment.adoc index e1fb20a57..adfdca710 100755 --- a/docs/modules/traits/pages/environment.adoc +++ b/docs/modules/traits/pages/environment.adoc @@ -1,5 +1,7 @@ = Environment Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The environment trait is used internally to inject standard environment variables in the integration container, such as `NAMESPACE`, `POD_NAME` and others. diff --git a/docs/modules/traits/pages/error-handler.adoc b/docs/modules/traits/pages/error-handler.adoc index 9a7956397..4695216cb 100755 --- a/docs/modules/traits/pages/error-handler.adoc +++ b/docs/modules/traits/pages/error-handler.adoc @@ -1,5 +1,7 @@ = Error Handler Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The error-handler is a platform trait used to inject Error Handler source into the integration runtime. diff --git a/docs/modules/traits/pages/gc.adoc b/docs/modules/traits/pages/gc.adoc index fef922b06..86827d06f 100755 --- a/docs/modules/traits/pages/gc.adoc +++ b/docs/modules/traits/pages/gc.adoc @@ -1,5 +1,7 @@ = Gc Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The GC Trait garbage-collects all resources that are no longer necessary upon integration updates. diff --git a/docs/modules/traits/pages/gcp-secret-manager.adoc b/docs/modules/traits/pages/gcp-secret-manager.adoc index c544234e3..ab754fc4e 100644 --- a/docs/modules/traits/pages/gcp-secret-manager.adoc +++ b/docs/modules/traits/pages/gcp-secret-manager.adoc @@ -1,5 +1,7 @@ = Gcp Secret Manager Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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 diff --git a/docs/modules/traits/pages/hashicorp-vault.adoc b/docs/modules/traits/pages/hashicorp-vault.adoc index 10c0cb89d..337f86ae7 100644 --- a/docs/modules/traits/pages/hashicorp-vault.adoc +++ b/docs/modules/traits/pages/hashicorp-vault.adoc @@ -1,5 +1,7 @@ = Hashicorp Vault Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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 diff --git a/docs/modules/traits/pages/health.adoc b/docs/modules/traits/pages/health.adoc index 1f4402508..ac0577217 100755 --- a/docs/modules/traits/pages/health.adoc +++ b/docs/modules/traits/pages/health.adoc @@ -1,5 +1,7 @@ = Health Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The health trait is responsible for configuring the health probes on the integration container. diff --git a/docs/modules/traits/pages/ingress.adoc b/docs/modules/traits/pages/ingress.adoc index ed3a5abb5..788eed27a 100755 --- a/docs/modules/traits/pages/ingress.adoc +++ b/docs/modules/traits/pages/ingress.adoc @@ -1,5 +1,7 @@ = Ingress Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Ingress trait can be used to expose the service associated with the integration to the outside world with a Kubernetes Ingress. diff --git a/docs/modules/traits/pages/istio.adoc b/docs/modules/traits/pages/istio.adoc index 7fda9136e..4c707c391 100755 --- a/docs/modules/traits/pages/istio.adoc +++ b/docs/modules/traits/pages/istio.adoc @@ -1,5 +1,7 @@ = Istio Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Istio trait allows configuring properties related to the Istio service mesh, such as sidecar injection and outbound IP ranges. diff --git a/docs/modules/traits/pages/jolokia.adoc b/docs/modules/traits/pages/jolokia.adoc index 0f0499fde..3ce989fc2 100755 --- a/docs/modules/traits/pages/jolokia.adoc +++ b/docs/modules/traits/pages/jolokia.adoc @@ -1,5 +1,7 @@ = Jolokia Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Jolokia trait activates and configures the Jolokia Java agent. diff --git a/docs/modules/traits/pages/jvm.adoc b/docs/modules/traits/pages/jvm.adoc index 376461004..458b3daf6 100755 --- a/docs/modules/traits/pages/jvm.adoc +++ b/docs/modules/traits/pages/jvm.adoc @@ -1,5 +1,7 @@ = Jvm Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The JVM trait is used to configure the JVM that runs the Integration. This trait is configured only for Integration and related IntegrationKits (bound to a container image) built by Camel K operator. If the system detects the usage of a different container image (ie, built externally), then, the diff --git a/docs/modules/traits/pages/kamelets.adoc b/docs/modules/traits/pages/kamelets.adoc index 5fbf1f197..632790c19 100755 --- a/docs/modules/traits/pages/kamelets.adoc +++ b/docs/modules/traits/pages/kamelets.adoc @@ -1,5 +1,7 @@ = Kamelets Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The kamelets trait is a platform trait used to inject Kamelets into the integration runtime. diff --git a/docs/modules/traits/pages/keda.adoc b/docs/modules/traits/pages/keda.adoc index ce5ee3cd7..6c41a9ba4 100644 --- a/docs/modules/traits/pages/keda.adoc +++ b/docs/modules/traits/pages/keda.adoc @@ -1,5 +1,7 @@ = Keda Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The KEDA trait can be used for automatic integration with KEDA autoscalers. The trait can be either manually configured using the `triggers` option or automatically configured diff --git a/docs/modules/traits/pages/knative-service.adoc b/docs/modules/traits/pages/knative-service.adoc index 9782199f9..4449d90df 100755 --- a/docs/modules/traits/pages/knative-service.adoc +++ b/docs/modules/traits/pages/knative-service.adoc @@ -1,5 +1,7 @@ = Knative Service Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Knative Service trait allows configuring options when running the Integration as a Knative service, instead of a standard Kubernetes Deployment. diff --git a/docs/modules/traits/pages/knative.adoc b/docs/modules/traits/pages/knative.adoc index b82ac44a0..5b65347e6 100755 --- a/docs/modules/traits/pages/knative.adoc +++ b/docs/modules/traits/pages/knative.adoc @@ -1,5 +1,7 @@ = Knative Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Knative trait automatically discovers addresses of Knative resources and inject them into the running integration. diff --git a/docs/modules/traits/pages/logging.adoc b/docs/modules/traits/pages/logging.adoc index 72e504d8b..2906c75e2 100755 --- a/docs/modules/traits/pages/logging.adoc +++ b/docs/modules/traits/pages/logging.adoc @@ -1,5 +1,7 @@ = Logging Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Logging trait is used to configure Integration runtime logging options (such as color and format). The logging backend is provided by Quarkus, whose configuration is documented at https://quarkus.io/guides/logging. diff --git a/docs/modules/traits/pages/master.adoc b/docs/modules/traits/pages/master.adoc index ecf81667d..01a412c0b 100755 --- a/docs/modules/traits/pages/master.adoc +++ b/docs/modules/traits/pages/master.adoc @@ -1,5 +1,7 @@ = Master Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Master trait allows to configure the integration to automatically leverage Kubernetes resources for doing leader election and starting *master* routes only on certain instances. diff --git a/docs/modules/traits/pages/mount.adoc b/docs/modules/traits/pages/mount.adoc index 523408287..ba74bfc58 100644 --- a/docs/modules/traits/pages/mount.adoc +++ b/docs/modules/traits/pages/mount.adoc @@ -1,5 +1,7 @@ = Mount Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Mount trait can be used to configure volumes mounted on the Integration Pods. diff --git a/docs/modules/traits/pages/openapi.adoc b/docs/modules/traits/pages/openapi.adoc index d44469481..6d6de25fc 100755 --- a/docs/modules/traits/pages/openapi.adoc +++ b/docs/modules/traits/pages/openapi.adoc @@ -1,5 +1,7 @@ = Openapi Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The OpenAPI DSL trait is internally used to allow creating integrations from a OpenAPI specs. diff --git a/docs/modules/traits/pages/owner.adoc b/docs/modules/traits/pages/owner.adoc index 6a2cd8f22..8ad3805e6 100755 --- a/docs/modules/traits/pages/owner.adoc +++ b/docs/modules/traits/pages/owner.adoc @@ -1,5 +1,7 @@ = Owner Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Owner trait ensures that all created resources belong to the integration being created and transfers annotations and labels on the integration onto these owned resources. diff --git a/docs/modules/traits/pages/pdb.adoc b/docs/modules/traits/pages/pdb.adoc index 42c2d3295..b2c3280c7 100755 --- a/docs/modules/traits/pages/pdb.adoc +++ b/docs/modules/traits/pages/pdb.adoc @@ -1,5 +1,7 @@ = Pdb Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The PDB trait allows to configure the PodDisruptionBudget resource for the Integration pods. diff --git a/docs/modules/traits/pages/platform.adoc b/docs/modules/traits/pages/platform.adoc index ad25d822f..449667d0c 100755 --- a/docs/modules/traits/pages/platform.adoc +++ b/docs/modules/traits/pages/platform.adoc @@ -1,5 +1,7 @@ = Platform Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The platform trait is a base trait that is used to assign an integration platform to an integration. diff --git a/docs/modules/traits/pages/pod.adoc b/docs/modules/traits/pages/pod.adoc index 64e640f34..c87e4f5fa 100755 --- a/docs/modules/traits/pages/pod.adoc +++ b/docs/modules/traits/pages/pod.adoc @@ -1,5 +1,7 @@ = Pod Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The pod trait allows the customization of the Integration pods. It applies the `PodSpecTemplate` struct contained in the Integration `.spec.podTemplate` field, diff --git a/docs/modules/traits/pages/prometheus.adoc b/docs/modules/traits/pages/prometheus.adoc index a786aa6ce..82d19c075 100755 --- a/docs/modules/traits/pages/prometheus.adoc +++ b/docs/modules/traits/pages/prometheus.adoc @@ -1,5 +1,7 @@ = Prometheus Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Prometheus trait configures a Prometheus-compatible endpoint. It also creates a `PodMonitor` resource, so that the endpoint can be scraped automatically, when using the Prometheus operator. diff --git a/docs/modules/traits/pages/pull-secret.adoc b/docs/modules/traits/pages/pull-secret.adoc index 8d8fee21f..8c736917a 100755 --- a/docs/modules/traits/pages/pull-secret.adoc +++ b/docs/modules/traits/pages/pull-secret.adoc @@ -1,5 +1,7 @@ = Pull Secret Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Pull Secret trait sets a pull secret on the pod, to allow Kubernetes to retrieve the container image from an external registry. diff --git a/docs/modules/traits/pages/quarkus.adoc b/docs/modules/traits/pages/quarkus.adoc index baaf9834f..2531673fc 100755 --- a/docs/modules/traits/pages/quarkus.adoc +++ b/docs/modules/traits/pages/quarkus.adoc @@ -1,5 +1,7 @@ = Quarkus Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Quarkus trait configures the Quarkus runtime. diff --git a/docs/modules/traits/pages/registry.adoc b/docs/modules/traits/pages/registry.adoc index e7bcf958d..f86f3fb1a 100644 --- a/docs/modules/traits/pages/registry.adoc +++ b/docs/modules/traits/pages/registry.adoc @@ -1,8 +1,9 @@ = Registry Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.2.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) -WARNING: The Registry trait is **deprecated** and will removed in future release versions. - The Registry trait sets up Maven to use the Image registry as a Maven repository. diff --git a/docs/modules/traits/pages/resume.adoc b/docs/modules/traits/pages/resume.adoc index baa7e2916..4a5c08352 100644 --- a/docs/modules/traits/pages/resume.adoc +++ b/docs/modules/traits/pages/resume.adoc @@ -1,5 +1,7 @@ = Resume Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// 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. diff --git a/docs/modules/traits/pages/route.adoc b/docs/modules/traits/pages/route.adoc index e2b96b9d3..deb4d0cd4 100755 --- a/docs/modules/traits/pages/route.adoc +++ b/docs/modules/traits/pages/route.adoc @@ -1,5 +1,7 @@ = Route Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Route trait can be used to configure the creation of OpenShift routes for the integration. diff --git a/docs/modules/traits/pages/service-binding.adoc b/docs/modules/traits/pages/service-binding.adoc index ac4e88cee..9638113ac 100755 --- a/docs/modules/traits/pages/service-binding.adoc +++ b/docs/modules/traits/pages/service-binding.adoc @@ -1,5 +1,7 @@ = Service Binding Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Service Binding trait allows users to connect to Services in Kubernetes: https://github.com/k8s-service-bindings/spec#service-binding diff --git a/docs/modules/traits/pages/service.adoc b/docs/modules/traits/pages/service.adoc index d2bc3e1a9..14c59f7c2 100755 --- a/docs/modules/traits/pages/service.adoc +++ b/docs/modules/traits/pages/service.adoc @@ -1,5 +1,7 @@ = Service Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Service trait exposes the integration with a Service resource so that it can be accessed by other applications (or integrations) in the same namespace. diff --git a/docs/modules/traits/pages/telemetry.adoc b/docs/modules/traits/pages/telemetry.adoc index 6adacbaa8..18945f57b 100644 --- a/docs/modules/traits/pages/telemetry.adoc +++ b/docs/modules/traits/pages/telemetry.adoc @@ -1,5 +1,7 @@ = Telemetry Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) The Telemetry trait can be used to automatically publish tracing information to an OTLP compatible collector. diff --git a/docs/modules/traits/pages/toleration.adoc b/docs/modules/traits/pages/toleration.adoc index d2df24682..9b5bb1864 100755 --- a/docs/modules/traits/pages/toleration.adoc +++ b/docs/modules/traits/pages/toleration.adoc @@ -1,5 +1,7 @@ = Toleration Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +// End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) This trait sets Tolerations over Integration pods. Tolerations allow (but do not require) the pods to schedule onto nodes with matching taints. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ for more details. diff --git a/docs/modules/traits/pages/tracing.adoc b/docs/modules/traits/pages/tracing.adoc old mode 100755 new mode 100644 index 549910fed..ee6c4003f --- a/docs/modules/traits/pages/tracing.adoc +++ b/docs/modules/traits/pages/tracing.adoc @@ -1,5 +1,8 @@ = Tracing Trait +// Start of autogenerated code - DO NOT EDIT! (badges) +image:https://img.shields.io/badge/2.3.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) WARNING: The Tracing trait has been **deprecated** in favor of the xref:traits:telemetry.adoc[Telemetry] trait. diff --git a/pkg/apis/camel/v1/trait/dependencies.go b/pkg/apis/camel/v1/trait/dependencies.go index 61b1cd3d4..93d13ec85 100644 --- a/pkg/apis/camel/v1/trait/dependencies.go +++ b/pkg/apis/camel/v1/trait/dependencies.go @@ -20,7 +20,8 @@ package trait // The Dependencies trait is internally used to automatically add runtime dependencies based on the // integration that the user wants to run. // -// +camel-k:trait=dependencies. +// +camel-k:trait=dependencies +// +camel-k:deprecated=2.4.0 type DependenciesTrait struct { PlatformBaseTrait `property:",squash" json:",inline"` } diff --git a/pkg/apis/camel/v1/trait/registry.go b/pkg/apis/camel/v1/trait/registry.go index d0d6c7d09..a4b839183 100644 --- a/pkg/apis/camel/v1/trait/registry.go +++ b/pkg/apis/camel/v1/trait/registry.go @@ -17,12 +17,11 @@ limitations under the License. package trait -// WARNING: The Registry trait is **deprecated** and will removed in future release versions. -// // The Registry trait sets up Maven to use the Image registry // as a Maven repository. // -// +camel-k:trait=registry. +// +camel-k:trait=registry +// +camel-k:deprecated=2.2.0 type RegistryTrait struct { Trait `property:",squash" json:",inline"` }