mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
insecureSkipVerify for alertmanager connections
This commit is contained in:
parent
f141f162d0
commit
434aa8c468
5 changed files with 14 additions and 0 deletions
Documentation
example/prometheus-operator-crd
pkg
|
@ -65,6 +65,7 @@ AlertmanagerEndpoints defines a selection of a single Endpoints object containin
|
|||
| port | Port the Alertmanager API is exposed on. | intstr.IntOrString | true |
|
||||
| scheme | Scheme to use when firing alerts. | string | false |
|
||||
| pathPrefix | Prefix for the HTTP path alerts are pushed to. | string | false |
|
||||
| insecureSkipVerify | Disable target certificate validation. | bool | false |
|
||||
|
||||
[Back to TOC](#table-of-contents)
|
||||
|
||||
|
|
|
@ -544,6 +544,9 @@ spec:
|
|||
Endpoints object containing alertmanager IPs to fire alerts
|
||||
against.
|
||||
properties:
|
||||
insecureSkipVerify:
|
||||
description: Disable target certificate validation.
|
||||
type: boolean
|
||||
name:
|
||||
description: Name of Endpoints object in Namespace.
|
||||
type: string
|
||||
|
|
|
@ -128,6 +128,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
|||
Format: "",
|
||||
},
|
||||
},
|
||||
"insecureSkipVerify": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Disable target certificate validation.",
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"namespace", "name", "port"},
|
||||
},
|
||||
|
|
|
@ -269,6 +269,8 @@ type AlertmanagerEndpoints struct {
|
|||
Scheme string `json:"scheme,omitempty"`
|
||||
// Prefix for the HTTP path alerts are pushed to.
|
||||
PathPrefix string `json:"pathPrefix,omitempty"`
|
||||
// Disable target certificate validation.
|
||||
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceMonitor defines monitoring for a set of services.
|
||||
|
|
|
@ -475,6 +475,7 @@ func generateAlertmanagerConfig(version semver.Version, am v1.AlertmanagerEndpoi
|
|||
cfg := yaml.MapSlice{
|
||||
{Key: "path_prefix", Value: am.PathPrefix},
|
||||
{Key: "scheme", Value: am.Scheme},
|
||||
{Key: "tls_config", Value: yaml.MapSlice{{Key: "insecure_skip_verify", Value: am.InsecureSkipVerify}}},
|
||||
}
|
||||
|
||||
switch version.Major {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue