Merge pull request #1117 from munnerz/wildcard-challenge-check

Include wildcard field in comparison of challenge specs
This commit is contained in:
jetstack-bot 2018-11-29 11:26:17 +00:00 committed by GitHub
commit 8f37cf6c40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,10 +184,13 @@ func (c *Controller) Sync(ctx context.Context, o *cmapi.Order) (err error) {
// therefore, if there is a cache timing issue, the Create will fail as the
// challenge with that name will already exist.
specsToCreate := make(map[int]cmapi.ChallengeSpec)
// TODO: we could potentially parse the challenge's name to find the index
// expected here instead of iterating over both lists
for i, s := range o.Status.Challenges {
create := true
for _, ch := range existingChallenges {
if s.DNSName == ch.Spec.DNSName {
if s.Wildcard == ch.Spec.Wildcard &&
s.DNSName == ch.Spec.DNSName {
create = false
break
}