Skip to content

Commit eef39cb

Browse files
committed
Graduate Alertmanager API and sharding from experimental
Remove experimental markers for Alertmanager API and sharding: - New flag is -alertmanager.enable-api. The old flag is deprecated but still valid - Remove WarnExperimentalUse("Alertmanager sharding") call - Remove both items from experimental features list in v1-guarantees.md The flag name itself is kept unchanged for backwards compatibility. Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
1 parent c8a51d8 commit eef39cb

7 files changed

Lines changed: 13 additions & 16 deletions

File tree

docs/api/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ POST /multitenant_alertmanager/delete_tenant_config
796796
```
797797

798798
This endpoint deletes configuration for a tenant identified by `X-Scope-OrgID` header.
799-
It is internal, available even if Alertmanager API is not enabled by using `-experimental.alertmanager.enable-api`.
799+
It is internal, available even if Alertmanager API is not enabled by using `-alertmanager.enable-api`.
800800
The endpoint returns a status code of `200` if the user's configuration has been deleted, or it didn't exist in the first place.
801801

802802
_Requires [authentication](#authentication)._
@@ -811,7 +811,7 @@ Get the current Alertmanager configuration for the authenticated tenant, reading
811811

812812
This endpoint doesn't accept any URL query parameter and returns `200` on success.
813813

814-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
814+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
815815

816816
_Requires [authentication](#authentication)._
817817

@@ -825,7 +825,7 @@ Stores or updates the Alertmanager configuration for the authenticated tenant. T
825825

826826
This endpoint expects the Alertmanager **YAML** configuration in the request body and returns `201` on success.
827827

828-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
828+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
829829

830830
_Requires [authentication](#authentication)._
831831

@@ -863,7 +863,7 @@ Deletes the Alertmanager configuration for the authenticated tenant.
863863

864864
This endpoint doesn't accept any URL query parameter and returns `200` on success.
865865

866-
_This experimental endpoint is disabled by default and can be enabled via the `-experimental.alertmanager.enable-api` CLI flag (or its respective YAML config option)._
866+
_This endpoint is disabled by default and can be enabled via the `-alertmanager.enable-api` CLI flag (or its respective YAML config option)._
867867

868868
_Requires [authentication](#authentication)._
869869

docs/configuration/config-file-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ cluster:
610610
# CLI flag: -alertmanager.cluster.push-pull-interval
611611
[push_pull_interval: <duration> | default = 1m]
612612
613-
# Enable the experimental alertmanager config api.
614-
# CLI flag: -experimental.alertmanager.enable-api
613+
# Enable the alertmanager config api.
614+
# CLI flag: -alertmanager.enable-api
615615
[enable_api: <boolean> | default = false]
616616
617617
# Maximum number of concurrent GET API requests before returning an error.

docs/configuration/v1-guarantees.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ Currently experimental features are:
4343
- Zone awareness based replication.
4444
- Ruler API (to PUT rules).
4545
- Alertmanager:
46-
- API (enabled via `-experimental.alertmanager.enable-api`)
47-
- Sharding of tenants across multiple instances (enabled via `-alertmanager.sharding-enabled`)
4846
- Receiver integrations firewall (configured via `-alertmanager.receivers-firewall.*`)
4947
- Memcached client DNS-based service discovery.
5048
- In-memory (FIFO) and Redis cache.

docs/getting-started/cortex-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ config:
147147
# -- Disable alertmanager gossip cluster by setting empty listen_address to empty string
148148
cluster:
149149
listen_address: '0.0.0.0:9094'
150-
# -- Enable the experimental alertmanager config api.
150+
# -- Enable the alertmanager config api.
151151
enable_api: true
152152
external_url: '/api/prom/alertmanager'
153153
frontend:

integration/e2ecortex/services.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ func NewAlertmanager(name string, flags map[string]string, image string) *Cortex
393393
e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
394394
"-target": "alertmanager",
395395
"-log.level": "warn",
396-
"-experimental.alertmanager.enable-api": "true",
396+
"-alertmanager.enable-api": "true",
397397
}, flags))...),
398398
e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299),
399399
httpPort,
@@ -413,7 +413,7 @@ func NewAlertmanagerWithTLS(name string, flags map[string]string, image string)
413413
e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
414414
"-target": "alertmanager",
415415
"-log.level": "warn",
416-
"-experimental.alertmanager.enable-api": "true",
416+
"-alertmanager.enable-api": "true",
417417
}, flags))...),
418418
e2e.NewTCPReadinessProbe(httpPort),
419419
httpPort,

pkg/alertmanager/multitenant.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ func (cfg *MultitenantAlertmanagerConfig) RegisterFlags(f *flag.FlagSet) {
119119
f.StringVar(&cfg.AutoWebhookRoot, "alertmanager.configs.auto-webhook-root", "", "Root of URL to generate if config is "+autoWebhookURL)
120120
f.DurationVar(&cfg.PollInterval, "alertmanager.configs.poll-interval", 15*time.Second, "How frequently to poll Cortex configs")
121121

122-
f.BoolVar(&cfg.EnableAPI, "experimental.alertmanager.enable-api", false, "Enable the experimental alertmanager config api.")
122+
f.BoolVar(&cfg.EnableAPI, "alertmanager.enable-api", false, "Enable the alertmanager config api.")
123+
f.BoolVar(&cfg.EnableAPI, "experimental.alertmanager.enable-api", false, "Deprecated: Use -alertmanager.enable-api instead.")
123124
f.IntVar(&cfg.APIConcurrency, "alertmanager.api-concurrency", 0, "Maximum number of concurrent GET API requests before returning an error.")
124125
f.DurationVar(&cfg.GCInterval, "alertmanager.alerts-gc-interval", 30*time.Minute, "Alertmanager alerts Garbage collection interval.")
125126
f.BoolVar(&cfg.ShardingEnabled, "alertmanager.sharding-enabled", false, "Shard tenants across multiple alertmanager instances.")
@@ -352,8 +353,6 @@ func NewMultitenantAlertmanager(cfg *MultitenantAlertmanagerConfig, store alerts
352353

353354
var ringStore kv.Client
354355
if cfg.ShardingEnabled {
355-
util_log.WarnExperimentalUse("Alertmanager sharding")
356-
357356
ringStore, err = kv.NewClient(
358357
cfg.ShardingRing.KVStore,
359358
ring.GetCodec(),

schemas/cortex-config-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@
279279
},
280280
"enable_api": {
281281
"default": false,
282-
"description": "Enable the experimental alertmanager config api.",
282+
"description": "Enable the alertmanager config api.",
283283
"type": "boolean",
284-
"x-cli-flag": "experimental.alertmanager.enable-api"
284+
"x-cli-flag": "alertmanager.enable-api"
285285
},
286286
"enabled_tenants": {
287287
"description": "Comma separated list of tenants whose alerts this alertmanager can process. If specified, only these tenants will be handled by alertmanager, otherwise this alertmanager can process alerts from all tenants.",

0 commit comments

Comments
 (0)