Skip to content

Commit

Permalink
Add flag to enable verification of the remote tiller certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
thrucker committed May 13, 2019
1 parent e669681 commit 080c8cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var (
tillerTLSEnable = flag.Bool("tiller-tls-enable", false, "enable TLS communication with tiller (default false)")
tillerTLSKey = flag.String("tiller-tls-key", "/etc/helm-exporter/tls.key", "path to private key file used to communicate with tiller")
tillerTLSCert = flag.String("tiller-tls-cert", "/etc/helm-exporter/tls.crt", "path to certificate key file used to communicate with tiller")
tillerTLSVerify = flag.Bool("tiller-tls-verify", false, "enable verification of the remote tiller certificate (default false)")

statusCodes = []release.Status_Code{
release.Status_UNKNOWN,
Expand All @@ -61,7 +62,7 @@ func newHelmClient(tillerEndpoint string) (*helm.Client, error) {
tlsopts := tlsutil.Options{
KeyFile: *tillerTLSKey,
CertFile: *tillerTLSCert,
InsecureSkipVerify: true,
InsecureSkipVerify: !(*tillerTLSVerify),
}
tlscfg, err := tlsutil.ClientConfig(tlsopts)
if err != nil {
Expand Down

0 comments on commit 080c8cf

Please sign in to comment.