Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the headscale v1beta1 API group. +kubebuilder:object:generate=true +groupName=headscale.infrado.cloud
Index ¶
- Variables
- type APIKeyConfig
- type DERPConfig
- type DERPServerConfig
- type DNSConfig
- type DNSExtraRecord
- type DNSNameserversConfig
- type DatabaseConfig
- type GormConfig
- type Headscale
- type HeadscaleConfig
- type HeadscaleList
- type HeadscalePreAuthKey
- type HeadscalePreAuthKeyList
- type HeadscalePreAuthKeySpec
- type HeadscalePreAuthKeyStatus
- type HeadscaleSpec
- type HeadscaleStatus
- type HeadscaleUser
- type HeadscaleUserList
- type HeadscaleUserSpec
- type HeadscaleUserStatus
- type LogConfig
- type LogTailConfig
- type NoiseConfig
- type OIDCConfig
- type PKCEConfig
- type PersistentVolumeClaimConfig
- type PolicyConfig
- type PostgresConfig
- type PrefixesConfig
- type SqliteConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "headscale.infrado.cloud", Version: "v1beta1"} // 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 APIKeyConfig ¶
type APIKeyConfig struct {
// AutoManage enables automatic API key creation and rotation
// +kubebuilder:default=true
// +optional
AutoManage *bool `json:"auto_manage,omitempty"`
// SecretName is the name of the Kubernetes secret to store the API key
// +kubebuilder:default="headscale-api-key"
// +optional
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
SecretName string `json:"secret_name,omitempty"`
// Expiration is the API key expiration duration in Go duration format (e.g., "2160h", "90d" is not valid, use "2160h" for 90 days)
// The API key will be rotated before it expires
// Examples: "720h" (30 days), "2160h" (90 days), "8760h" (365 days)
// +kubebuilder:validation:Pattern=`^([0-9]+(\.[0-9]+)?(s|m|h))+$`
// +kubebuilder:default="2160h"
// +optional
Expiration string `json:"expiration,omitempty"`
// RotationBuffer is the time before expiration to rotate the key in Go duration format (e.g., "168h" for 7 days)
// Key will be rotated when it has less than this time remaining
// Examples: "168h" (7 days), "1920h" (80 days)
// +kubebuilder:validation:Pattern=`^([0-9]+(\.[0-9]+)?(s|m|h))+$`
// +kubebuilder:default="1920h"
// +optional
RotationBuffer string `json:"rotation_buffer,omitempty"`
// ManagerImage is the container image to use for the API key manager sidecar
// +kubebuilder:default="ghcr.io/infradohq/headscale-operator/apikey-manager:latest"
// +optional
ManagerImage string `json:"manager_image,omitempty"`
}
APIKeyConfig represents API key management configuration
func (*APIKeyConfig) DeepCopy ¶
func (in *APIKeyConfig) DeepCopy() *APIKeyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIKeyConfig.
func (*APIKeyConfig) DeepCopyInto ¶
func (in *APIKeyConfig) DeepCopyInto(out *APIKeyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DERPConfig ¶
type DERPConfig struct {
// Server configuration for embedded DERP server
// +optional
Server DERPServerConfig `json:"server"`
// URLs is the list of external DERP map URLs
// +kubebuilder:default={"https://controlplane.tailscale.com/derpmap/default"}
// +optional
URLs []string `json:"urls,omitempty"`
// Paths is the list of local DERP map file paths
// +optional
Paths []string `json:"paths,omitempty"`
// AutoUpdateEnabled indicates whether to auto-update DERP maps
// +kubebuilder:default=true
// +optional
AutoUpdateEnabled *bool `json:"auto_update_enabled,omitempty"`
// UpdateFrequency is how often to check for DERP updates
// +kubebuilder:default="3h"
// +optional
UpdateFrequency string `json:"update_frequency,omitempty"`
}
DERPConfig represents DERP configuration
func (*DERPConfig) DeepCopy ¶
func (in *DERPConfig) DeepCopy() *DERPConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DERPConfig.
func (*DERPConfig) DeepCopyInto ¶
func (in *DERPConfig) DeepCopyInto(out *DERPConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DERPServerConfig ¶
type DERPServerConfig struct {
// Enabled indicates if the embedded DERP server is enabled
// +kubebuilder:default=false
// +optional
Enabled *bool `json:"enabled,omitempty"`
// RegionID is the region ID for the embedded DERP server
// +kubebuilder:default=999
// +optional
RegionID int `json:"region_id,omitempty"`
// RegionCode is the region code for display
// +kubebuilder:default="headscale"
// +optional
RegionCode string `json:"region_code,omitempty"`
// RegionName is the region name for display
// +kubebuilder:default="Headscale Embedded DERP"
// +optional
RegionName string `json:"region_name,omitempty"`
// VerifyClients indicates whether to verify clients
// +kubebuilder:default=true
// +optional
VerifyClients *bool `json:"verify_clients,omitempty"`
// STUNListenAddr is the address for STUN connections
// +kubebuilder:default="0.0.0.0:3478"
// +optional
STUNListenAddr string `json:"stun_listen_addr,omitempty"`
// PrivateKeyPath is the path to the DERP server private key
// +kubebuilder:default="/var/lib/headscale/derp_server_private.key"
// +optional
PrivateKeyPath string `json:"private_key_path,omitempty"`
// AutomaticallyAddEmbeddedDerpRegion indicates whether to automatically add the embedded DERP region
// +kubebuilder:default=true
// +optional
AutomaticallyAddEmbeddedDerpRegion *bool `json:"automatically_add_embedded_derp_region,omitempty"`
// IPv4 is the public IPv4 address
// +kubebuilder:default="198.51.100.1"
// +optional
IPv4 string `json:"ipv4,omitempty"`
// IPv6 is the public IPv6 address
// +kubebuilder:default="2001:db8::1"
// +optional
IPv6 string `json:"ipv6,omitempty"`
}
DERPServerConfig represents embedded DERP server configuration
func (*DERPServerConfig) DeepCopy ¶
func (in *DERPServerConfig) DeepCopy() *DERPServerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DERPServerConfig.
func (*DERPServerConfig) DeepCopyInto ¶
func (in *DERPServerConfig) DeepCopyInto(out *DERPServerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSConfig ¶
type DNSConfig struct {
// MagicDNS enables MagicDNS
// +kubebuilder:default=true
// +optional
MagicDNS *bool `json:"magic_dns,omitempty"`
// BaseDomain is the base domain for MagicDNS
// +optional
BaseDomain string `json:"base_domain,omitempty"`
// OverrideLocalDNS overrides local DNS settings
// +kubebuilder:default=true
// +optional
OverrideLocalDNS *bool `json:"override_local_dns,omitempty"`
// Nameservers configuration
// +optional
Nameservers DNSNameserversConfig `json:"nameservers"`
// SearchDomains is the list of search domains
// +optional
SearchDomains []string `json:"search_domains,omitempty"`
// ExtraRecords is the list of extra DNS records
// +optional
ExtraRecords []DNSExtraRecord `json:"extra_records,omitempty"`
}
DNSConfig represents DNS configuration
func (*DNSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig.
func (*DNSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSExtraRecord ¶
type DNSExtraRecord struct {
// Name is the DNS record name
// +optional
Name string `json:"name,omitempty"`
// Type is the DNS record type
// +kubebuilder:validation:Enum=A;AAAA
// +optional
Type string `json:"type,omitempty"`
// Value is the DNS record value
// +optional
Value string `json:"value,omitempty"`
}
DNSExtraRecord represents an extra DNS record
func (*DNSExtraRecord) DeepCopy ¶
func (in *DNSExtraRecord) DeepCopy() *DNSExtraRecord
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSExtraRecord.
func (*DNSExtraRecord) DeepCopyInto ¶
func (in *DNSExtraRecord) DeepCopyInto(out *DNSExtraRecord)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSNameserversConfig ¶
type DNSNameserversConfig struct {
// Global nameservers
// +kubebuilder:default={"1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001"}
// +optional
Global []string `json:"global,omitempty"`
// Split DNS configuration
// +optional
Split map[string][]string `json:"split,omitempty"`
}
DNSNameserversConfig represents DNS nameservers configuration
func (*DNSNameserversConfig) DeepCopy ¶
func (in *DNSNameserversConfig) DeepCopy() *DNSNameserversConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameserversConfig.
func (*DNSNameserversConfig) DeepCopyInto ¶
func (in *DNSNameserversConfig) DeepCopyInto(out *DNSNameserversConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseConfig ¶
type DatabaseConfig struct {
// Type is the database type
// +kubebuilder:validation:Enum=sqlite;postgres
// +kubebuilder:default="sqlite"
// +optional
Type string `json:"type,omitempty"`
// Debug enables debug mode
// +kubebuilder:default=false
// +optional
Debug *bool `json:"debug,omitempty"`
// Gorm configuration
// +optional
Gorm GormConfig `json:"gorm"`
// Sqlite configuration
// +optional
Sqlite SqliteConfig `json:"sqlite"`
// Postgres configuration
// +optional
Postgres PostgresConfig `json:"postgres"`
}
DatabaseConfig represents database configuration
func (*DatabaseConfig) DeepCopy ¶
func (in *DatabaseConfig) DeepCopy() *DatabaseConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConfig.
func (*DatabaseConfig) DeepCopyInto ¶
func (in *DatabaseConfig) DeepCopyInto(out *DatabaseConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GormConfig ¶
type GormConfig struct {
// PrepareStmt enables prepared statements
// +kubebuilder:default=true
// +optional
PrepareStmt *bool `json:"prepare_stmt,omitempty"`
// ParameterizedQueries enables parameterized queries
// +kubebuilder:default=true
// +optional
ParameterizedQueries *bool `json:"parameterized_queries,omitempty"`
// SkipErrRecordNotFound skips "record not found" errors
// +kubebuilder:default=true
// +optional
SkipErrRecordNotFound *bool `json:"skip_err_record_not_found,omitempty"`
// SlowThreshold is the threshold for slow queries in milliseconds
// +kubebuilder:default=1000
// +optional
SlowThreshold int `json:"slow_threshold,omitempty"`
}
GormConfig represents GORM configuration
func (*GormConfig) DeepCopy ¶
func (in *GormConfig) DeepCopy() *GormConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GormConfig.
func (*GormConfig) DeepCopyInto ¶
func (in *GormConfig) DeepCopyInto(out *GormConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Headscale ¶
type Headscale struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Headscale
// +required
Spec HeadscaleSpec `json:"spec"`
// status defines the observed state of Headscale
// +optional
Status HeadscaleStatus `json:"status,omitempty,omitzero"`
}
Headscale is the Schema for the headscales API
func (*Headscale) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Headscale.
func (*Headscale) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Headscale) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscaleConfig ¶
type HeadscaleConfig struct {
// ServerURL is the URL clients will connect to
// +required
ServerURL string `json:"server_url"`
// ListenAddr is the address to listen on
// +kubebuilder:default="0.0.0.0:8080"
// +optional
ListenAddr string `json:"listen_addr,omitempty"`
// MetricsListenAddr is the address for metrics
// +kubebuilder:default="0.0.0.0:9090"
// +optional
MetricsListenAddr string `json:"metrics_listen_addr,omitempty"`
// GRPCListenAddr is the address for gRPC
// +kubebuilder:default="0.0.0.0:50443"
// +optional
GRPCListenAddr string `json:"grpc_listen_addr,omitempty"`
// GRPCAllowInsecure allows insecure gRPC
// +kubebuilder:default=false
// +optional
GRPCAllowInsecure *bool `json:"grpc_allow_insecure,omitempty"`
// Noise configuration
// +optional
Noise NoiseConfig `json:"noise"`
// Prefixes configuration
// +optional
Prefixes PrefixesConfig `json:"prefixes"`
// DERP configuration
// +optional
DERP DERPConfig `json:"derp"`
// DisableCheckUpdates disables update checks
// +kubebuilder:default=false
// +optional
DisableCheckUpdates *bool `json:"disable_check_updates,omitempty"`
// EphemeralNodeInactivityTimeout is the timeout for ephemeral nodes
// +kubebuilder:default="30m"
// +optional
EphemeralNodeInactivityTimeout string `json:"ephemeral_node_inactivity_timeout,omitempty"`
// Database configuration
// +optional
Database DatabaseConfig `json:"database"`
// ACMEURL is the ACME directory URL
// +kubebuilder:default="https://acme-v02.api.letsencrypt.org/directory"
// +optional
ACMEURL string `json:"acme_url,omitempty"`
// ACMEEmail is the email for ACME registration
// +optional
ACMEEmail string `json:"acme_email,omitempty"`
// TLSLetsEncryptHostname is the hostname for Let's Encrypt
// +optional
TLSLetsEncryptHostname string `json:"tls_letsencrypt_hostname,omitempty"`
// TLSLetsEncryptCacheDir is the cache directory for Let's Encrypt
// +kubebuilder:default="/var/lib/headscale/cache"
// +optional
TLSLetsEncryptCacheDir string `json:"tls_letsencrypt_cache_dir,omitempty"`
// TLSLetsEncryptChallengeType is the ACME challenge type
// +kubebuilder:validation:Enum=HTTP-01;TLS-ALPN-01
// +kubebuilder:default="HTTP-01"
// +optional
TLSLetsEncryptChallengeType string `json:"tls_letsencrypt_challenge_type,omitempty"`
// TLSLetsEncryptListen is the address for Let's Encrypt challenge
// +kubebuilder:default=":http"
// +optional
TLSLetsEncryptListen string `json:"tls_letsencrypt_listen,omitempty"`
// TLSCertPath is the path to the TLS certificate
// +optional
TLSCertPath string `json:"tls_cert_path,omitempty"`
// TLSKeyPath is the path to the TLS key
// +optional
TLSKeyPath string `json:"tls_key_path,omitempty"`
// Log configuration
// +optional
Log LogConfig `json:"log"`
// Policy configuration
// +optional
Policy PolicyConfig `json:"policy"`
// DNS configuration
// +optional
DNS DNSConfig `json:"dns"`
// UnixSocket is the path to the Unix socket
// +kubebuilder:default="/var/run/headscale/headscale.sock"
// +kubebuilder:validation:MinLength=1
// +optional
UnixSocket string `json:"unix_socket,omitempty"`
// UnixSocketPermission is the Unix socket permission (e.g., "0770")
// +kubebuilder:default="0770"
// +optional
UnixSocketPermission string `json:"unix_socket_permission,omitempty"`
// OIDC configuration
// +optional
OIDC OIDCConfig `json:"oidc"`
// LogTail configuration
// +optional
LogTail LogTailConfig `json:"logtail"`
// RandomizeClientPort randomizes the WireGuard client port
// +kubebuilder:default=false
// +optional
RandomizeClientPort *bool `json:"randomize_client_port,omitempty"`
}
HeadscaleConfig represents the complete Headscale configuration
func (*HeadscaleConfig) DeepCopy ¶
func (in *HeadscaleConfig) DeepCopy() *HeadscaleConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleConfig.
func (*HeadscaleConfig) DeepCopyInto ¶
func (in *HeadscaleConfig) DeepCopyInto(out *HeadscaleConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscaleList ¶
type HeadscaleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Headscale `json:"items"`
}
HeadscaleList contains a list of Headscale
func (*HeadscaleList) DeepCopy ¶
func (in *HeadscaleList) DeepCopy() *HeadscaleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleList.
func (*HeadscaleList) DeepCopyInto ¶
func (in *HeadscaleList) DeepCopyInto(out *HeadscaleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadscaleList) DeepCopyObject ¶
func (in *HeadscaleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscalePreAuthKey ¶
type HeadscalePreAuthKey struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of HeadscalePreAuthKey
// +required
Spec HeadscalePreAuthKeySpec `json:"spec"`
// status defines the observed state of HeadscalePreAuthKey
// +optional
Status HeadscalePreAuthKeyStatus `json:"status,omitempty,omitzero"`
}
HeadscalePreAuthKey is the Schema for the headscalepreauthkeys API
func (*HeadscalePreAuthKey) DeepCopy ¶
func (in *HeadscalePreAuthKey) DeepCopy() *HeadscalePreAuthKey
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscalePreAuthKey.
func (*HeadscalePreAuthKey) DeepCopyInto ¶
func (in *HeadscalePreAuthKey) DeepCopyInto(out *HeadscalePreAuthKey)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadscalePreAuthKey) DeepCopyObject ¶
func (in *HeadscalePreAuthKey) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscalePreAuthKeyList ¶
type HeadscalePreAuthKeyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HeadscalePreAuthKey `json:"items"`
}
HeadscalePreAuthKeyList contains a list of HeadscalePreAuthKey
func (*HeadscalePreAuthKeyList) DeepCopy ¶
func (in *HeadscalePreAuthKeyList) DeepCopy() *HeadscalePreAuthKeyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscalePreAuthKeyList.
func (*HeadscalePreAuthKeyList) DeepCopyInto ¶
func (in *HeadscalePreAuthKeyList) DeepCopyInto(out *HeadscalePreAuthKeyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadscalePreAuthKeyList) DeepCopyObject ¶
func (in *HeadscalePreAuthKeyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscalePreAuthKeySpec ¶
type HeadscalePreAuthKeySpec struct {
// HeadscaleRef is the name of the Headscale instance to create the preauth key in
// +kubebuilder:validation:Required
// +required
HeadscaleRef string `json:"headscaleRef"`
// HeadscaleUserRef is the name of the HeadscaleUser resource to create the preauth key for
// Either HeadscaleUserRef or UserID must be specified, but not both
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
// +optional
HeadscaleUserRef string `json:"headscaleUserRef,omitempty"`
// UserID is the ID of the user in Headscale to create the preauth key for
// Either HeadscaleUserRef or UserID must be specified, but not both
// +kubebuilder:validation:Minimum=1
// +optional
UserID uint64 `json:"userId,omitempty"`
// Expiration is the duration after which the preauth key expires
// Examples: 30m, 24h, 1h30m (compound durations allowed; must be a valid Go duration string with hours and/or minutes)
// +kubebuilder:validation:Pattern=`^([0-9]+h)?([0-9]+m)?$`
// +kubebuilder:default="1h"
// +optional
Expiration string `json:"expiration,omitempty"`
// Reusable indicates whether the preauth key can be used multiple times
// +kubebuilder:default=false
// +optional
Reusable bool `json:"reusable,omitempty"`
// Ephemeral indicates whether nodes using this key should be ephemeral
// +kubebuilder:default=false
// +optional
Ephemeral bool `json:"ephemeral,omitempty"`
// Tags to automatically assign to nodes registered with this preauth key
// +kubebuilder:validation:items:Pattern=`^tag:[a-zA-Z0-9._-]+$`
// +optional
Tags []string `json:"tags,omitempty"`
// SecretName is the name of the secret to store the preauth key in
// If not specified, defaults to the HeadscalePreAuthKey resource name
// +optional
SecretName string `json:"secretName,omitempty"`
}
HeadscalePreAuthKeySpec defines the desired state of HeadscalePreAuthKey
func (*HeadscalePreAuthKeySpec) DeepCopy ¶
func (in *HeadscalePreAuthKeySpec) DeepCopy() *HeadscalePreAuthKeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscalePreAuthKeySpec.
func (*HeadscalePreAuthKeySpec) DeepCopyInto ¶
func (in *HeadscalePreAuthKeySpec) DeepCopyInto(out *HeadscalePreAuthKeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscalePreAuthKeyStatus ¶
type HeadscalePreAuthKeyStatus struct {
// KeyID is the ID of the preauth key in Headscale
// +optional
KeyID string `json:"keyId,omitempty"`
// conditions represent the current state of the HeadscalePreAuthKey resource.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HeadscalePreAuthKeyStatus defines the observed state of HeadscalePreAuthKey.
func (*HeadscalePreAuthKeyStatus) DeepCopy ¶
func (in *HeadscalePreAuthKeyStatus) DeepCopy() *HeadscalePreAuthKeyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscalePreAuthKeyStatus.
func (*HeadscalePreAuthKeyStatus) DeepCopyInto ¶
func (in *HeadscalePreAuthKeyStatus) DeepCopyInto(out *HeadscalePreAuthKeyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscaleSpec ¶
type HeadscaleSpec struct {
// Version indicates the version of Headscale to deploy.
// +kubebuilder:validation:Pattern=`^v?(\d+\.)?(\d+\.)?(\*|\d+)(-.+)?$`
// +required
Version string `json:"version"`
// Image is the container image to use for Headscale.
// +kubebuilder:default="headscale/headscale"
// +kubebuilder:validation:MinLength=1
// +optional
Image string `json:"image,omitempty"`
// Replicas indicates the number of Headscale instances to deploy.
// +kubebuilder:validation:Minimum=0
// +required
Replicas int32 `json:"replicas"`
// Config holds custom configuration for Headscale.
// +optional
Config HeadscaleConfig `json:"config"`
// PersistentVolumeClaim configuration for data storage
// +optional
PersistentVolumeClaim PersistentVolumeClaimConfig `json:"persistent_volume_claim"`
// APIKey configuration for automatic API key management
// +optional
APIKey APIKeyConfig `json:"api_key"`
}
HeadscaleSpec defines the desired state of Headscale
func (*HeadscaleSpec) DeepCopy ¶
func (in *HeadscaleSpec) DeepCopy() *HeadscaleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleSpec.
func (*HeadscaleSpec) DeepCopyInto ¶
func (in *HeadscaleSpec) DeepCopyInto(out *HeadscaleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscaleStatus ¶
type HeadscaleStatus struct {
// conditions represent the current state of the Headscale resource.
// Each condition has a unique type and reflects the status of a specific aspect of the resource.
//
// Standard condition types include:
// - "Available": the resource is fully functional
// - "Progressing": the resource is being created or updated
// - "Degraded": the resource failed to reach or maintain its desired state
//
// The status of each condition is one of True, False, or Unknown.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HeadscaleStatus defines the observed state of Headscale.
func (*HeadscaleStatus) DeepCopy ¶
func (in *HeadscaleStatus) DeepCopy() *HeadscaleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleStatus.
func (*HeadscaleStatus) DeepCopyInto ¶
func (in *HeadscaleStatus) DeepCopyInto(out *HeadscaleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscaleUser ¶
type HeadscaleUser struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of HeadscaleUser
// +required
Spec HeadscaleUserSpec `json:"spec"`
// status defines the observed state of HeadscaleUser
// +optional
Status HeadscaleUserStatus `json:"status,omitempty,omitzero"`
}
HeadscaleUser is the Schema for the headscaleusers API
func (*HeadscaleUser) DeepCopy ¶
func (in *HeadscaleUser) DeepCopy() *HeadscaleUser
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleUser.
func (*HeadscaleUser) DeepCopyInto ¶
func (in *HeadscaleUser) DeepCopyInto(out *HeadscaleUser)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadscaleUser) DeepCopyObject ¶
func (in *HeadscaleUser) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscaleUserList ¶
type HeadscaleUserList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HeadscaleUser `json:"items"`
}
HeadscaleUserList contains a list of HeadscaleUser
func (*HeadscaleUserList) DeepCopy ¶
func (in *HeadscaleUserList) DeepCopy() *HeadscaleUserList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleUserList.
func (*HeadscaleUserList) DeepCopyInto ¶
func (in *HeadscaleUserList) DeepCopyInto(out *HeadscaleUserList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeadscaleUserList) DeepCopyObject ¶
func (in *HeadscaleUserList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeadscaleUserSpec ¶
type HeadscaleUserSpec struct {
// HeadscaleRef references the Headscale instance to create the user in
// +required
HeadscaleRef string `json:"headscaleRef"`
// Username is the unique username for the Headscale user
// This field is immutable after creation
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="username is immutable"
// +required
Username string `json:"username"`
// DisplayName is the display name for the user
// This field is immutable after creation
// +kubebuilder:validation:MaxLength=255
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="displayName is immutable"
// +optional
DisplayName string `json:"displayName,omitempty"`
// Email is the email address of the user
// This field is immutable after creation
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`
// +kubebuilder:validation:MaxLength=320
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="email is immutable"
// +optional
Email string `json:"email,omitempty"`
// PictureURL is the URL to the user's profile picture
// This field is immutable after creation
// +kubebuilder:validation:Pattern=`^https?://.*$`
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="pictureURL is immutable"
// +optional
PictureURL string `json:"pictureURL,omitempty"`
}
HeadscaleUserSpec defines the desired state of HeadscaleUser
func (*HeadscaleUserSpec) DeepCopy ¶
func (in *HeadscaleUserSpec) DeepCopy() *HeadscaleUserSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleUserSpec.
func (*HeadscaleUserSpec) DeepCopyInto ¶
func (in *HeadscaleUserSpec) DeepCopyInto(out *HeadscaleUserSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeadscaleUserStatus ¶
type HeadscaleUserStatus struct {
// UserID is the unique identifier assigned by Headscale
// +optional
UserID string `json:"userId,omitempty"`
// CreatedAt is the timestamp when the user was created in Headscale
// +optional
CreatedAt string `json:"createdAt,omitempty"`
// conditions represent the current state of the HeadscaleUser resource.
// Each condition has a unique type and reflects the status of a specific aspect of the resource.
//
// Standard condition types include:
// - "Available": the resource is fully functional
// - "Progressing": the resource is being created or updated
// - "Degraded": the resource failed to reach or maintain its desired state
//
// The status of each condition is one of True, False, or Unknown.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
HeadscaleUserStatus defines the observed state of HeadscaleUser.
func (*HeadscaleUserStatus) DeepCopy ¶
func (in *HeadscaleUserStatus) DeepCopy() *HeadscaleUserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadscaleUserStatus.
func (*HeadscaleUserStatus) DeepCopyInto ¶
func (in *HeadscaleUserStatus) DeepCopyInto(out *HeadscaleUserStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogConfig ¶
type LogConfig struct {
// Level is the log level
// +kubebuilder:validation:Enum=panic;fatal;error;warn;info;debug;trace
// +kubebuilder:default="info"
// +optional
Level string `json:"level,omitempty"`
// Format is the log format
// +kubebuilder:validation:Enum=text;json
// +kubebuilder:default="text"
// +optional
Format string `json:"format,omitempty"`
}
LogConfig represents logging configuration
func (*LogConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogConfig.
func (*LogConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogTailConfig ¶
type LogTailConfig struct {
// Enabled indicates if Logtail is enabled
// +kubebuilder:default=false
// +optional
Enabled *bool `json:"enabled,omitempty"`
}
LogTailConfig represents Logtail configuration
func (*LogTailConfig) DeepCopy ¶
func (in *LogTailConfig) DeepCopy() *LogTailConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogTailConfig.
func (*LogTailConfig) DeepCopyInto ¶
func (in *LogTailConfig) DeepCopyInto(out *LogTailConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NoiseConfig ¶
type NoiseConfig struct {
// PrivateKeyPath is the path to the Noise private key
// +kubebuilder:default="/var/lib/headscale/noise_private.key"
// +optional
PrivateKeyPath string `json:"private_key_path,omitempty"`
}
NoiseConfig represents the Noise protocol configuration
func (*NoiseConfig) DeepCopy ¶
func (in *NoiseConfig) DeepCopy() *NoiseConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NoiseConfig.
func (*NoiseConfig) DeepCopyInto ¶
func (in *NoiseConfig) DeepCopyInto(out *NoiseConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OIDCConfig ¶
type OIDCConfig struct {
// OnlyStartIfOIDCIsAvailable blocks startup until OIDC is available
// +kubebuilder:default=true
// +optional
OnlyStartIfOIDCIsAvailable *bool `json:"only_start_if_oidc_is_available,omitempty"`
// Issuer is the OIDC issuer URL
// +optional
Issuer string `json:"issuer,omitempty"`
// ClientID is the OIDC client ID
// +optional
ClientID string `json:"client_id,omitempty"`
// ClientSecret is the OIDC client secret
// +optional
ClientSecret string `json:"client_secret,omitempty"`
// ClientSecretPath is the path to the OIDC client secret file
// +optional
ClientSecretPath string `json:"client_secret_path,omitempty"`
// Expiry is the authentication expiry duration
// +kubebuilder:default="180d"
// +optional
Expiry string `json:"expiry,omitempty"`
// UseExpiryFromToken uses the token expiry
// +kubebuilder:default=false
// +optional
UseExpiryFromToken *bool `json:"use_expiry_from_token,omitempty"`
// Scope is the list of OIDC scopes
// +optional
Scope []string `json:"scope,omitempty"`
// ExtraParams are additional parameters for the OIDC provider
// +optional
ExtraParams map[string]string `json:"extra_params,omitempty"`
// AllowedDomains is the list of allowed email domains
// +optional
AllowedDomains []string `json:"allowed_domains,omitempty"`
// AllowedUsers is the list of allowed email addresses
// +optional
AllowedUsers []string `json:"allowed_users,omitempty"`
// AllowedGroups is the list of allowed groups
// +optional
AllowedGroups []string `json:"allowed_groups,omitempty"`
// PKCE configuration
// +optional
PKCE PKCEConfig `json:"pkce"`
}
OIDCConfig represents OpenID Connect configuration
func (*OIDCConfig) DeepCopy ¶
func (in *OIDCConfig) DeepCopy() *OIDCConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCConfig.
func (*OIDCConfig) DeepCopyInto ¶
func (in *OIDCConfig) DeepCopyInto(out *OIDCConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PKCEConfig ¶
type PKCEConfig struct {
// Enabled indicates if PKCE is enabled
// +kubebuilder:default=false
// +optional
Enabled *bool `json:"enabled,omitempty"`
// Method is the PKCE method
// +kubebuilder:validation:Enum=plain;S256
// +kubebuilder:default="S256"
// +optional
Method string `json:"method,omitempty"`
}
PKCEConfig represents PKCE configuration
func (*PKCEConfig) DeepCopy ¶
func (in *PKCEConfig) DeepCopy() *PKCEConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKCEConfig.
func (*PKCEConfig) DeepCopyInto ¶
func (in *PKCEConfig) DeepCopyInto(out *PKCEConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PersistentVolumeClaimConfig ¶
type PersistentVolumeClaimConfig struct {
// Size is the storage size for the PVC
// +kubebuilder:default="128Mi"
// +optional
Size *resource.Quantity `json:"size,omitempty"`
// StorageClassName is the storage class name for the PVC
// +optional
StorageClassName *string `json:"storage_class_name,omitempty"`
}
PersistentVolumeClaimConfig represents the PVC configuration for Headscale data storage
func (*PersistentVolumeClaimConfig) DeepCopy ¶
func (in *PersistentVolumeClaimConfig) DeepCopy() *PersistentVolumeClaimConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimConfig.
func (*PersistentVolumeClaimConfig) DeepCopyInto ¶
func (in *PersistentVolumeClaimConfig) DeepCopyInto(out *PersistentVolumeClaimConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyConfig ¶
type PolicyConfig struct {
// Mode is the policy mode
// +kubebuilder:validation:Enum=file;database
// +kubebuilder:default="file"
// +optional
Mode string `json:"mode,omitempty"`
// Path is the path to the policy file
// +optional
Path string `json:"path,omitempty"`
}
PolicyConfig represents ACL policy configuration
func (*PolicyConfig) DeepCopy ¶
func (in *PolicyConfig) DeepCopy() *PolicyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyConfig.
func (*PolicyConfig) DeepCopyInto ¶
func (in *PolicyConfig) DeepCopyInto(out *PolicyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresConfig ¶
type PostgresConfig struct {
// Host is the PostgreSQL host
// +optional
Host string `json:"host,omitempty"`
// Port is the PostgreSQL port
// +optional
Port int `json:"port,omitempty"`
// Name is the database name
// +optional
Name string `json:"name,omitempty"`
// User is the database user
// +optional
User string `json:"user,omitempty"`
// Pass is the database password
// +optional
Pass string `json:"pass,omitempty"`
// MaxOpenConns is the maximum number of open connections
// +kubebuilder:default=10
// +optional
MaxOpenConns int `json:"max_open_conns,omitempty"`
// MaxIdleConns is the maximum number of idle connections
// +kubebuilder:default=10
// +optional
MaxIdleConns int `json:"max_idle_conns,omitempty"`
// ConnMaxIdleTimeSecs is the maximum connection idle time in seconds
// +kubebuilder:default=3600
// +optional
ConnMaxIdleTimeSecs int `json:"conn_max_idle_time_secs,omitempty"`
// SSL indicates whether to use SSL
// +kubebuilder:default=false
// +optional
SSL *bool `json:"ssl,omitempty"`
}
PostgresConfig represents PostgreSQL configuration
func (*PostgresConfig) DeepCopy ¶
func (in *PostgresConfig) DeepCopy() *PostgresConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConfig.
func (*PostgresConfig) DeepCopyInto ¶
func (in *PostgresConfig) DeepCopyInto(out *PostgresConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrefixesConfig ¶
type PrefixesConfig struct {
// V4 is the IPv4 prefix for allocation
// +kubebuilder:validation:Pattern=`^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}$`
// +kubebuilder:default="100.64.0.0/10"
// +optional
V4 string `json:"v4,omitempty"`
// V6 is the IPv6 prefix for allocation
// +kubebuilder:validation:Pattern=`^([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})/([0-9]{1,3})$`
// +kubebuilder:default="fd7a:115c:a1e0::/48"
// +optional
V6 string `json:"v6,omitempty"`
// Allocation strategy for IPs
// +kubebuilder:validation:Enum=sequential;random
// +kubebuilder:default="sequential"
// +optional
Allocation string `json:"allocation,omitempty"`
}
PrefixesConfig represents IP prefix configuration
func (*PrefixesConfig) DeepCopy ¶
func (in *PrefixesConfig) DeepCopy() *PrefixesConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrefixesConfig.
func (*PrefixesConfig) DeepCopyInto ¶
func (in *PrefixesConfig) DeepCopyInto(out *PrefixesConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SqliteConfig ¶
type SqliteConfig struct {
// Path is the path to the SQLite database file
// +kubebuilder:default="/var/lib/headscale/db.sqlite"
// +optional
Path string `json:"path,omitempty"`
// WriteAheadLog enables WAL mode
// +kubebuilder:default=true
// +optional
WriteAheadLog *bool `json:"write_ahead_log,omitempty"`
// WALAutocheckpoint sets the WAL autocheckpoint value
// +kubebuilder:default=1000
// +optional
WALAutocheckpoint int `json:"wal_autocheckpoint,omitempty"`
}
SqliteConfig represents SQLite configuration
func (*SqliteConfig) DeepCopy ¶
func (in *SqliteConfig) DeepCopy() *SqliteConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SqliteConfig.
func (*SqliteConfig) DeepCopyInto ¶
func (in *SqliteConfig) DeepCopyInto(out *SqliteConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶
type TLSConfig struct {
// LetsEncryptHostname is the hostname for Let's Encrypt
// +optional
LetsEncryptHostname string `json:"letsencrypt_hostname,omitempty"`
// LetsEncryptCacheDir is the cache directory for Let's Encrypt
// +kubebuilder:default="/var/lib/headscale/cache"
// +optional
LetsEncryptCacheDir string `json:"letsencrypt_cache_dir,omitempty"`
// LetsEncryptChallengeType is the ACME challenge type
// +kubebuilder:validation:Enum=HTTP-01;TLS-ALPN-01
// +kubebuilder:default="HTTP-01"
// +optional
LetsEncryptChallengeType string `json:"letsencrypt_challenge_type,omitempty"`
// LetsEncryptListen is the address for Let's Encrypt challenge
// +kubebuilder:default=":http"
// +optional
LetsEncryptListen string `json:"letsencrypt_listen,omitempty"`
// CertPath is the path to the TLS certificate
// +optional
CertPath string `json:"cert_path,omitempty"`
// KeyPath is the path to the TLS key
// +optional
KeyPath string `json:"key_path,omitempty"`
}
TLSConfig represents TLS configuration
func (*TLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.