Skip to content

Commit

Permalink
Use the OPERATOR_NAMESPACE var in the k8sreporter
Browse files Browse the repository at this point in the history
This commit modifies the k8s reporter to fetch the namesapce
from the env var OPERATOR_NAMESPACE.

Signed-off-by: Lior Noy <[email protected]>
  • Loading branch information
liornoy committed Sep 19, 2023
1 parent 08badf6 commit 55de991
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 55de991

Please sign in to comment.