-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): support custom TLS config
The following patch adjusts the podMonitor and serviceMonitor resource. The static configuration `tlsConfig` is replaced so that the TLS configuration can be configured individually by the user. The option `insecureSkipVerify: true` has been removed as it is a security risk. Users also have the option of redefining the `insecureSkipVerify` property directly via `tlsConfig` if necessary. With regard to the previous rbac auth option, however, this is superfluous. Furthermore, the schema, i.e. HTTP or HTTPS, can now be defined to tell Prometheus which protocol should be used for communication. The following sample configuration specifies that the x509-certificate-exporter encrypts requests via HTTPS and the HTTP client must authenticate itself via HTTPS (client auth). ```yaml prometheusServiceMonitor: tlsConfig: caFile: /etc/prometheus/tls/ca/ca.crt certFile: /etc/prometheus/tls/app2app/tls.crt keyFile: /etc/prometheus/tls/app2app/tls.key insecureSkipVerify: false serverName: prometheus-x509-certificate-exporter prometheusPodMonitor: tlsConfig: caFile: /etc/prometheus/tls/ca/ca.crt certFile: /etc/prometheus/tls/app2app/tls.crt keyFile: /etc/prometheus/tls/app2app/tls.key insecureSkipVerify: false serverName: prometheus-x509-certificate-exporter ``` Important Note: The `serverName` attribute must correspond to the CommonName or a Subject Alternative Name (SAN) of the TLS certificate. If this is not the case, prometheus will reject the connection trying to match the IP address of the pod with the CommonName / SAN. The client certificate and private key as well as the certificate of the certificate authorithy must be mounted additionally via the `extraVolumes` and `extraVolumeMounts` option. This configuration is not standard and must also be implemented by the user if TLS client authentication is required. Signed-off-by: Markus Pesch <[email protected]>
- Loading branch information
1 parent
b203438
commit 6bb2140
Showing
4 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters