Skip to content

Commit

Permalink
Fixed metallb#2173
Browse files Browse the repository at this point in the history
  • Loading branch information
shimritproj committed Dec 11, 2023
1 parent aeddcdd commit 7248649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/config/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ func (v *validator) Validate(resources ...client.ObjectList) error {
clusterResources.Nodes = append(clusterResources.Nodes, list.Items...)
}
}
clusterResources = Resetfields(clusterResources)
clusterResources = resetfields(clusterResources)
_, err := For(clusterResources, v.validate)
if errors.As(err, &TransientError{}) { // we do not want to make assumption on ordering in webhooks.
return nil
}
return err
}

func Resetfields(clusterResources ClusterResources) (ClusterResources){
func resetfields(clusterResources ClusterResources) (ClusterResources){
for i := range (clusterResources.Peers) {
clusterResources.Peers[i].Spec.BFDProfile = ""
clusterResources.Peers[i].Spec.PasswordSecret.Name = ""
Expand Down

0 comments on commit 7248649

Please sign in to comment.