Remove same email requirement for certresolvers

This commit is contained in:
Emrio 2024-08-29 11:36:05 +02:00 committed by GitHub
parent 8dc9607db7
commit 6b3167d03e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -314,7 +314,6 @@ func (c *Configuration) initACMEProvider() {
// ValidateConfiguration validate that configuration is coherent. // ValidateConfiguration validate that configuration is coherent.
func (c *Configuration) ValidateConfiguration() error { func (c *Configuration) ValidateConfiguration() error {
var acmeEmail string
for name, resolver := range c.CertificatesResolvers { for name, resolver := range c.CertificatesResolvers {
if resolver.ACME != nil && resolver.Tailscale != nil { if resolver.ACME != nil && resolver.Tailscale != nil {
return fmt.Errorf("unable to initialize certificates resolver %q, as ACME and Tailscale providers are mutually exclusive", name) return fmt.Errorf("unable to initialize certificates resolver %q, as ACME and Tailscale providers are mutually exclusive", name)
@ -327,11 +326,6 @@ func (c *Configuration) ValidateConfiguration() error {
if len(resolver.ACME.Storage) == 0 { if len(resolver.ACME.Storage) == 0 {
return fmt.Errorf("unable to initialize certificates resolver %q with no storage location for the certificates", name) return fmt.Errorf("unable to initialize certificates resolver %q with no storage location for the certificates", name)
} }
if acmeEmail != "" && resolver.ACME.Email != acmeEmail {
return fmt.Errorf("unable to initialize certificates resolver %q, as all ACME resolvers must use the same email", name)
}
acmeEmail = resolver.ACME.Email
} }
if c.Core != nil { if c.Core != nil {