v1alpha1

package
v0.0.0-...-f021cd2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=kilo.squat.ai

Index

Constants

View Source
const (
	// Version is the version of this API.
	Version = "v1alpha1"
	// PeerKind is the API kind for the peer resource.
	PeerKind = "Peer"
	// PeerPlural is the plural name for the peer resource.
	PeerPlural = "peers"
)
View Source
const GroupName = "kilo.squat.ai"

GroupName is the group name used in this package.

Variables

View Source
var (
	// SchemeBuilder exposes an API scheme builder for this API version.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme exposes an AddToScheme func for this API version.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// PeerGVK is the GroupVersionKind for Peers.
	PeerGVK = schema.GroupVersionKind{Group: GroupName, Version: Version, Kind: PeerKind}
)
View Source
var PeerName = PeerPlural + "." + GroupName

PeerName is the peer resource's FQDN.

View Source
var PeerShortNames = []string{"peer"}

PeerShortNames are convenient shortnames for the peer resource.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is the group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type DNSOrIP

type DNSOrIP struct {
	// DNS must be a valid RFC 1123 subdomain.
	// +optional
	DNS string `json:"dns,omitempty"`
	// IP must be a valid IP address.
	// +optional
	IP string `json:"ip,omitempty"`
}

DNSOrIP represents either a DNS name or an IP address. When both are given, the IP address, as it is more specific, override the DNS name.

func (*DNSOrIP) DeepCopy

func (in *DNSOrIP) DeepCopy() *DNSOrIP

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

func (*DNSOrIP) DeepCopyInto

func (in *DNSOrIP) DeepCopyInto(out *DNSOrIP)

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

type Peer

type Peer struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object’s metadata. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the desired behavior of the Kilo Peer. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
	Spec PeerSpec `json:"spec"`
}

Peer is a WireGuard peer that should have access to the VPN.

func (*Peer) AsOwner

func (p *Peer) AsOwner() metav1.OwnerReference

AsOwner creates a new owner reference for the peer to apply to dependent resource.

func (*Peer) Copy

func (p *Peer) Copy() *Peer

Copy creates a deep copy of the peer.

func (*Peer) DeepCopy

func (in *Peer) DeepCopy() *Peer

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

func (*Peer) DeepCopyInto

func (in *Peer) DeepCopyInto(out *Peer)

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

func (*Peer) DeepCopyObject

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

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

func (*Peer) Validate

func (p *Peer) Validate() error

Validate ensures that all the fields of a peer's spec are valid.

type PeerEndpoint

type PeerEndpoint struct {
	// DNSOrIP is a DNS name or an IP address.
	DNSOrIP `json:"dnsOrIP"`
	// Port must be a valid port number.
	Port uint32 `json:"port"`
}

PeerEndpoint represents a WireGuard endpoint, which is an IP:port tuple.

func (*PeerEndpoint) DeepCopy

func (in *PeerEndpoint) DeepCopy() *PeerEndpoint

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

func (*PeerEndpoint) DeepCopyInto

func (in *PeerEndpoint) DeepCopyInto(out *PeerEndpoint)

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

type PeerList

type PeerList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of peers.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
	Items []Peer `json:"items"`
}

PeerList is a list of peers.

func (*PeerList) DeepCopy

func (in *PeerList) DeepCopy() *PeerList

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

func (*PeerList) DeepCopyInto

func (in *PeerList) DeepCopyInto(out *PeerList)

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

func (*PeerList) DeepCopyObject

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

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

type PeerSpec

type PeerSpec struct {
	// AllowedIPs is the list of IP addresses that are allowed
	// for the given peer's tunnel.
	AllowedIPs []string `json:"allowedIPs"`
	// Endpoint is the initial endpoint for connections to the peer.
	// +optional
	Endpoint *PeerEndpoint `json:"endpoint,omitempty"`
	// PersistentKeepalive is the interval in seconds of the emission
	// of keepalive packets by the peer. This defaults to 0, which
	// disables the feature.
	// +optional
	PersistentKeepalive int `json:"persistentKeepalive,omitempty"`
	// PresharedKey is the optional symmetric encryption key for the peer.
	// +optional
	PresharedKey string `json:"presharedKey,omitempty"`
	// PublicKey is the WireGuard public key for the peer.
	PublicKey string `json:"publicKey"`
}

PeerSpec is the description and configuration of a peer. +k8s:openapi-gen=true

func (*PeerSpec) DeepCopy

func (in *PeerSpec) DeepCopy() *PeerSpec

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

func (*PeerSpec) DeepCopyInto

func (in *PeerSpec) DeepCopyInto(out *PeerSpec)

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