Skip to content

Commit

Permalink
controller/node: skip update vlanconfig with witness node
Browse files Browse the repository at this point in the history
    - we did not apply any vlanconfig on the witness node,
      so we need to skip the vlanconfig update when witness
      node change.

Signed-off-by: Vicente Cheng <[email protected]>
(cherry picked from commit 9ca1501)
  • Loading branch information
Vicente-Cheng committed Aug 9, 2024
1 parent 1e949e2 commit 2d8063b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/manager/node/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ func (h Handler) OnChange(_ string, node *corev1.Node) (*corev1.Node, error) {
return nil, err
}

// skip witness node because we do not allow vlan config on witness node
if node.Labels != nil && node.Labels[utils.HarvesterWitnessNodeLabelKey] == "true" {
return nil, nil
}

vcs, err := h.vcCache.List(labels.Everything())
if err != nil {
return nil, err
Expand Down

0 comments on commit 2d8063b

Please sign in to comment.