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 e796df3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 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
7 changes: 5 additions & 2 deletions docs/cmd/kuma-prometheus-sd/kuma-prometheus-sd.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
## kuma-prometheus-sd

Prometheus service discovery adapter for native integration with Kuma
[DEPRECATED] Prometheus service discovery adapter for native integration with Kuma

### Synopsis

Prometheus service discovery adapter for native integration with Kuma.
[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


### Options

Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/kuma-prometheus-sd/kuma-prometheus-sd_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ kuma-prometheus-sd run [flags]

### SEE ALSO

* [kuma-prometheus-sd](kuma-prometheus-sd.md) - Prometheus service discovery adapter for native integration with Kuma
* [kuma-prometheus-sd](kuma-prometheus-sd.md) - [DEPRECATED] Prometheus service discovery adapter for native integration with Kuma

2 changes: 1 addition & 1 deletion docs/cmd/kuma-prometheus-sd/kuma-prometheus-sd_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ kuma-prometheus-sd version [flags]

### SEE ALSO

* [kuma-prometheus-sd](kuma-prometheus-sd.md) - Prometheus service discovery adapter for native integration with Kuma
* [kuma-prometheus-sd](kuma-prometheus-sd.md) - [DEPRECATED] Prometheus service discovery adapter for native integration with Kuma

0 comments on commit e796df3

Please sign in to comment.