forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.go
38 lines (31 loc) · 1.17 KB
/
plugin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package api
import (
"strings"
)
const (
SingleTenantPluginName = "redhat/openshift-ovs-subnet"
MultiTenantPluginName = "redhat/openshift-ovs-multitenant"
NetworkPolicyPluginName = "redhat/openshift-ovs-networkpolicy"
// Pod annotations
IngressBandwidthAnnotation = "kubernetes.io/ingress-bandwidth"
EgressBandwidthAnnotation = "kubernetes.io/egress-bandwidth"
AssignMacvlanAnnotation = "pod.network.openshift.io/assign-macvlan"
// HostSubnet annotations. (Note: should be "hostsubnet.network.openshift.io/", but the incorrect name is now part of the API.)
AssignHostSubnetAnnotation = "pod.network.openshift.io/assign-subnet"
FixedVNIDHostAnnotation = "pod.network.openshift.io/fixed-vnid-host"
// NetNamespace annotations
MulticastEnabledAnnotation = "netnamespace.network.openshift.io/multicast-enabled"
)
func IsOpenShiftNetworkPlugin(pluginName string) bool {
switch strings.ToLower(pluginName) {
case SingleTenantPluginName, MultiTenantPluginName, NetworkPolicyPluginName:
return true
}
return false
}
func IsOpenShiftMultitenantNetworkPlugin(pluginName string) bool {
if strings.ToLower(pluginName) == MultiTenantPluginName {
return true
}
return false
}