Skip to content

Commit

Permalink
fix: add alertmanager client config to ruler template
Browse files Browse the repository at this point in the history
  • Loading branch information
aleert committed Jun 12, 2024
1 parent b4d44f8 commit e337e43
Show file tree
Hide file tree
Showing 6 changed files with 452 additions and 4 deletions.
7 changes: 7 additions & 0 deletions operator/apis/loki/v1/rulerconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ type AlertManagerClientTLSConfig struct {
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key Path"
KeyPath *string `json:"keyPath,omitempty"`

// Skip validating server certificate.
//
// +optional
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Skip validating server certificate"
InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"`
}

// RemoteWriteAuthType defines the type of authorization to use to access the remote write endpoint.
Expand Down
5 changes: 5 additions & 0 deletions operator/apis/loki/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions operator/config/crd/bases/loki.grafana.com_rulerconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
description: The client-side certificate file path for
the TLS configuration.
type: string
insecureSkipVerify:
description: Skip validating server certificate.
type: boolean
keyPath:
description: The client-side key file path for the TLS
configuration.
Expand Down Expand Up @@ -292,6 +295,9 @@ spec:
description: The client-side certificate file path
for the TLS configuration.
type: string
insecureSkipVerify:
description: Skip validating server certificate.
type: boolean
keyPath:
description: The client-side key file path for the
TLS configuration.
Expand Down
9 changes: 5 additions & 4 deletions operator/internal/manifests/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ func alertManagerConfig(spec *lokiv1.AlertManagerSpec) *config.AlertManagerConfi
conf.Notifier = &config.NotifierConfig{}
if tls := clt.TLS; tls != nil {
conf.Notifier.TLS = config.TLSConfig{
CAPath: tls.CAPath,
ServerName: tls.ServerName,
CertPath: tls.CertPath,
KeyPath: tls.KeyPath,
CAPath: tls.CAPath,
ServerName: tls.ServerName,
InsecureSkipVerify: tls.InsecureSkipVerify,
CertPath: tls.CertPath,
KeyPath: tls.KeyPath,
}
}

Expand Down
Loading

0 comments on commit e337e43

Please sign in to comment.