api

package
v0.0.0-...-d3d374b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api is the internal version of the API.

Index

Constants

View Source
const (
	// Maximum VXLAN Virtual Network Identifier(VNID) as per RFC#7348
	MaxVNID = uint32((1 << 24) - 1)
	// VNID: 1 to 9 are internally reserved for any special cases in the future
	MinVNID = uint32(10)
	// VNID: 0 reserved for default namespace and can reach any network in the cluster
	GlobalVNID = uint32(0)

	// ChangePodNetworkAnnotation is an annotation on NetNamespace to request change of pod network
	ChangePodNetworkAnnotation string = "pod.network.openshift.io/multitenant.change-network"

	// Acceptable values for ChangePodNetworkAnnotation
	GlobalPodNetwork  PodNetworkAction = "global"
	JoinPodNetwork    PodNetworkAction = "join"
	IsolatePodNetwork PodNetworkAction = "isolate"
)
View Source
const (
	SingleTenantPluginName = "redhat/openshift-ovs-subnet"
	MultiTenantPluginName  = "redhat/openshift-ovs-multitenant"

	IngressBandwidthAnnotation = "kubernetes.io/ingress-bandwidth"
	EgressBandwidthAnnotation  = "kubernetes.io/egress-bandwidth"
	AssignMacvlanAnnotation    = "pod.network.openshift.io/assign-macvlan"
	AssignHostSubnetAnnotation = "pod.network.openshift.io/assign-subnet"
	FixedVnidHost              = "pod.network.openshift.io/fixed-vnid-host"
)
View Source
const (
	ClusterNetworkDefault       = "default"
	EgressNetworkPolicyMaxRules = 50
)
View Source
const FutureGroupName = "networking.openshift.io"
View Source
const GroupName = ""

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	ErrorPodNetworkAnnotationNotFound = fmt.Errorf("ChangePodNetworkAnnotation not found")
)
View Source
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func ClusterNetworkToSelectableFields

func ClusterNetworkToSelectableFields(network *ClusterNetwork) fields.Set

ClusterNetworkToSelectableFields returns a label set that represents the object

func DeepCopy_api_ClusterNetwork

