diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 1b905312f..1f130f1f8 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -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 }