Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(email): support custom TLS certificates #1528

Merged
merged 1 commit into from
Sep 19, 2018
Merged

feat(email): support custom TLS certificates #1528

merged 1 commit into from
Sep 19, 2018

Conversation

miton18
Copy link

@miton18 miton18 commented Aug 24, 2018

No description provided.

@miton18
Copy link
Author

miton18 commented Aug 24, 2018

#823

@brian-brazil
Copy link
Contributor

Please use the existing TLSConfig from common rather than doing things by hand.

@miton18
Copy link
Author

miton18 commented Aug 24, 2018

@brian-brazil from common ?

@brian-brazil
Copy link
Contributor

Yes, that's the one.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has already been solved for the other notifiers via the common package (See comment).

I think this should be modelled similar to #1222.

@miton18 what are your thoughts? Let me know if I can be of any help.

@@ -163,6 +163,9 @@ type EmailConfig struct {
HTML string `yaml:"html,omitempty" json:"html,omitempty"`
Text string `yaml:"text,omitempty" json:"text,omitempty"`
RequireTLS *bool `yaml:"require_tls,omitempty" json:"require_tls,omitempty"`
TLSCA string `yaml:"tls_ca,omitempty" json:"tls_ca,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of injecting these into the EmailConfig struct, I think @brian-brazil was referring to use TLSConfig from the common package.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just understand, you want I use the TLSConfig struct instead of 3 strings in EmailConfig

but server name will be redundant

https://github.com/prometheus/alertmanager/blob/master/vendor/github.com/prometheus/common/config/http_config.go#L300

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why server_name would be redundant, the DNS name you're using may not match the tls cert the server itself knows about.

@miton18
Copy link
Author

miton18 commented Aug 30, 2018

Better ?

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

notify/impl.go Outdated Show resolved Hide resolved
notify/impl.go Outdated Show resolved Hide resolved
Signed-off-by: miton18 <remi+github@collignon-ducret.fr>
@miton18
Copy link
Author

miton18 commented Sep 17, 2018

Is it OK for you ?

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bearing with us @miton18!

@mxinden mxinden merged commit a74f94c into prometheus:master Sep 19, 2018
@miton18
Copy link
Author

miton18 commented Sep 19, 2018

Thx !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants