Skip to content

Commit 62ea862

Browse files
Replaced Authorization with SafeAuthorization
1 parent 038b8b0 commit 62ea862

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: pkg/manifests/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ type RemoteWriteSpec struct {
157157
// Bearer token for remote write.
158158
BearerTokenFile string `json:"bearerTokenFile,omitempty"`
159159
// Authorization section for remote write
160-
Authorization *monv1.Authorization `json:"authorization,omitempty"`
160+
Authorization *monv1.SafeAuthorization `json:"authorization,omitempty"`
161161
// TLS Config to use for remote write.
162162
TLSConfig *monv1.SafeTLSConfig `json:"tlsConfig,omitempty"`
163163
// Optional ProxyURL

Diff for: pkg/manifests/manifests.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -4226,7 +4226,6 @@ func addRemoteWriteConfigs(clusterID string, rw []monv1.RemoteWriteSpec, rwTarge
42264226
WriteRelabelConfigs: writeRelabelConfigs,
42274227
BasicAuth: target.BasicAuth,
42284228
BearerTokenFile: target.BearerTokenFile,
4229-
Authorization: target.Authorization,
42304229
ProxyURL: target.ProxyURL,
42314230
MetadataConfig: target.MetadataConfig,
42324231
}
@@ -4235,6 +4234,11 @@ func addRemoteWriteConfigs(clusterID string, rw []monv1.RemoteWriteSpec, rwTarge
42354234
SafeTLSConfig: *target.TLSConfig,
42364235
}
42374236
}
4237+
if target.Authorization != nil {
4238+
rwConf.Authorization = &monv1.Authorization{
4239+
SafeAuthorization: *target.Authorization,
4240+
}
4241+
}
42384242
rw = append(rw, rwConf)
42394243
}
42404244
return rw

0 commit comments

Comments
 (0)