Skip to content

Commit

Permalink
RUN-20245 Status updater topology configmap race fix (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshaibi authored Jul 17, 2024
1 parent bf6abc2 commit 031a001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
replicas: 1
template:
metadata:
annotations:
checksum/topology: {{ include (print $.Template.BasePath "/topology-cm.yml") . | sha256sum }}
labels:
app: status-updater
component: status-updater
Expand Down
3 changes: 2 additions & 1 deletion internal/status-updater/handlers/node/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand Down Expand Up @@ -34,7 +35,7 @@ func (p *NodeHandler) unlabelNode(node *v1.Node) error {
dcgmExporterLabelKey: nil,
devicePluginLabelKey: nil,
})
if err != nil {
if err != nil && !errors.IsNotFound(err) {
return fmt.Errorf("failed to unlabel node %s: %w", node.Name, err)
}

Expand Down

0 comments on commit 031a001

Please sign in to comment.