Skip to content

Commit

Permalink
Merge pull request #166 from ty-dc/pr/fix_multus
Browse files Browse the repository at this point in the history
fix: add multus crd to Scheme
  • Loading branch information
weizhoublue authored Jul 24, 2023
2 parents 537e62d + c22ab05 commit 2eee770
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"os"
"strconv"

nadv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apiextensions_v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down Expand Up @@ -185,6 +186,11 @@ func NewFramework(t TestingT, schemeRegisterList []func(*runtime.Scheme) error,
}
// f.Client, err = client.New(f.kConfig, client.Options{Scheme: scheme})

err = nadv1.AddToScheme(scheme)
if err != nil {
return nil, fmt.Errorf("failed to add network_attachment_definition_v1 Scheme")
}

for n, v := range schemeRegisterList {
if err := v(scheme); err != nil {
return nil, fmt.Errorf("failed to add schemeRegisterList[%v], reason=%v ", n, err)
Expand Down

0 comments on commit 2eee770

Please sign in to comment.