From 24dc12b3cb123151426bbc9acae14e90bd6ed511 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Thu, 14 Nov 2024 18:43:02 +0100 Subject: [PATCH] fix(doc): deprecated badge Closes #5936 --- addons/keda/keda.go | 2 ++ cmd/util/doc-gen/generators/traitdocgen.go | 4 ++-- docs/modules/ROOT/pages/index.adoc | 1 - docs/modules/traits/pages/3scale.adoc | 3 ++- docs/modules/traits/pages/aws-secrets-manager.adoc | 3 ++- docs/modules/traits/pages/azure-key-vault.adoc | 3 ++- docs/modules/traits/pages/gcp-secret-manager.adoc | 3 ++- docs/modules/traits/pages/hashicorp-vault.adoc | 3 ++- docs/modules/traits/pages/keda.adoc | 2 ++ docs/modules/traits/pages/openapi.adoc | 3 ++- docs/modules/traits/pages/resume.adoc | 3 ++- docs/modules/traits/pages/service-binding.adoc | 3 ++- 12 files changed, 22 insertions(+), 11 deletions(-) diff --git a/addons/keda/keda.go b/addons/keda/keda.go index a8a0edf488..0536c24488 100644 --- a/addons/keda/keda.go +++ b/addons/keda/keda.go @@ -61,6 +61,8 @@ const ( kameletAnnotationAuthenticationPrefix = "camel.apache.org/keda.authentication." ) +// WARNING: The KEDA trait is experimental and may not be suitable for production grade use cases. +// // 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 // via markers in the Kamelets. diff --git a/cmd/util/doc-gen/generators/traitdocgen.go b/cmd/util/doc-gen/generators/traitdocgen.go index b1d684b8b2..5a12a2764c 100644 --- a/cmd/util/doc-gen/generators/traitdocgen.go +++ b/cmd/util/doc-gen/generators/traitdocgen.go @@ -173,7 +173,6 @@ func writeTitle(traitID string, content *[]string) { } // Write badges -// https://shields.io/badges/static-badge func writeBadges(t *types.Type, content *[]string) { pre, post := split(*content, adocBadgesMarkerStart, adocBadgesMarkerEnd) // When there are no badges in the generated output already @@ -185,7 +184,8 @@ func writeBadges(t *types.Type, content *[]string) { 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, "[.badges]") + res = append(res, "[.badge-key]##Deprecated since##[.badge-unsupported]##"+ver+"##") } res = append(res, adocBadgesMarkerEnd) res = append(res, post...) diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 186a487396..133859700c 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -33,4 +33,3 @@ kubectl -f helloworld.yaml ---- The integration code will immediately run in the cloud. Continue reading the documentation to xref:installation/installation.adoc[install and get started with Camel K]. - diff --git a/docs/modules/traits/pages/3scale.adoc b/docs/modules/traits/pages/3scale.adoc index 247c7e0dd1..a69f91b387 100755 --- a/docs/modules/traits/pages/3scale.adoc +++ b/docs/modules/traits/pages/3scale.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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 diff --git a/docs/modules/traits/pages/aws-secrets-manager.adoc b/docs/modules/traits/pages/aws-secrets-manager.adoc index ea4bc91708..a18f1b65e4 100644 --- a/docs/modules/traits/pages/aws-secrets-manager.adoc +++ b/docs/modules/traits/pages/aws-secrets-manager.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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 27e76f3567..5f7bdaf13a 100644 --- a/docs/modules/traits/pages/azure-key-vault.adoc +++ b/docs/modules/traits/pages/azure-key-vault.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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/gcp-secret-manager.adoc b/docs/modules/traits/pages/gcp-secret-manager.adoc index ab8952e6b5..c9f66f5b3f 100644 --- a/docs/modules/traits/pages/gcp-secret-manager.adoc +++ b/docs/modules/traits/pages/gcp-secret-manager.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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 3cb3346d79..97a0147a7d 100644 --- a/docs/modules/traits/pages/hashicorp-vault.adoc +++ b/docs/modules/traits/pages/hashicorp-vault.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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/keda.adoc b/docs/modules/traits/pages/keda.adoc index c198016e86..ef5cf606d0 100644 --- a/docs/modules/traits/pages/keda.adoc +++ b/docs/modules/traits/pages/keda.adoc @@ -3,6 +3,8 @@ // Start of autogenerated code - DO NOT EDIT! (badges) // End of autogenerated code - DO NOT EDIT! (badges) // Start of autogenerated code - DO NOT EDIT! (description) +WARNING: The KEDA trait is experimental and may not be suitable for production grade use cases. + 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 via markers in the Kamelets. diff --git a/docs/modules/traits/pages/openapi.adoc b/docs/modules/traits/pages/openapi.adoc index 61b3a941c5..1a06aed4aa 100755 --- a/docs/modules/traits/pages/openapi.adoc +++ b/docs/modules/traits/pages/openapi.adoc @@ -1,7 +1,8 @@ = Openapi 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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/resume.adoc b/docs/modules/traits/pages/resume.adoc index 0af5f45022..19b999ea44 100644 --- a/docs/modules/traits/pages/resume.adoc +++ b/docs/modules/traits/pages/resume.adoc @@ -1,7 +1,8 @@ = 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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/service-binding.adoc b/docs/modules/traits/pages/service-binding.adoc index 7ae2879ade..75bb79edb0 100755 --- a/docs/modules/traits/pages/service-binding.adoc +++ b/docs/modules/traits/pages/service-binding.adoc @@ -1,7 +1,8 @@ = Service Binding 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] +[.badges] +[.badge-key]##Deprecated since##[.badge-unsupported]##2.5.0## // 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: