[v7.5.x] Loki: Pass Skip TLS Verify setting to alert queries (#33031)
* WIP (#33025)
(cherry picked from commit 4f7728738e)
* Update pkg/tsdb/loki/loki.go
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
This commit is contained in:
co-authored by
Ivana Huckova
parent
2135316a74
commit
f9bbe2fe41
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/grafana/loki/pkg/loghttp"
|
||||
"github.com/grafana/loki/pkg/logproto"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/prometheus/common/config"
|
||||
"github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
@@ -42,10 +43,18 @@ func (e *LokiExecutor) Query(ctx context.Context, dsInfo *models.DataSource, tsd
|
||||
Results: map[string]*tsdb.QueryResult{},
|
||||
}
|
||||
|
||||
tlsConfig, err := dsInfo.GetTLSConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := &client.DefaultClient{
|
||||
Address: dsInfo.Url,
|
||||
Username: dsInfo.BasicAuthUser,
|
||||
Password: dsInfo.DecryptedBasicAuthPassword(),
|
||||
TLSConfig: config.TLSConfig{
|
||||
InsecureSkipVerify: tlsConfig.InsecureSkipVerify,
|
||||
},
|
||||
}
|
||||
|
||||
queries, err := parseQuery(dsInfo, tsdbQuery.Queries, tsdbQuery)
|
||||
|
||||
Reference in New Issue
Block a user