Skip to content

Commit 0bc0ffd

Browse files
committed
remove reconcile annotation on reconciliation
1 parent b5f1fd4 commit 0bc0ffd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/dns/provider/state_entry.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/gardener/external-dns-management/pkg/dns"
1818
perrs "github.com/gardener/external-dns-management/pkg/dns/provider/errors"
1919
dnsutils "github.com/gardener/external-dns-management/pkg/dns/utils"
20+
"github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
2021
"k8s.io/utils/ptr"
2122
)
2223

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

254+
if object.GetAnnotations()[constants.GardenerOperation] == constants.GardenerOperationReconcile {
255+
_, err := object.Modify(func(data resources.ObjectData) (bool, error) {
256+
annotations := data.GetAnnotations()
257+
delete(annotations, constants.GardenerOperation)
258+
return true, nil
259+
})
260+
if err != nil {
261+
return reconcile.Delay(logger, err)
262+
}
263+
}
264+
253265
if ignored, annotation := ignoredByAnnotation(object); ignored {
254266
var err error
255267
if !object.IsDeleting() {

0 commit comments

Comments
 (0)