Skip to content

Commit

Permalink
remove reconcile annotation on reconciliation
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Dec 13, 2024
1 parent b5f1fd4 commit 0bc0ffd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/dns/provider/state_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/gardener/external-dns-management/pkg/dns"
perrs "github.com/gardener/external-dns-management/pkg/dns/provider/errors"
dnsutils "github.com/gardener/external-dns-management/pkg/dns/utils"
"github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
"k8s.io/utils/ptr"
)

Expand Down Expand Up @@ -250,6 +251,17 @@ func (this *state) HandleUpdateEntry(logger logger.LogContext, op string, object
defer old.lock.Unlock()
}

if object.GetAnnotations()[constants.GardenerOperation] == constants.GardenerOperationReconcile {
_, err := object.Modify(func(data resources.ObjectData) (bool, error) {
annotations := data.GetAnnotations()
delete(annotations, constants.GardenerOperation)
return true, nil
})
if err != nil {
return reconcile.Delay(logger, err)
}
}

if ignored, annotation := ignoredByAnnotation(object); ignored {
var err error
if !object.IsDeleting() {
Expand Down

0 comments on commit 0bc0ffd

Please sign in to comment.