vpn

package
v0.0.0-...-798ae07 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=vpn.morfic.io +groupGoName=vpn +genclient

Index

Constants

View Source
const GroupName = "vpn.morfic.io"

GroupName is the name of this API group.

Variables

View Source
var (
	// SchemeBuilder points to a list of functions added to Scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

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 a Group qualified GroupKind

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type IPSecTunnelConfig

type IPSecTunnelConfig struct {

	// DeviceName represents the name of the network link that will be created for ipsec.
	DeviceName string `json:"deviceName" yaml:"deviceName"`
}

IPSecTunnelConfig is configuration for establishing an IPSec tunnel with a remote host using the kernel's built-in IPSec functionality.

func (*IPSecTunnelConfig) DeepCopy

func (in *IPSecTunnelConfig) DeepCopy() *IPSecTunnelConfig

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

func (*IPSecTunnelConfig) DeepCopyInto

func (in *IPSecTunnelConfig) DeepCopyInto(out *IPSecTunnelConfig)

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

type L2TPTunnelConfig

type L2TPTunnelConfig struct {

	// DeviceName represents the name of the network link that will be created for l2tp.
	DeviceName string `json:"deviceName" yaml:"deviceName"`
}

L2TPTunnelConfig is configuration for establishing a L2TP tunnel connection with a remote peer. utilizes the kernel's built-in L2TP functionality.

func (*L2TPTunnelConfig) DeepCopy

func (in *L2TPTunnelConfig) DeepCopy() *L2TPTunnelConfig

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

func (*L2TPTunnelConfig) DeepCopyInto

func (in *L2TPTunnelConfig) DeepCopyInto(out *L2TPTunnelConfig)

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

type OpenVPNTunnelConfig

type OpenVPNTunnelConfig struct {
}

OpenVPNTunnelConfig is configuration for establishing an OpenVPN tunnel connection with a remote host. Requires that the OpneVPN service be configured and enabled on the host machine.

func (*OpenVPNTunnelConfig) DeepCopy

func (in *OpenVPNTunnelConfig) DeepCopy() *OpenVPNTunnelConfig

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

func (*OpenVPNTunnelConfig) DeepCopyInto

func (in *OpenVPNTunnelConfig) DeepCopyInto(out *OpenVPNTunnelConfig)

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

type VPNTunnel

type VPNTunnel struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`

	// Standard object metadata.
	// Utilizes the Kubernetes metadata object spec for now.
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec VPNTunnelSpec `json:"spec" yaml:"spec"`

	Status VPNTunnelStatus `json:"status" yaml:"status"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +k8s:deepcopy-gen=true +genclient:nonNamespaced +genclient VPNTunnel represents a tunnel to a remote endpoint with a vpn configuration.

func (*VPNTunnel) DeepCopy

func (in *VPNTunnel) DeepCopy() *VPNTunnel

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

func (*VPNTunnel) DeepCopyInto

func (in *VPNTunnel) DeepCopyInto(out *VPNTunnel)

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

func (*VPNTunnel) DeepCopyObject

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

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

type VPNTunnelList

type VPNTunnelList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`

	// +optional
	metav1.ListMeta

	// Items represents an array of VPN tunnels
	Items []VPNTunnel `json:"items" yaml:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +k8s:deepcopy-gen=true +genclient:nonNamespaced +genclient VPNTunnelList represents a list of VPN tunnels.

func (*VPNTunnelList) DeepCopy

func (in *VPNTunnelList) DeepCopy() *VPNTunnelList

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

func (*VPNTunnelList) DeepCopyInto

func (in *VPNTunnelList) DeepCopyInto(out *VPNTunnelList)

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

func (*VPNTunnelList) DeepCopyObject

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

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

type VPNTunnelSpec

type VPNTunnelSpec struct {

	// Wireguard is optional configuration for a wireguard tunnel that will be represented by this spec.
	//
	// +optional
	Wireguard WireguardTunnelConfig `json:"wireguard" yaml:"wireguard"`

	// OpenVPN is optional configuration for an OpenVPN tunnel that will be represented by this spec.
	// NOTE: Requires the openvpn service to be installed on the host and running.
	//
	// +optional
	OpenVPN OpenVPNTunnelConfig `json:"openvpn" yaml:"openvpn"`

	// L2TP is optional configuration for an L2TP tunnel that will be represented by this spec.
	//
	// +optional
	L2TP L2TPTunnelConfig `json:"l2tp" yaml:"l2tp"`

	// IPSEC is optional configuration for an IPSec tunnel that will be represented by this spec.
	//
	// +optional
	IPSEC IPSecTunnelConfig `json:"ipsec" yaml:"ipsec"`
}

VPNTunnelSpec represents the desired specification for a VPN tunnel to a remote host. Only one tunnel configuration should be specified per spec object. Otherwise a conflict will occur.

func (*VPNTunnelSpec) DeepCopy

func (in *VPNTunnelSpec) DeepCopy() *VPNTunnelSpec

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

func (*VPNTunnelSpec) DeepCopyInto

func (in *VPNTunnelSpec) DeepCopyInto(out *VPNTunnelSpec)

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

type VPNTunnelStatus

type VPNTunnelStatus struct {

	// IsUp denotes whether the tunnel has been established with the remote peer.
	IsUp bool `json:"up" yaml:"up"`

	// ReceiveBytes represents the number of bytes that have been received by this tunnel from a peer.
	ReceiveBytes int64 `json:"receiveBytes" yaml:"receiveBytes"`

	// SendBytes represents the number of bytes that have been sent through this tunnel to a peer.
	SendBytes int64 `json:"sendBytes" yaml:"sendBytes"`
}

VPNTunnelStatus represents the current status for a VPN tunnel to a remote host.

func (*VPNTunnelStatus) DeepCopy

func (in *VPNTunnelStatus) DeepCopy() *VPNTunnelStatus

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

func (*VPNTunnelStatus) DeepCopyInto

func (in *VPNTunnelStatus) DeepCopyInto(out *VPNTunnelStatus)

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

type WireguardPeer

type WireguardPeer struct {
}

WireguardPeer represents a peer that a wireguard tunnel device will attempt to peer with.

func (*WireguardPeer) DeepCopy

func (in *WireguardPeer) DeepCopy() *WireguardPeer

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

func (*WireguardPeer) DeepCopyInto

func (in *WireguardPeer) DeepCopyInto(out *WireguardPeer)

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

type WireguardTunnelConfig

type WireguardTunnelConfig struct {

	// DeviceName represents the name of the network link that will be created for wireguard.
	DeviceName string `json:"deviceName" yaml:"deviceName"`

	// ListenPort specifies the port that the device should listen on for incoming Wireguard connections.
	// The port will always be a UDP listen port that is initialized.
	ListenPort uint16 `json:"listenPort" yaml:"listenPort"`

	// KeyRef represents the local secret object that contains the public/private key
	// to be used by this tunnel for establishing secure connections with the remote peer.
	//
	// The controller will look for two k/v pairs within said secret:
	// - wg.privateKey : This should have as the value that represents the private key that should
	// be used for said link.
	// - wg.publicKey : This should have another string as the value that represents the corresponding
	// public key of the afformentioned private key.
	KeyRef *core.LocalObjectReference `json:"keyRef" yaml:"keyRef"`

	// Peers represents the array of peers that the wireguard will looks for
	// and accept incoming connections from/to.
	Peers []WireguardPeer `json:"peers" yaml:"peers"`
}

WireguardTunnelConfig is configuration for establishing a wireguard tunnel with a remote peer using the kernel's built-in wireguard kernel module.

func (*WireguardTunnelConfig) DeepCopy

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

func (*WireguardTunnelConfig) DeepCopyInto

func (in *WireguardTunnelConfig) DeepCopyInto(out *WireguardTunnelConfig)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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