diff --git a/test/util/k8sreporter/reporter.go b/test/util/k8sreporter/reporter.go index caf7b2414..24c4b0819 100644 --- a/test/util/k8sreporter/reporter.go +++ b/test/util/k8sreporter/reporter.go @@ -12,6 +12,7 @@ import ( "github.com/k8snetworkplumbingwg/sriov-network-operator/test/util/namespaces" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + rbacv1 "k8s.io/api/rbac/v1" ) func New(reportPath string) (*kniK8sReporter.KubernetesReporter, error) { @@ -25,6 +26,12 @@ func New(reportPath string) (*kniK8sReporter.KubernetesReporter, error) { if err != nil { return err } + + err = rbacv1.AddToScheme(s) + if err != nil { + return err + } + return nil } @@ -58,6 +65,8 @@ func New(reportPath string) (*kniK8sReporter.KubernetesReporter, error) { {Cr: &sriovv1.SriovOperatorConfigList{}}, {Cr: &monitoringv1.ServiceMonitorList{}, Namespace: &operatorNamespace}, {Cr: &monitoringv1.PrometheusRuleList{}, Namespace: &operatorNamespace}, + {Cr: &rbacv1.RoleList{}, Namespace: &operatorNamespace}, + {Cr: &rbacv1.RoleBindingList{}, Namespace: &operatorNamespace}, } err := os.Mkdir(reportPath, 0755)