Skip to content

Commit

Permalink
Merge pull request kubevirt#8602 from acardace/fix-psa-errors
Browse files Browse the repository at this point in the history
tests: ignore transient PSA warning events
  • Loading branch information
kubevirt-bot authored Oct 14, 2022
2 parents 88b9fb2 + 7f4e9ab commit 2156620
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,11 @@ func waitForVMIPhase(ctx context.Context, phases []v1.VirtualMachineInstancePhas

objectEventWatcher := watcher.New(vmi).SinceWatchedObjectResourceVersion().Timeout(time.Duration(seconds+2) * time.Second)
if wp.FailOnWarnings == true {
// let's ignore PSA events as kubernetes internally uses a namespace informer
// that might not be up to date after virt-controller relabeled the namespace
// to use a 'privileged' policy
// TODO: remove this when KubeVirt will be able to run VMs under the 'restricted' level
wp.WarningsIgnoreList = append(wp.WarningsIgnoreList, "violates PodSecurity")
objectEventWatcher.SetWarningsPolicy(wp)
}

Expand Down

0 comments on commit 2156620

Please sign in to comment.