Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=kilo.squat.ai
Index ¶
Constants ¶
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" )
const GroupName = "kilo.squat.ai"
GroupName is the group name used in this package.
Variables ¶
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 )
var ( // PeerGVK is the GroupVersionKind for Peers. PeerGVK = schema.GroupVersionKind{Group: GroupName, Version: Version, Kind: PeerKind} )
var PeerName = PeerPlural + "." + GroupName
PeerName is the peer resource's FQDN.
var PeerShortNames = []string{"peer"}
PeerShortNames are convenient shortnames for the peer resource.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSOrIP.
func (*DNSOrIP) DeepCopyInto ¶
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) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Peer.
func (*Peer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Peer) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PeerList.
func (*PeerList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PeerList) DeepCopyObject ¶
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"`
// +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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PeerSpec.
func (*PeerSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.