Documentation ¶
Index ¶
Constants ¶
const ( // EventActiveEndpointElected is the event indicating a new active endpoint is elected. EventActiveEndpointElected = "ActiveEndpointElected" // EventActiveEndpointLost is the event indicating the active endpoint is lost. EventActiveEndpointLost = "ActiveEndpointLost" )
Event reason.
const (
ExposeTypeLoadBalancer = "LoadBalancer"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "raven.openyurt.io", Version: "v1alpha1"} SchemeGroupVersion = GroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ServiceNamespacedName = types.NamespacedName{
Namespace: "kube-system",
Name: "raven-agent-service",
}
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
func SetDefaultsGateway ¶
func SetDefaultsGateway(obj *Gateway)
SetDefaultsGateway set default values for Gateway.
Types ¶
type Endpoint ¶
type Endpoint struct { // NodeName is the Node hosting this endpoint. NodeName string `json:"nodeName"` UnderNAT bool `json:"underNAT,omitempty"` NATType string `json:"natType,omitempty"` PublicIP string `json:"publicIP,omitempty"` PublicPort int `json:"publicPort,omitempty"` Config map[string]string `json:"config,omitempty"` }
Endpoint stores all essential data for establishing the VPN tunnel. TODO add priority field?
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExposeType ¶
type ExposeType string
type Gateway ¶
type Gateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GatewaySpec `json:"spec,omitempty"` Status GatewayStatus `json:"status,omitempty"` }
Gateway is the Schema for the gateways API
func (*Gateway) ConvertFrom ¶ added in v1.4.0
func (dst *Gateway) ConvertFrom(srcRaw conversion.Hub) error
func (*Gateway) ConvertTo ¶ added in v1.4.0
func (src *Gateway) ConvertTo(dstRaw conversion.Hub) error
func (*Gateway) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway.
func (*Gateway) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Gateway) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GatewayList ¶
type GatewayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Gateway `json:"items"` }
GatewayList contains a list of Gateway
func (*GatewayList) DeepCopy ¶
func (in *GatewayList) DeepCopy() *GatewayList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayList.
func (*GatewayList) DeepCopyInto ¶
func (in *GatewayList) DeepCopyInto(out *GatewayList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayList) DeepCopyObject ¶
func (in *GatewayList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GatewaySpec ¶
type GatewaySpec struct { // NodeSelector is a label query over nodes that managed by the gateway. // The nodes in the same gateway should share same layer 3 network. NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` // TODO add a field to configure using vxlan or host-gw for inner gateway communication? // Endpoints is a list of available Endpoint. Endpoints []Endpoint `json:"endpoints"` // ExposeType determines how the Gateway is exposed. ExposeType ExposeType `json:"exposeType,omitempty"` }
GatewaySpec defines the desired state of Gateway
func (*GatewaySpec) DeepCopy ¶
func (in *GatewaySpec) DeepCopy() *GatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewaySpec.
func (*GatewaySpec) DeepCopyInto ¶
func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayStatus ¶
type GatewayStatus struct { // Nodes contains all information of nodes managed by Gateway. Nodes []NodeInfo `json:"nodes,omitempty"` // ActiveEndpoint is the reference of the active endpoint. ActiveEndpoint *Endpoint `json:"activeEndpoint,omitempty"` }
GatewayStatus defines the observed state of Gateway
func (*GatewayStatus) DeepCopy ¶
func (in *GatewayStatus) DeepCopy() *GatewayStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayStatus.
func (*GatewayStatus) DeepCopyInto ¶
func (in *GatewayStatus) DeepCopyInto(out *GatewayStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeInfo ¶
type NodeInfo struct { NodeName string `json:"nodeName"` PrivateIP string `json:"privateIP"` Subnets []string `json:"subnets"` }
NodeInfo stores information of node managed by Gateway.
func (*NodeInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo.
func (*NodeInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.