Skip to content

Commit

Permalink
Remove prometheus support (#599)
Browse files Browse the repository at this point in the history
Signed-off-by: Deepak Kinni <[email protected]>
  • Loading branch information
deepakkinni authored Jan 14, 2025
1 parent 80def43 commit 33e0a40
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions pkg/cmd/backupdriver/cli/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func NewCommand(f client.Factory) *cobra.Command {
var (
logLevelFlag = logging.LogLevelFlag(logrus.InfoLevel)
config = serverConfig{
metricsAddress: cmd.DefaultMetricsAddress,
clientQPS: cmd.DefaultClientQPS,
clientBurst: cmd.DefaultClientBurst,
profilerAddress: cmd.DefaultProfilerAddress,
Expand Down Expand Up @@ -127,7 +126,6 @@ func NewCommand(f client.Factory) *cobra.Command {
// Common flags
command.Flags().Var(logLevelFlag, "log-level", fmt.Sprintf("the level at which to log. Valid values are %s.", strings.Join(logLevelFlag.AllowedValues(), ", ")))
command.Flags().Var(config.formatFlag, "log-format", fmt.Sprintf("the format for log output. Valid values are %s.", strings.Join(config.formatFlag.AllowedValues(), ", ")))
command.Flags().StringVar(&config.metricsAddress, "metrics-address", config.metricsAddress, "the address to expose prometheus metrics")
command.Flags().Float32Var(&config.clientQPS, "client-qps", config.clientQPS, "maximum number of requests per second by the server to the Kubernetes API once the burst limit has been reached")
command.Flags().IntVar(&config.clientBurst, "client-burst", config.clientBurst, "maximum number of requests by the server to the Kubernetes API in a short period of time")
command.Flags().StringVar(&config.profilerAddress, "profiler-address", config.profilerAddress, "the address to expose the pprof profiler")
Expand Down Expand Up @@ -312,7 +310,6 @@ func newServer(f client.Factory, config serverConfig, logger *logrus.Logger) (*s

s := &server{
namespace: f.Namespace(),
metricsAddress: config.metricsAddress,
kubeClient: kubeClient,
backupdriverClient: backupdriverClient,
datamoverClient: datamoverClient,
Expand Down
3 changes: 0 additions & 3 deletions pkg/cmd/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ limitations under the License.
package cmd

const (
// the port where prometheus metrics are exposed
DefaultMetricsAddress = ":8085"

// server's client default qps and burst
DefaultClientQPS float32 = 100.0
DefaultClientBurst int = 100
Expand Down
4 changes: 0 additions & 4 deletions pkg/cmd/datamgr/cli/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import (
)

type serverConfig struct {
metricsAddress string
clientQPS float32
clientBurst int
profilerAddress string
Expand All @@ -71,7 +70,6 @@ func NewCommand(f client.Factory) *cobra.Command {
var (
logLevelFlag = logging.LogLevelFlag(logrus.InfoLevel)
config = serverConfig{
metricsAddress: cmd.DefaultMetricsAddress,
clientQPS: cmd.DefaultClientQPS,
clientBurst: cmd.DefaultClientBurst,
profilerAddress: cmd.DefaultProfilerAddress,
Expand Down Expand Up @@ -122,7 +120,6 @@ func NewCommand(f client.Factory) *cobra.Command {
// Common flags
command.Flags().Var(logLevelFlag, "log-level", fmt.Sprintf("the level at which to log. Valid values are %s.", strings.Join(logLevelFlag.AllowedValues(), ", ")))
command.Flags().Var(config.formatFlag, "log-format", fmt.Sprintf("the format for log output. Valid values are %s.", strings.Join(config.formatFlag.AllowedValues(), ", ")))
command.Flags().StringVar(&config.metricsAddress, "metrics-address", config.metricsAddress, "the address to expose prometheus metrics")
command.Flags().Float32Var(&config.clientQPS, "client-qps", config.clientQPS, "maximum number of requests per second by the server to the Kubernetes API once the burst limit has been reached")
command.Flags().IntVar(&config.clientBurst, "client-burst", config.clientBurst, "maximum number of requests by the server to the Kubernetes API in a short period of time")
command.Flags().StringVar(&config.profilerAddress, "profiler-address", config.profilerAddress, "the address to expose the pprof profiler")
Expand Down Expand Up @@ -287,7 +284,6 @@ func newServer(f client.Factory, config serverConfig, logger *logrus.Logger) (*s

s := &server{
namespace: f.Namespace(),
metricsAddress: config.metricsAddress,
kubeClient: kubeClient,
pluginClient: pluginClient,
pluginInformerFactory: pluginInformers.NewSharedInformerFactoryWithOptions(pluginClient, constants.ResyncPeriod, pluginInformers.WithNamespace(f.Namespace())),
Expand Down

0 comments on commit 33e0a40

Please sign in to comment.