Skip to content

Commit

Permalink
Merge pull request #506 from liornoy/use-namespace-const
Browse files Browse the repository at this point in the history
Use the OPERATOR_NAMESPACE var in the k8sreporter
  • Loading branch information
zeeke authored Sep 19, 2023
2 parents 08badf6 + 55de991 commit 2097c2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/util/k8sreporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ func New(reportPath string) (*kniK8sReporter.KubernetesReporter, error) {
return nil
}

operatorNamespace := os.Getenv("OPERATOR_NAMESPACE")
if operatorNamespace == "" {
operatorNamespace = "openshift-sriov-network-operator"
}

dumpNamespace := func(ns string) bool {
switch {
case ns == namespaces.Test:
return true
case ns == "openshift-sriov-network-operator":
case ns == operatorNamespace:
return true
case strings.HasPrefix(ns, "sriov-"):
return true
Expand Down

0 comments on commit 2097c2a

Please sign in to comment.