Merge pull request #1715 from dobesv/patch-1

Fix logic to select the solver that has the most labels
This commit is contained in:
jetstack-bot 2019-05-28 09:32:15 +01:00 committed by GitHub
commit 5908d2f181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -495,6 +495,7 @@ func determineSolverConfigToUse(candidates []cmapi.ACMEChallengeSolver, authz *a
if len(d.Selector.MatchLabels) > matchAllDomainsNumLabels || matchAll == nil {
matchAll = &d
matchAllToSolve = acmech
matchAllDomainsNumLabels = len(d.Selector.MatchLabels)
}
}
for _, dom := range d.Selector.DNSNames {
@ -504,6 +505,7 @@ func determineSolverConfigToUse(candidates []cmapi.ACMEChallengeSolver, authz *a
if len(d.Selector.MatchLabels) > numLabelsSpecificMatch || specificMatch == nil {
specificMatch = &d
specificMatchToSolve = acmech
numLabelsSpecificMatch = len(d.Selector.MatchLabels)
break
}
}