Skip to content

Commit a962de6

Browse files
committed
feat: remove EXTRA_ARGS support from AM
This is not needed since GMP 0.13 (https://github.com/GoogleCloudPlatform/prometheus-engine/releases#release-v0.13.0) Context b/531686759 Rationale: This triggers prometheus/prometheus vuln scanners (despite no indirect prom/prom dep), plus it's not needed old dep we don't need to maintain. Signed-off-by: bwplotka <bwplotka@gmail.com>
1 parent 935e7e4 commit a962de6

3 files changed

Lines changed: 3 additions & 1358 deletions

File tree

‎cmd/alertmanager/main.go‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"syscall"
3030
"time"
3131

32-
exportsetup "github.com/GoogleCloudPlatform/prometheus-engine/pkg/export/setup"
3332
"github.com/alecthomas/kingpin/v2"
3433
"github.com/go-kit/log"
3534
"github.com/go-kit/log/level"
@@ -152,7 +151,7 @@ func run() int {
152151
httpTimeout = kingpin.Flag("web.timeout", "Timeout for HTTP requests. If negative or zero, no timeout is set.").Default("0").Duration()
153152

154153
clusterBindAddr = kingpin.Flag("cluster.listen-address", "Listen address for cluster. Set to empty string to disable HA mode.").
155-
Default(defaultClusterAddr).String()
154+
Default(defaultClusterAddr).String()
156155
clusterAdvertiseAddr = kingpin.Flag("cluster.advertise-address", "Explicit address to advertise in cluster.").String()
157156
peers = kingpin.Flag("cluster.peer", "Initial peers (may be repeated).").Strings()
158157
peerTimeout = kingpin.Flag("cluster.peer-timeout", "Time to wait between peers to send notifications.").Default("15s").Duration()
@@ -177,11 +176,7 @@ func run() int {
177176
kingpin.CommandLine.GetFlag("help").Short('h')
178177
// Read any other flags from EXTRA_ARGS.
179178
logger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
180-
if extraArgs, err := exportsetup.ExtraArgs(); err != nil {
181-
level.Error(logger).Log("msg", "Error parsing commandline arguments", "err", err)
182-
kingpin.CommandLine.Usage(os.Args[1:])
183-
os.Exit(2)
184-
} else if _, err := kingpin.CommandLine.Parse(append(os.Args[1:], extraArgs...)); err != nil {
179+
if _, err := kingpin.CommandLine.Parse(os.Args[1:]); err != nil {
185180
level.Error(logger).Log("msg", "Error parsing commandline arguments", "err", err)
186181
kingpin.CommandLine.Usage(os.Args[1:])
187182
os.Exit(2)

‎go.mod‎

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/prometheus/alertmanager
33
go 1.25.8
44

55
require (
6-
github.com/GoogleCloudPlatform/prometheus-engine v0.7.0
76
github.com/alecthomas/kingpin/v2 v2.4.0
87
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
98
github.com/aws/aws-sdk-go v1.50.8
@@ -56,17 +55,11 @@ require (
5655
)
5756

5857
require (
59-
cloud.google.com/go/auth v0.20.0 // indirect
60-
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
61-
cloud.google.com/go/compute/metadata v0.9.0 // indirect
62-
cloud.google.com/go/monitoring v1.24.3 // indirect
63-
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
6458
github.com/armon/go-metrics v0.3.10 // indirect
6559
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
6660
github.com/beorn7/perks v1.0.1 // indirect
6761
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
6862
github.com/davecgh/go-spew v1.1.1 // indirect
69-
github.com/dennwc/varint v1.0.0 // indirect
7063
github.com/docker/go-units v0.5.0 // indirect
7164
github.com/go-logfmt/logfmt v0.5.1 // indirect
7265
github.com/go-logr/logr v1.4.3 // indirect
@@ -75,68 +68,35 @@ require (
7568
github.com/go-openapi/jsonreference v0.21.0 // indirect
7669
github.com/golang/protobuf v1.5.4 // indirect
7770
github.com/google/btree v1.0.1 // indirect
78-
github.com/google/gofuzz v1.2.0 // indirect
79-
github.com/google/s2a-go v0.1.9 // indirect
80-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
8171
github.com/google/uuid v1.6.0 // indirect
82-
github.com/googleapis/enterprise-certificate-proxy v0.3.16 // indirect
83-
github.com/googleapis/gax-go/v2 v2.22.0 // indirect
84-
github.com/googleapis/gnostic v0.5.5 // indirect
85-
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
8672
github.com/hashicorp/errwrap v1.1.0 // indirect
8773
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
8874
github.com/hashicorp/go-msgpack v0.5.3 // indirect
8975
github.com/hashicorp/go-multierror v1.1.0 // indirect
9076
github.com/hashicorp/golang-lru v0.5.4 // indirect
91-
github.com/imdario/mergo v0.3.12 // indirect
9277
github.com/jmespath/go-jmespath v0.4.0 // indirect
9378
github.com/josharian/intern v1.0.0 // indirect
9479
github.com/jpillora/backoff v1.0.0 // indirect
95-
github.com/json-iterator/go v1.1.12 // indirect
9680
github.com/julienschmidt/httprouter v1.3.0 // indirect
9781
github.com/mailru/easyjson v0.7.7 // indirect
9882
github.com/miekg/dns v1.1.43 // indirect
9983
github.com/mitchellh/mapstructure v1.5.0 // indirect
100-
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
101-
github.com/modern-go/reflect2 v1.0.2 // indirect
10284
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
10385
github.com/opentracing/opentracing-go v1.2.0 // indirect
104-
github.com/pkg/errors v0.9.1 // indirect
10586
github.com/pmezard/go-difflib v1.0.0 // indirect
10687
github.com/prometheus/client_model v0.5.0 // indirect
10788
github.com/prometheus/procfs v0.12.0 // indirect
108-
github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7 // indirect
10989
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
110-
github.com/spf13/pflag v1.0.5 // indirect
11190
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
11291
go.mongodb.org/mongo-driver v1.17.7 // indirect
113-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect
11492
go.opentelemetry.io/otel v1.43.0 // indirect
11593
go.opentelemetry.io/otel/metric v1.43.0 // indirect
94+
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
11695
go.opentelemetry.io/otel/trace v1.43.0 // indirect
117-
go.uber.org/goleak v1.1.12 // indirect
11896
golang.org/x/crypto v0.52.0 // indirect
11997
golang.org/x/oauth2 v0.36.0 // indirect
12098
golang.org/x/sync v0.21.0 // indirect
12199
golang.org/x/sys v0.45.0 // indirect
122-
golang.org/x/term v0.43.0 // indirect
123-
golang.org/x/time v0.15.0 // indirect
124-
google.golang.org/api v0.284.0 // indirect
125-
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect
126-
google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7 // indirect
127-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
128-
google.golang.org/grpc v1.81.1 // indirect
129100
google.golang.org/protobuf v1.36.11 // indirect
130-
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
131-
gopkg.in/inf.v0 v0.9.1 // indirect
132101
gopkg.in/yaml.v3 v3.0.1 // indirect
133-
k8s.io/api v0.23.17 // indirect
134-
k8s.io/apimachinery v0.23.17 // indirect
135-
k8s.io/client-go v0.23.17 // indirect
136-
k8s.io/klog/v2 v2.80.1 // indirect
137-
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
138-
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
139-
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
140-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
141-
sigs.k8s.io/yaml v1.3.0 // indirect
142102
)

0 commit comments

Comments
 (0)