func DeepCopy_api_ClusterNetwork(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_ClusterNetworkList

func DeepCopy_api_ClusterNetworkList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_EgressNetworkPolicy

func DeepCopy_api_EgressNetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_EgressNetworkPolicyList

func DeepCopy_api_EgressNetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_EgressNetworkPolicyPeer

func DeepCopy_api_EgressNetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_EgressNetworkPolicyRule

func DeepCopy_api_EgressNetworkPolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_EgressNetworkPolicySpec

func DeepCopy_api_EgressNetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_HostSubnet

func DeepCopy_api_HostSubnet(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_HostSubnetList

func DeepCopy_api_HostSubnetList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_NetNamespace

func DeepCopy_api_NetNamespace(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_NetNamespaceList

func DeepCopy_api_NetNamespaceList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeleteChangePodNetworkAnnotation

func DeleteChangePodNetworkAnnotation(netns *NetNamespace)

DeleteChangePodNetworkAnnotation removes network change intent from NetNamespace

func EgressNetworkPolicyToSelectableFields

func EgressNetworkPolicyToSelectableFields(obj *EgressNetworkPolicy) fields.Set

EgressNetworkPolicyToSelectableFields returns a label set that represents the object

func HostSubnetToSelectableFields

func HostSubnetToSelectableFields(obj *HostSubnet) fields.Set

HostSubnetToSelectableFields returns a label set that represents the object

func IsOpenShiftMultitenantNetworkPlugin

func IsOpenShiftMultitenantNetworkPlugin(pluginName string) bool

func IsOpenShiftNetworkPlugin

func IsOpenShiftNetworkPlugin(pluginName string) bool

func Kind

func Kind(kind string) unversioned.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func NetNamespaceToSelectableFields

func NetNamespaceToSelectableFields(obj *NetNamespace) fields.Set

NetNamespaceToSelectableFields returns a label set that represents the object

func RegisterDeepCopies

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

func Resource

func Resource(resource string) unversioned.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

func SetChangePodNetworkAnnotation

func SetChangePodNetworkAnnotation(netns *NetNamespace, action PodNetworkAction, params string)

SetChangePodNetworkAnnotation sets network change intent on NetNamespace

func ValidVNID

func ValidVNID(vnid uint32) error

Check if the given vnid is valid or not

Types

type ClusterNetwork

type ClusterNetwork struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	Network          string
	HostSubnetLength uint32
	ServiceNetwork   string
	PluginName       string
}

func (*ClusterNetwork) GetObjectKind

func (obj *ClusterNetwork) GetObjectKind() unversioned.ObjectKind

type ClusterNetworkList

type ClusterNetworkList struct {
	unversioned.TypeMeta
	unversioned.ListMeta
	Items []ClusterNetwork
}

func (*ClusterNetworkList) GetObjectKind

func (obj *ClusterNetworkList) GetObjectKind() unversioned.ObjectKind

type EgressNetworkPolicy

type EgressNetworkPolicy struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	Spec EgressNetworkPolicySpec
}

EgressNetworkPolicy describes the current egress network policy

func (*EgressNetworkPolicy) GetObjectKind

func (obj *EgressNetworkPolicy) GetObjectKind() unversioned.ObjectKind

type EgressNetworkPolicyList

type EgressNetworkPolicyList struct {
	unversioned.TypeMeta
	unversioned.ListMeta
	Items []EgressNetworkPolicy
}

EgressNetworkPolicyList is a collection of EgressNetworkPolicy

func (*EgressNetworkPolicyList) GetObjectKind

func (obj *EgressNetworkPolicyList) GetObjectKind() unversioned.ObjectKind

type EgressNetworkPolicyPeer

type EgressNetworkPolicyPeer struct {
	CIDRSelector string
}

EgressNetworkPolicyPeer specifies a target to apply egress policy to

type EgressNetworkPolicyRule

type EgressNetworkPolicyRule struct {
	Type EgressNetworkPolicyRuleType
	To   EgressNetworkPolicyPeer
}

EgressNetworkPolicyRule contains a single egress network policy rule

type EgressNetworkPolicyRuleType

type EgressNetworkPolicyRuleType string

EgressNetworkPolicyRuleType gives the type of an EgressNetworkPolicyRule

const (
	EgressNetworkPolicyRuleAllow EgressNetworkPolicyRuleType = "Allow"
	EgressNetworkPolicyRuleDeny  EgressNetworkPolicyRuleType = "Deny"
)

type EgressNetworkPolicySpec

type EgressNetworkPolicySpec struct {
	Egress []EgressNetworkPolicyRule
}

EgressNetworkPolicySpec provides a list of policies on outgoing traffic

type HostSubnet

type HostSubnet struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// host may just be an IP address, resolvable hostname or a complete DNS
	Host   string
	HostIP string
	Subnet string
}

HostSubnet encapsulates the inputs needed to define the container subnet network on a node

func (*HostSubnet) GetObjectKind

func (obj *HostSubnet) GetObjectKind() unversioned.ObjectKind

type HostSubnetList

type HostSubnetList struct {
	unversioned.TypeMeta
	unversioned.ListMeta
	Items []HostSubnet
}

HostSubnetList is a collection of HostSubnets

func (*HostSubnetList) GetObjectKind

func (obj *HostSubnetList) GetObjectKind() unversioned.ObjectKind

type NetNamespace

type NetNamespace struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	NetName string
	NetID   uint32
}

NetNamespace holds the network id against its name

func (*NetNamespace) GetObjectKind

func (obj *NetNamespace) GetObjectKind() unversioned.ObjectKind

type NetNamespaceList

type NetNamespaceList struct {
	unversioned.TypeMeta
	unversioned.ListMeta
	Items []NetNamespace
}

NetNamespaceList is a collection of NetNamespaces

func (*NetNamespaceList) GetObjectKind

func (obj *NetNamespaceList) GetObjectKind() unversioned.ObjectKind

type PodNetworkAction

type PodNetworkAction string

func GetChangePodNetworkAnnotation

func GetChangePodNetworkAnnotation(netns *NetNamespace) (PodNetworkAction, string, error)

GetChangePodNetworkAnnotation fetches network change intent from NetNamespace

Directories

Path Synopsis
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL