v1alpha1

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the vpn v1alpha1 API group +kubebuilder:object:generate=true +groupName=vpn.plural.sh

Index

Constants

View Source
const (
	// WireguardPeerReadyCondition reports on current status of the Equinix Metal device. Ready indicates the instance is in a Running state.
	WireguardPeerReadyCondition crhelperTypes.ConditionType = "WireguardPeerReady"

	// WireguardServerNotExistReason used when the Wireguard server of the peer does not exist.
	WireguardServerNotExistReason = "WireguardServerNotExist"

	// WireguardServerNotReadyReason used when the Wireguard server of the peer is not ready.
	WireguardServerNotReadyReason = "WireguardServerNotReady"

	// WaitingForConfigReason used when peer doesn't have a configuration set yet.
	WaitingForConfigReason = "WaitingForConfig"

	// FailedToGetPrivateKeyReason used when the private key can't be found when generating the config secret.
	FailedToGetPrivateKeyReason = "FailedToGetPrivateKey"
)
View Source
const (
	// WireguardServerReadyCondition reports on current status of the Wireguard Server. Ready indicates the instance is in a Running state.
	WireguardServerReadyCondition crhelperTypes.ConditionType = "WireguardServerReady"

	// FailedToCreateServiceReason used when the service could not be created.
	FailedToCreateServiceReason = "FailedToCreateService"

	// FailedToCreateMetricsServiceReason used when the service could not be created.
	FailedToCreateMetricsServiceReason = "FailedToCreateMetricsService"

	// FailedToCreateSecretReason used when the secret could not be created.
	FailedToCreateSecretReason = "FailedToCreateSecret"

	// FailedToCreateConfigMapReason used when the configmap could not be created.
	FailedToCreateConfigMapReason = "FailedToCreateConfigMap"

	// FailedToCreateDeploymentReason used when the configmap could not be created.
	FailedToCreateDeploymentReason = "FailedToCreateDeployment"

	// ServiceNotReadyReason used when service does not yet have a valid IP or hostname
	ServiceNotReadyReason = "ServiceNotReady"

	// InvalidCIDRReason used when the CIDR of the network is invalid
	InvalidCIDRReason = "InvalidCIDR"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "vpn.plural.sh", 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
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is group version used to register these objects.

Functions

func Resource added in v0.5.3

func Resource(resource string) schema.GroupResource

Types

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 Status

type Status struct {
}

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

type WireguardPeer

type WireguardPeer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WireguardPeerSpec   `json:"spec,omitempty"`
	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.

func (*WireguardPeer) GetConditions

func (ws *WireguardPeer) GetConditions() crhelperTypes.Conditions

GetConditions returns the list of conditions for a WireGuardServer API object.

func (*WireguardPeer) SetConditions

func (ws *WireguardPeer) SetConditions(conditions crhelperTypes.Conditions)

SetConditions will set the given conditions on a WireGuardServer 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 {

	// the name of the active wireguard instance
	//+kubebuilder:validation:Required
	//+kubebuilder:validation:MinLength=1
	WireguardRef string `json:"wireguardRef"`

	// the IP address of the wireguard peer
	Address string `json:"address,omitempty"`

	// the public key of the wireguard peer
	PublicKey string `json:"publicKey,omitempty"`

	// reference to the secret and key containing the private key of the wireguard peer
	PrivateKeyRef corev1.SecretKeySelector `json:"PrivateKeyRef,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 {
	// The configuration of the wireguard peer without the private key
	Config string `json:"config,omitempty"`

	// Reference to the secret containing the configuration of the wireguard peer
	ConfigRef corev1.SecretKeySelector `json:"configRef,omitempty"`

	// Ready is true when the provider resource is ready.
	// +optional
	Ready bool `json:"ready"`

	// Conditions defines current service state of the PacketMachine.
	// +optional
	Conditions crhelperTypes.Conditions `json:"conditions,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 WireguardServer

type WireguardServer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WireguardServerSpec   `json:"spec,omitempty"`
	Status WireguardServerStatus `json:"status,omitempty"`
}

WireguardServer is the Schema for the wireguardservers API

func (*WireguardServer) DeepCopy

func (in *WireguardServer) DeepCopy() *WireguardServer

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

func (*WireguardServer) DeepCopyInto

func (in *WireguardServer) DeepCopyInto(out *WireguardServer)

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

func (*WireguardServer) DeepCopyObject

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

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

func (*WireguardServer) GetConditions

func (ws *WireguardServer) GetConditions() crhelperTypes.Conditions

GetConditions returns the list of conditions for a WireGuardServer API object.

func (*WireguardServer) SetConditions

func (ws *WireguardServer) SetConditions(conditions crhelperTypes.Conditions)

SetConditions will set the given conditions on a WireGuardServer object.

type WireguardServerList

type WireguardServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []WireguardServer `json:"items"`
}

WireguardServerList contains a list of WireguardServer

func (*WireguardServerList) DeepCopy

func (in *WireguardServerList) DeepCopy() *WireguardServerList

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

func (*WireguardServerList) DeepCopyInto

func (in *WireguardServerList) DeepCopyInto(out *WireguardServerList)

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

func (*WireguardServerList) DeepCopyObject

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

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

type WireguardServerSpec

type WireguardServerSpec struct {
	// Network MTU to use for the VPN
	Mtu string `json:"mtu,omitempty"`

	// +optional
	// Port for the wireguard server
	Port *int32 `json:"port,omitempty"`

	// Service type to use for the VPN
	ServiceType corev1.ServiceType `json:"serviceType,omitempty"`

	// +optional
	// ServiceAnnotations for wireguard k8s service
	ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"`

	// WireguardImage for wireguard k8s deployment
	WireguardImage string `json:"wireguardImage"`

	// +optional
	// Sidecars for wireguard k8s deployment
	Sidecars []corev1.Container `json:"sidecars,omitempty"`

	// +optional
	// +kubebuilder:default:="10.8.0.1/24"
	// The CIDR to use for the wireguard server and network
	NetworkCIDR string `json:"networkCIDR,omitempty"`

	// +optional
	// The DNS servers to use for the wireguard server
	DNS []string `json:"dns,omitempty"`

	// The CIDRs that peers can connect to through the wireguard server. Use 0.0.0.0/0 to allow all.
	AllowedIPs []string `json:"allowedIPs,omitempty"`

	// +optional
	// +kubebuilder:default:=false
	// Deploy 3 wireguard servers so that the VPN can be highly available and spread over 3 availability zones
	EnableHA bool `json:"enableHA,omitempty"`

	// +optional
	// The resources to set for the wireguard server
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

WireguardServerSpec defines the desired state of WireguardServer

func (*WireguardServerSpec) DeepCopy

func (in *WireguardServerSpec) DeepCopy() *WireguardServerSpec

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

func (*WireguardServerSpec) DeepCopyInto

func (in *WireguardServerSpec) DeepCopyInto(out *WireguardServerSpec)

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

type WireguardServerStatus

type WireguardServerStatus struct {
	Hostname string `json:"hostname,omitempty"`
	Port     string `json:"port,omitempty"`

	// Ready is true when the provider resource is ready.
	// +optional
	Ready bool `json:"ready"`

	// Conditions defines current service state of the PacketMachine.
	// +optional
	Conditions crhelperTypes.Conditions `json:"conditions,omitempty"`
}

WireguardServerStatus defines the observed state of Wireguard

func (*WireguardServerStatus) DeepCopy

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

func (*WireguardServerStatus) DeepCopyInto

func (in *WireguardServerStatus) DeepCopyInto(out *WireguardServerStatus)

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

Jump to

Keyboard shortcuts

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