Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the vpn v1alpha1 API group +kubebuilder:object:generate=true +groupName=vpn.example.com
Index ¶
- Constants
- Variables
- type EgressNetworkPolicies
- type EgressNetworkPolicy
- type EgressNetworkPolicyAction
- type EgressNetworkPolicyProtocol
- type EgressNetworkPolicyTo
- type PrivateKey
- type Speed
- type Status
- type WgStatusReport
- type Wireguard
- type WireguardList
- type WireguardPeer
- type WireguardPeerList
- type WireguardPeerSpec
- type WireguardPeerStatus
- type WireguardSpec
- type WireguardStatus
Constants ¶
const ( Pending string = "pending" Error = "error" Ready = "ready" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "vpn.example.com", Version: "v1alpha1"} // 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 ¶
This section is empty.
Types ¶
type EgressNetworkPolicies ¶
type EgressNetworkPolicies []EgressNetworkPolicy
func (EgressNetworkPolicies) DeepCopy ¶
func (in EgressNetworkPolicies) DeepCopy() EgressNetworkPolicies
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicies.
func (EgressNetworkPolicies) DeepCopyInto ¶
func (in EgressNetworkPolicies) DeepCopyInto(out *EgressNetworkPolicies)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EgressNetworkPolicy ¶
type EgressNetworkPolicy struct { // Specifies the action to take when outgoing traffic from a Wireguard peer matches the policy. This could be 'Accept' or 'Reject'. Action EgressNetworkPolicyAction `json:"action,omitempty"` // A struct that specifies the destination address and port for the traffic. This could include IP addresses or hostnames, as well as specific port numbers or port ranges. To EgressNetworkPolicyTo `json:"to,omitempty"` // Specifies the protocol to match for this policy. This could be TCP, UDP, or ICMP. Protocol EgressNetworkPolicyProtocol `json:"protocol,omitempty"` }
func (*EgressNetworkPolicy) DeepCopy ¶
func (in *EgressNetworkPolicy) DeepCopy() *EgressNetworkPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicy.
func (*EgressNetworkPolicy) DeepCopyInto ¶
func (in *EgressNetworkPolicy) DeepCopyInto(out *EgressNetworkPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EgressNetworkPolicyAction ¶
type EgressNetworkPolicyAction string
+kubebuilder:validation:Enum=ACCEPT;REJECT;Accept;Reject
const ( EgressNetworkPolicyActionAccept EgressNetworkPolicyAction = "Accept" EgressNetworkPolicyActionDeny EgressNetworkPolicyAction = "Reject" )
type EgressNetworkPolicyProtocol ¶
type EgressNetworkPolicyProtocol string
+kubebuilder:validation:Enum=TCP;UDP;ICMP
const ( EgressNetworkPolicyProtocolTCP EgressNetworkPolicyProtocol = "TCP" EgressNetworkPolicyProtocolUDP EgressNetworkPolicyProtocol = "UDP" )
type EgressNetworkPolicyTo ¶
type EgressNetworkPolicyTo struct { // A string field that specifies the destination IP address for traffic that matches the policy. Ip string `json:"ip,omitempty"` // An integer field that specifies the destination port number for traffic that matches the policy. Port int32 `json:"port,omitempty" protobuf:"varint,3,opt,name=port"` }
func (*EgressNetworkPolicyTo) DeepCopy ¶
func (in *EgressNetworkPolicyTo) DeepCopy() *EgressNetworkPolicyTo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicyTo.
func (*EgressNetworkPolicyTo) DeepCopyInto ¶
func (in *EgressNetworkPolicyTo) DeepCopyInto(out *EgressNetworkPolicyTo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrivateKey ¶
type PrivateKey struct {
SecretKeyRef corev1.SecretKeySelector `json:"secretKeyRef"`
}
func (*PrivateKey) DeepCopy ¶
func (in *PrivateKey) DeepCopy() *PrivateKey
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateKey.
func (*PrivateKey) DeepCopyInto ¶
func (in *PrivateKey) DeepCopyInto(out *PrivateKey)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Speed ¶
type Speed struct { Value int `json:"config,omitempty"` // +kubebuilder:validation:Enum=mbps;kbps Unit string `json:"unit,omitempty"` }
func (*Speed) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Speed.
func (*Speed) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Status ¶
type Status struct { }
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WgStatusReport ¶
type WgStatusReport struct { // A string field that represents the current status of Wireguard. This could include values like ready, pending, or error. Status string `json:"status,omitempty"` // A string field that provides additional information about the status of Wireguard. This could include error messages or other information that helps to diagnose issues with the wg instance. Message string `json:"message,omitempty"` }
func (*WgStatusReport) DeepCopy ¶
func (in *WgStatusReport) DeepCopy() *WgStatusReport
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WgStatusReport.
func (*WgStatusReport) DeepCopyInto ¶
func (in *WgStatusReport) DeepCopyInto(out *WgStatusReport)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Wireguard ¶
type Wireguard struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WireguardSpec `json:"spec,omitempty"` Status WireguardStatus `json:"status,omitempty"` }
Wireguard is the Schema for the wireguards API
func (*Wireguard) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Wireguard.
func (*Wireguard) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Wireguard) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WireguardList ¶
type WireguardList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Wireguard `json:"items"` }
WireguardList contains a list of Wireguard
func (*WireguardList) DeepCopy ¶
func (in *WireguardList) DeepCopy() *WireguardList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardList.
func (*WireguardList) DeepCopyInto ¶
func (in *WireguardList) DeepCopyInto(out *WireguardList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WireguardList) DeepCopyObject ¶
func (in *WireguardList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WireguardPeer ¶
type WireguardPeer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // The desired state of the peer. Spec WireguardPeerSpec `json:"spec,omitempty"` // A field that defines the observed state of the Wireguard peer. This includes fields like the current configuration and status of the peer. Status WireguardPeerStatus `json:"status,omitempty"` }
WireguardPeer is the Schema for the wireguardpeers API
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.
func (*WireguardPeer) DeepCopyObject ¶
func (in *WireguardPeer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WireguardPeerList ¶
type WireguardPeerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []WireguardPeer `json:"items"` }
WireguardPeerList contains a list of WireguardPeer
func (*WireguardPeerList) DeepCopy ¶
func (in *WireguardPeerList) DeepCopy() *WireguardPeerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardPeerList.
func (*WireguardPeerList) DeepCopyInto ¶
func (in *WireguardPeerList) DeepCopyInto(out *WireguardPeerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WireguardPeerList) DeepCopyObject ¶
func (in *WireguardPeerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WireguardPeerSpec ¶
type WireguardPeerSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // The address of the peer. Address string `json:"address,omitempty"` // Set to true to temporarily disable the peer. Disabled bool `json:"disabled,omitempty"` // The DNS configuration for the peer. Dns string `json:"dns,omitempty"` // The private key of the peer PrivateKey PrivateKey `json:"PrivateKeyRef,omitempty"` // The key used by the peer to authenticate with the wg server. PublicKey string `json:"publicKey,omitempty"` // The name of the Wireguard instance in k8s that the peer belongs to. The wg instance should be in the same namespace as the peer. //+kubebuilder:validation:Required //+kubebuilder:validation:MinLength=1 WireguardRef string `json:"wireguardRef"` // Egress network policies for the peer. EgressNetworkPolicies EgressNetworkPolicies `json:"egressNetworkPolicies,omitempty"` DownloadSpeed Speed `json:"downloadSpeed,omitempty"` UploadSpeed Speed `json:"uploadSpeed,omitempty"` }
WireguardPeerSpec defines the desired state of WireguardPeer
func (*WireguardPeerSpec) DeepCopy ¶
func (in *WireguardPeerSpec) DeepCopy() *WireguardPeerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardPeerSpec.
func (*WireguardPeerSpec) DeepCopyInto ¶
func (in *WireguardPeerSpec) DeepCopyInto(out *WireguardPeerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WireguardPeerStatus ¶
type WireguardPeerStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file // A string field that contains the current configuration for the Wireguard peer. Config string `json:"config,omitempty"` // A string field that represents the current status of the Wireguard peer. This could include values like ready, pending, or error. Status string `json:"status,omitempty"` // A string field that provides additional information about the status of the Wireguard peer. This could include error messages or other information that helps to diagnose issues with the peer. Message string `json:"message,omitempty"` }
WireguardPeerStatus defines the observed state of WireguardPeer
func (*WireguardPeerStatus) DeepCopy ¶
func (in *WireguardPeerStatus) DeepCopy() *WireguardPeerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardPeerStatus.
func (*WireguardPeerStatus) DeepCopyInto ¶
func (in *WireguardPeerStatus) DeepCopyInto(out *WireguardPeerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WireguardSpec ¶
type WireguardSpec struct { // A string field that specifies the maximum transmission unit (MTU) size for Wireguard packets for all peers. Mtu string `json:"mtu,omitempty"` // A string field that specifies the address for the Wireguard VPN server. This is the public IP address or hostname that peers will use to connect to the VPN. Address string `json:"address,omitempty"` // A string field that specifies the DNS server(s) to be used by the peers. Dns string `json:"dns,omitempty"` // A field that specifies the type of Kubernetes service that should be used for the Wireguard VPN. This could be NodePort or LoadBalancer, depending on the needs of the deployment. ServiceType corev1.ServiceType `json:"serviceType,omitempty"` // A map of key value strings for service annotations ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` // A boolean field that specifies whether IP forwarding should be enabled on the Wireguard VPN pod at startup. This can be useful to enable if the peers are having problems with sending traffic to the internet. EnableIpForwardOnPodInit bool `json:"enableIpForwardOnPodInit,omitempty"` }
WireguardSpec defines the desired state of Wireguard
func (*WireguardSpec) DeepCopy ¶
func (in *WireguardSpec) DeepCopy() *WireguardSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardSpec.
func (*WireguardSpec) DeepCopyInto ¶
func (in *WireguardSpec) DeepCopyInto(out *WireguardSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WireguardStatus ¶
type WireguardStatus struct { // A string field that specifies the address for the Wireguard VPN server that is currently being used. Address string `json:"address,omitempty"` Dns string `json:"dns,omitempty"` // A string field that specifies the port for the Wireguard VPN server that is currently being used. Port string `json:"port,omitempty"` // A string field that represents the current status of Wireguard. This could include values like ready, pending, or error. Status string `json:"status,omitempty"` // A string field that provides additional information about the status of Wireguard. This could include error messages or other information that helps to diagnose issues with the wg instance. Message string `json:"message,omitempty"` }
WireguardStatus defines the observed state of Wireguard
func (*WireguardStatus) DeepCopy ¶
func (in *WireguardStatus) DeepCopy() *WireguardStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WireguardStatus.
func (*WireguardStatus) DeepCopyInto ¶
func (in *WireguardStatus) DeepCopyInto(out *WireguardStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.