Documentation ¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type ConditionType
- type IP
- type IPList
- type IPSpec
- type Subnet
- type SubnetCondition
- type SubnetList
- type SubnetSpec
- type SubnetStatus
- func (ss *SubnetStatus) Bytes() ([]byte, error)
- func (m *SubnetStatus) ClearAllConditions()
- func (m *SubnetStatus) ClearCondition(ctype ConditionType, reason, message string)
- func (m *SubnetStatus) ClearError()
- func (m *SubnetStatus) ConditionReason(ctype ConditionType) string
- func (in *SubnetStatus) DeepCopy() *SubnetStatus
- func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus)
- func (m *SubnetStatus) EnsureCondition(ctype ConditionType)
- func (m *SubnetStatus) EnsureStandardConditions()
- func (m *SubnetStatus) GetCondition(ctype ConditionType) *SubnetCondition
- func (m *SubnetStatus) IsConditionTrue(ctype ConditionType) bool
- func (m *SubnetStatus) IsNotReady() bool
- func (m *SubnetStatus) IsReady() bool
- func (m *SubnetStatus) NotReady(reason, message string)
- func (m *SubnetStatus) NotValidated(reason, message string)
- func (m *SubnetStatus) Ready(reason, message string)
- func (m *SubnetStatus) RemoveAllConditions()
- func (m *SubnetStatus) RemoveCondition(ctype ConditionType)
- func (m *SubnetStatus) SetCondition(ctype ConditionType, reason, message string)
- func (m *SubnetStatus) SetError(reason, message string)
- func (m *SubnetStatus) Validated(reason, message string)
Constants ¶
const ( ProtocolIPv4 = "IPv4" ProtocolIPv6 = "IPv6" PrtotcolDual = "Dual" GWDistributedType = "distributed" GWCentralizedType = "centralized" )
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 ¶
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 )
var SchemeGroupVersion = schema.GroupVersion{Group: kubeovn.GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IP.
func (*IP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IP) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPList.
func (*IPList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IPList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPSpec.
func (*IPSpec) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet.
func (*Subnet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Subnet) DeepCopyObject ¶
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