Skip to content

Commit

Permalink
feat(kuma-prometheus-sd) add deprecation notice
Browse files Browse the repository at this point in the history
Signed-off-by: austin ce <austin.cawley@gmail.com>
  • Loading branch information
austince committed Oct 22, 2021
1 parent 7e40b0f commit d840cd1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/kuma-prometheus-sd/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# kuma-prometheus-sd

## DEPRECATION NOTICE

`kuma-prometheus-sd` has been deprecated in favor of
the native [`kuma_sd`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kuma_sd_config)
that is builtin to Prometheus 2.29 and later.

## Overview

`kuma-prometheus-sd` is an **adapter** that integrates `Prometheus` service discovery mechanism with [Kuma](https://kuma.io) Service Mesh.
Expand Down
12 changes: 10 additions & 2 deletions app/kuma-prometheus-sd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ func NewRootCmd(opts kuma_cmd.RunCmdOpts) *cobra.Command {
}{}
cmd := &cobra.Command{
Use: "kuma-prometheus-sd",
Short: "Prometheus service discovery adapter for native integration with Kuma",
Long: `Prometheus service discovery adapter for native integration with Kuma.`,
Short: "[DEPRECATED] Prometheus service discovery adapter for native integration with Kuma",
Long: `[DEPRECATED] Prometheus service discovery adapter for native integration with Kuma.
It has been superseded by the native kuma_sd in Prometheus as of Prometheus 2.29.
See: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kuma_sd_config
`,
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
level, err := kuma_log.ParseLogLevel(args.logLevel)
if err != nil {
Expand All @@ -50,6 +53,11 @@ func NewRootCmd(opts kuma_cmd.RunCmdOpts) *cobra.Command {
// avoid printing usage instructions
cmd.SilenceUsage = true

if cmd.Name() != "help" {
fmt.Println(`kuma-prometheus-sd is DEPRECATED and will be removed in a future version.
It has been superseded by the native kuma_sd in Prometheus as of Prometheus 2.29.
See: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kuma_sd_config`)
}
return nil
},
}
Expand Down

0 comments on commit d840cd1

Please sign in to comment.