v1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolIPv4 = "IPv4"
	ProtocolIPv6 = "IPv6"
	PrtotcolDual = "Dual"

	GWDistributedType = "distributed"
	GWCentralizedType = "centralized"
)
View Source
const (
	// Ready => controller considers this resource Ready
	Ready = "Ready"
	// Validated => Spec passed validating
	Validated = "Validated"
	// Error => last recorded error
	Error = "Error"

	ReasonInit = "Init"
)

Constants for condition

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: kubeovn.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ConditionType added in v0.7.0

type ConditionType string

ConditionType encodes information on the condition

type IP

type IP struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec IPSpec `json:"spec"`
}

func (*IP) DeepCopy

func (in *IP) DeepCopy() *IP

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IP.

func (*IP) DeepCopyInto

func (in *IP) DeepCopyInto(out *IP)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IP) DeepCopyObject

func (in *IP) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPList

type IPList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []IP `json:"items"`
}

func (*IPList) DeepCopy

func (in *IPList) DeepCopy() *IPList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPList.

func (*IPList) DeepCopyInto

func (in *IPList) DeepCopyInto(out *IPList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IPList) DeepCopyObject

func (in *IPList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPSpec

type IPSpec struct {
	PodName     string `json:"podName"`
	Namespace   string `json:"namespace"`
	Subnet      string `json:"subnet"`
	NodeName    string `json:"nodeName"`
	IPAddress   string `json:"ipAddress"`
	MacAddress  string `json:"macAddress"`
	ContainerID string `json:"containerID"`
}

func (*IPSpec) DeepCopy

func (in *IPSpec) DeepCopy() *IPSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPSpec.

func (*IPSpec) DeepCopyInto

func (in *IPSpec) DeepCopyInto(out *IPSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Subnet

type Subnet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SubnetSpec   `json:"spec"`
	Status SubnetStatus `json:"status,omitempty"`
}

func (*Subnet) DeepCopy

func (in *Subnet) DeepCopy() *Subnet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet.

func (*Subnet) DeepCopyInto

func (in *Subnet) DeepCopyInto(out *Subnet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Subnet) DeepCopyObject

func (in *Subnet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubnetCondition added in v0.7.0

type SubnetCondition struct {
	// Type of condition.
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
	// Last time the condition was probed
	// +optional
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

Condition describes the state of an object at a certain point. +k8s:deepcopy-gen=true

func (*SubnetCondition) DeepCopy added in v0.7.0

func (in *SubnetCondition) DeepCopy() *SubnetCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetCondition.

func (*SubnetCondition) DeepCopyInto added in v0.7.0

func (in *SubnetCondition) DeepCopyInto(out *SubnetCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubnetList

type SubnetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Subnet `json:"items"`
}

func (*SubnetList) DeepCopy

func (in *SubnetList) DeepCopy() *SubnetList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetList.

func (*SubnetList) DeepCopyInto

func (in *SubnetList) DeepCopyInto(out *SubnetList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubnetList) DeepCopyObject

func (in *SubnetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubnetSpec

type SubnetSpec struct {
	Default    bool     `json:"default"`
	Protocol   string   `json:"protocol"`
	Namespaces []string `json:"namespaces,omitempty"`
	CIDRBlock  string   `json:"cidrBlock"`
	Gateway    string   `json:"gateway"`
	ExcludeIps []string `json:"excludeIps,omitempty"`

	GatewayType string `json:"gatewayType"`
	GatewayNode string `json:"gatewayNode"`
	NatOutgoing bool   `json:"natOutgoing"`

	Private      bool     `json:"private"`
	AllowSubnets []string `json:"allowSubnets,omitempty"`
}

func (*SubnetSpec) DeepCopy

func (in *SubnetSpec) DeepCopy() *SubnetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec.

func (*SubnetSpec) DeepCopyInto

func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubnetStatus added in v0.7.0

type SubnetStatus struct {
	// Conditions represents the latest state of the object
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []SubnetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`

	AvailableIPs    uint64 `json:"availableIPs"`
	UsingIPs        uint64 `json:"usingIPs"`
	ActivateGateway string `json:"activateGateway"`
}

func (*SubnetStatus) Bytes added in v0.7.0

func (ss *SubnetStatus) Bytes() ([]byte, error)

func (*SubnetStatus) ClearAllConditions added in v0.7.0

func (m *SubnetStatus) ClearAllConditions()

ClearAllConditions updates or creates a new condition

func (*SubnetStatus) ClearCondition added in v0.7.0

func (m *SubnetStatus) ClearCondition(ctype ConditionType, reason, message string)

ClearCondition updates or creates a new condition

func (*SubnetStatus) ClearError added in v0.7.0

func (m *SubnetStatus) ClearError()

ClearError - shortcut to set error condition

func (*SubnetStatus) ConditionReason added in v0.7.0

func (m *SubnetStatus) ConditionReason(ctype ConditionType) string

ConditionReason - return condition reason

func (*SubnetStatus) DeepCopy added in v0.7.0

func (in *SubnetStatus) DeepCopy() *SubnetStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetStatus.

func (*SubnetStatus) DeepCopyInto added in v0.7.0

func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubnetStatus) EnsureCondition added in v0.7.0

func (m *SubnetStatus) EnsureCondition(ctype ConditionType)

EnsureCondition useful for adding default conditions

func (*SubnetStatus) EnsureStandardConditions added in v0.7.0

func (m *SubnetStatus) EnsureStandardConditions()

EnsureStandardConditions - helper to inject standard conditions

func (*SubnetStatus) GetCondition added in v0.7.0

func (m *SubnetStatus) GetCondition(ctype ConditionType) *SubnetCondition

GetCondition get existing condition

func (*SubnetStatus) IsConditionTrue added in v0.7.0

func (m *SubnetStatus) IsConditionTrue(ctype ConditionType) bool

IsConditionTrue - if condition is true

func (*SubnetStatus) IsNotReady added in v0.7.0

func (m *SubnetStatus) IsNotReady() bool

IsNotReady returns true if ready condition is set

func (*SubnetStatus) IsReady added in v0.7.0

func (m *SubnetStatus) IsReady() bool

IsReady returns true if ready condition is set

func (*SubnetStatus) NotReady added in v0.7.0

func (m *SubnetStatus) NotReady(reason, message string)

NotReady - shortcut to set ready condition to false

func (*SubnetStatus) NotValidated added in v0.7.0

func (m *SubnetStatus) NotValidated(reason, message string)

NotValidated - shortcut to set validated condition to false

func (*SubnetStatus) Ready added in v0.7.0

func (m *SubnetStatus) Ready(reason, message string)

Ready - shortcut to set ready condition to true

func (*SubnetStatus) RemoveAllConditions added in v0.7.0

func (m *SubnetStatus) RemoveAllConditions()

RemoveAllConditions updates or creates a new condition

func (*SubnetStatus) RemoveCondition added in v0.7.0

func (m *SubnetStatus) RemoveCondition(ctype ConditionType)

RemoveCondition removes the condition with the provided type.

func (*SubnetStatus) SetCondition added in v0.7.0

func (m *SubnetStatus) SetCondition(ctype ConditionType, reason, message string)

SetCondition updates or creates a new condition

func (*SubnetStatus) SetError added in v0.7.0

func (m *SubnetStatus) SetError(reason, message string)

SetError - shortcut to set error condition

func (*SubnetStatus) Validated added in v0.7.0

func (m *SubnetStatus) Validated(reason, message string)

Validated - shortcut to set validated condition to true

Jump to

Keyboard shortcuts

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