[release-2.9.x] Allow using the forget button when access via the internal server (#10443)

Backport e5c425eef6 from #10221 

Co-authored-by: Periklis Tsirakidis <periklis@redhat.com>
pull/10455/head
Grot (@grafanabot) 2 years ago committed by GitHub
parent da3ebafb45
commit 2a539e00e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 12
      pkg/loki/modules.go

@ -78,6 +78,7 @@
* [9949](https://github.com/grafana/loki/pull/9949) **masslessparticle**: Fix pipelines to clear caches when tailing to avoid resource exhaustion.
* [9936](https://github.com/grafana/loki/pull/9936) **masslessparticle**: Fix the way query stages are reordered when `unpack` is present.
* [10309](https://github.com/grafana/loki/pull/10309) **akhilanarayanan**: Fix race condition in series index store.
* [10221](https://github.com/grafana/loki/pull/10221) **periklis**: Allow using the forget button when access via the internal server
##### Changes

@ -215,7 +215,7 @@ func (t *Loki) initRing() (_ services.Service, err error) {
t.Server.HTTP.Path("/ring").Methods("GET", "POST").Handler(t.ring)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/ring").Methods("GET").Handler(t.ring)
t.InternalServer.HTTP.Path("/ring").Methods("GET", "POST").Handler(t.ring)
}
return t.ring, nil
}
@ -320,7 +320,7 @@ func (t *Loki) initDistributor() (services.Service, error) {
t.Server.HTTP.Path("/distributor/ring").Methods("GET", "POST").Handler(t.distributor)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/distributor/ring").Methods("GET").Handler(t.distributor)
t.InternalServer.HTTP.Path("/distributor/ring").Methods("GET", "POST").Handler(t.distributor)
}
t.Server.HTTP.Path("/api/prom/push").Methods("POST").Handler(pushHandler)
@ -979,7 +979,7 @@ func (t *Loki) initRuler() (_ services.Service, err error) {
t.Server.HTTP.Path("/ruler/ring").Methods("GET", "POST").Handler(t.ruler)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/ruler/ring").Methods("GET").Handler(t.ruler)
t.InternalServer.HTTP.Path("/ruler/ring").Methods("GET", "POST").Handler(t.ruler)
}
base_ruler.RegisterRulerServer(t.Server.GRPC, t.ruler)
@ -1150,7 +1150,7 @@ func (t *Loki) initCompactor() (services.Service, error) {
t.Server.HTTP.Path("/compactor/ring").Methods("GET", "POST").Handler(t.compactor)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/compactor/ring").Methods("GET").Handler(t.compactor)
t.InternalServer.HTTP.Path("/compactor/ring").Methods("GET", "POST").Handler(t.compactor)
}
if t.Cfg.CompactorConfig.RetentionEnabled {
@ -1240,7 +1240,7 @@ func (t *Loki) initIndexGatewayRing() (_ services.Service, err error) {
t.Server.HTTP.Path("/indexgateway/ring").Methods("GET", "POST").Handler(t.indexGatewayRingManager)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/indexgateway/ring").Methods("GET").Handler(t.indexGatewayRingManager)
t.InternalServer.HTTP.Path("/indexgateway/ring").Methods("GET", "POST").Handler(t.indexGatewayRingManager)
}
return t.indexGatewayRingManager, nil
@ -1291,7 +1291,7 @@ func (t *Loki) initQuerySchedulerRing() (_ services.Service, err error) {
t.Server.HTTP.Path("/scheduler/ring").Methods("GET", "POST").Handler(t.querySchedulerRingManager)
if t.Cfg.InternalServer.Enable {
t.InternalServer.HTTP.Path("/scheduler/ring").Methods("GET").Handler(t.querySchedulerRingManager)
t.InternalServer.HTTP.Path("/scheduler/ring").Methods("GET", "POST").Handler(t.querySchedulerRingManager)
}
return t.querySchedulerRingManager, nil

Loading…
Cancel
Save