Skip to content

Commit e08d457

Browse files
author
OpenShift Bot
authored
Merge pull request #11586 from danwinship/annotation-cleanup
Merged by openshift-bot
2 parents f65c963 + 0126891 commit e08d457

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/sdn/plugin/pod_linux.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"strings"
1010
"syscall"
1111

12+
sdnapi "github.com/openshift/origin/pkg/sdn/api"
1213
"github.com/openshift/origin/pkg/sdn/plugin/cniserver"
1314

1415
"github.com/golang/glog"
@@ -35,8 +36,6 @@ const (
3536
tearDownCmd = "teardown"
3637
updateCmd = "update"
3738

38-
AssignMacvlanAnnotation string = "pod.network.openshift.io/assign-macvlan"
39-
4039
podInterfaceName = knetwork.DefaultInterfaceName
4140
)
4241

@@ -71,12 +70,12 @@ func wantsMacvlan(pod *kapi.Pod) (bool, error) {
7170
}
7271
}
7372

74-
val, ok := pod.Annotations[AssignMacvlanAnnotation]
73+
val, ok := pod.Annotations[sdnapi.AssignMacvlanAnnotation]
7574
if !ok || val != "true" {
7675
return false, nil
7776
}
7877
if !privileged {
79-
return false, fmt.Errorf("pod has %q annotation but is not privileged", AssignMacvlanAnnotation)
78+
return false, fmt.Errorf("pod has %q annotation but is not privileged", sdnapi.AssignMacvlanAnnotation)
8079
}
8180

8281
return true, nil

0 commit comments

Comments
 (0)