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 ( ExposeTypePublicIP = "PublicIP" ExposeTypeLoadBalancer = "LoadBalancer" )
const ( Proxy = "proxy" Tunnel = "tunnel" DefaultProxyServerSecurePort = 10263 DefaultProxyServerInsecurePort = 10264 DefaultProxyServerExposedPort = 10262 DefaultTunnelServerExposedPort = 4500 )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "raven.openyurt.io", Version: "v1beta1"} 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 )
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"` // Type is the service type of the node, proxy or tunnel Type string `json:"type"` // Port is the exposed port of the node Port int `json:"port,omitempty"` // UnderNAT indicates whether node is under NAT UnderNAT bool `json:"underNAT,omitempty"` // NATType is the NAT type of the node NATType string `json:"natType,omitempty"` // PublicIP is the exposed IP of the node PublicIP string `json:"publicIP,omitempty"` // PublicPort is the port used for NAT traversal PublicPort int `json:"publicPort,omitempty"` // Config is a map to record config for the raven agent of node Config map[string]string `json:"config,omitempty"` }
Endpoint stores all essential data for establishing the VPN tunnel and Proxy
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 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) 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"` // ProxyConfig determine the l7 proxy configuration ProxyConfig ProxyConfiguration `json:"proxyConfig,omitempty"` // TunnelConfig determine the l3 tunnel configuration TunnelConfig TunnelConfiguration `json:"tunnelConfig,omitempty"` // Endpoints are a list of available Endpoint. Endpoints []Endpoint `json:"endpoints,omitempty"` // ExposeType determines how the Gateway is exposed. ExposeType string `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"` // ActiveEndpoints is the reference of the active endpoint. ActiveEndpoints []*Endpoint `json:"activeEndpoints,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 is the Node host name. NodeName string `json:"nodeName"` // PrivateIP is the node private ip address PrivateIP string `json:"privateIP"` // Subnets is the pod ip range of the node 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.
type ProxyConfiguration ¶
type ProxyConfiguration struct { // Replicas is the number of gateway active endpoints that enabled proxy Replicas int `json:"Replicas"` // ProxyHTTPPort is the proxy http port of the cross-domain request ProxyHTTPPort string `json:"proxyHTTPPort,omitempty"` // ProxyHTTPSPort is the proxy https port of the cross-domain request ProxyHTTPSPort string `json:"proxyHTTPSPort,omitempty"` }
ProxyConfiguration is the configuration for raven l7 proxy
func (*ProxyConfiguration) DeepCopy ¶
func (in *ProxyConfiguration) DeepCopy() *ProxyConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfiguration.
func (*ProxyConfiguration) DeepCopyInto ¶
func (in *ProxyConfiguration) DeepCopyInto(out *ProxyConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TunnelConfiguration ¶
type TunnelConfiguration struct { // Replicas is the number of gateway active endpoints that enabled tunnel Replicas int `json:"Replicas"` }
TunnelConfiguration is the configuration for raven l3 tunnel
func (*TunnelConfiguration) DeepCopy ¶
func (in *TunnelConfiguration) DeepCopy() *TunnelConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TunnelConfiguration.
func (*TunnelConfiguration) DeepCopyInto ¶
func (in *TunnelConfiguration) DeepCopyInto(out *TunnelConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.