mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 05:47:27 -08:00
Hash YAML instead of JSON
But it doesn't work either because of secret fields. Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
8cc84660fa
commit
317e73de79
|
@ -17,12 +17,12 @@ import (
|
|||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/model"
|
||||
|
@ -174,7 +174,7 @@ func labelsToEqualityMatchers(ls model.LabelSet) []*labels.Matcher {
|
|||
|
||||
// Used for hashing configs and diff'ing hashes in ApplyConfig.
|
||||
func toHash(data interface{}) (string, error) {
|
||||
bytes, err := json.Marshal(data)
|
||||
bytes, err := yaml.Marshal(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue