Skip to content

Commit e337e43

Browse files
committed
fix: add alertmanager client config to ruler template
1 parent b4d44f8 commit e337e43

File tree

6 files changed

+452
-4
lines changed

6 files changed

+452
-4
lines changed

operator/apis/loki/v1/rulerconfig_types.go

+7
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ type AlertManagerClientTLSConfig struct {
221221
// +kubebuilder:validation:Optional
222222
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key Path"
223223
KeyPath *string `json:"keyPath,omitempty"`
224+
225+
// Skip validating server certificate.
226+
//
227+
// +optional
228+
// +kubebuilder:validation:Optional
229+
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Skip validating server certificate"
230+
InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"`
224231
}
225232

226233
// RemoteWriteAuthType defines the type of authorization to use to access the remote write endpoint.

operator/apis/loki/v1/zz_generated.deepcopy.go

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/config/crd/bases/loki.grafana.com_rulerconfigs.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ spec:
8989
description: The client-side certificate file path for
9090
the TLS configuration.
9191
type: string
92+
insecureSkipVerify:
93+
description: Skip validating server certificate.
94+
type: boolean
9295
keyPath:
9396
description: The client-side key file path for the TLS
9497
configuration.
@@ -292,6 +295,9 @@ spec:
292295
description: The client-side certificate file path
293296
for the TLS configuration.
294297
type: string
298+
insecureSkipVerify:
299+
description: Skip validating server certificate.
300+
type: boolean
295301
keyPath:
296302
description: The client-side key file path for the
297303
TLS configuration.

operator/internal/manifests/config.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,11 @@ func alertManagerConfig(spec *lokiv1.AlertManagerSpec) *config.AlertManagerConfi
248248
conf.Notifier = &config.NotifierConfig{}
249249
if tls := clt.TLS; tls != nil {
250250
conf.Notifier.TLS = config.TLSConfig{
251-
CAPath: tls.CAPath,
252-
ServerName: tls.ServerName,
253-
CertPath: tls.CertPath,
254-
KeyPath: tls.KeyPath,
251+
CAPath: tls.CAPath,
252+
ServerName: tls.ServerName,
253+
InsecureSkipVerify: tls.InsecureSkipVerify,
254+
CertPath: tls.CertPath,
255+
KeyPath: tls.KeyPath,
255256
}
256257
}
257258

0 commit comments

Comments
 (0)