v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cf.k8s.lex.la v1alpha1 API group. +kubebuilder:object:generate=true +groupName=cf.k8s.lex.la

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "cf.k8s.lex.la", 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 AWGConfig

type AWGConfig struct {
	// SecretName is the name of the Secret containing AWG configuration.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	SecretName string `json:"secretName"`

	// InterfacePrefix is the AWG network interface name prefix.
	// The kernel auto-numbers interfaces using this prefix (e.g., awg-cfd0, awg-cfd1).
	// Different GatewayClassConfigs should use different prefixes to avoid conflicts.
	// +optional
	// +kubebuilder:default="awg-cfd"
	InterfacePrefix string `json:"interfacePrefix,omitempty"`
}

AWGConfig configures the AmneziaWG sidecar for cloudflared.

func (*AWGConfig) DeepCopy

func (in *AWGConfig) DeepCopy() *AWGConfig

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

func (*AWGConfig) DeepCopyInto

func (in *AWGConfig) DeepCopyInto(out *AWGConfig)

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

type CloudflaredConfig

type CloudflaredConfig struct {
	// Enabled controls whether the controller manages cloudflared deployment.
	// When true, the controller will deploy cloudflared via Helm.
	// +optional
	// +kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty"`

	// Replicas is the number of cloudflared pods to run.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	Replicas int32 `json:"replicas,omitempty"`

	// Namespace is the namespace for cloudflared deployment.
	// +optional
	// +kubebuilder:default="cloudflare-tunnel-system"
	Namespace string `json:"namespace,omitempty"`

	// Protocol is the transport protocol for cloudflared.
	// +optional
	// +kubebuilder:validation:Enum=auto;quic;http2;""
	Protocol string `json:"protocol,omitempty"`

	// AWG configures the AmneziaWG sidecar.
	// +optional
	AWG *AWGConfig `json:"awg,omitempty"`
}

CloudflaredConfig configures the cloudflared deployment managed by the controller.

func (*CloudflaredConfig) DeepCopy

func (in *CloudflaredConfig) DeepCopy() *CloudflaredConfig

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

func (*CloudflaredConfig) DeepCopyInto

func (in *CloudflaredConfig) DeepCopyInto(out *CloudflaredConfig)

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

type GatewayClassConfig

type GatewayClassConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"` //nolint:modernize // kubebuilder standard

	Spec   GatewayClassConfigSpec   `json:"spec,omitempty"`   //nolint:modernize // kubebuilder standard
	Status GatewayClassConfigStatus `json:"status,omitempty"` //nolint:modernize // kubebuilder standard
}

GatewayClassConfig is the Schema for the gatewayclassconfigs API. It provides configuration for Cloudflare Tunnel Gateway API implementation.

func (*GatewayClassConfig) DeepCopy

func (in *GatewayClassConfig) DeepCopy() *GatewayClassConfig

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

func (*GatewayClassConfig) DeepCopyInto

func (in *GatewayClassConfig) DeepCopyInto(out *GatewayClassConfig)

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

func (*GatewayClassConfig) DeepCopyObject

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

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

type GatewayClassConfigList

type GatewayClassConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"` //nolint:modernize // kubebuilder standard

	Items []GatewayClassConfig `json:"items"`
}

GatewayClassConfigList contains a list of GatewayClassConfig.

func (*GatewayClassConfigList) DeepCopy

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

func (*GatewayClassConfigList) DeepCopyInto

func (in *GatewayClassConfigList) DeepCopyInto(out *GatewayClassConfigList)

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

func (*GatewayClassConfigList) DeepCopyObject

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

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

type GatewayClassConfigSpec

type GatewayClassConfigSpec struct {
	// CloudflareCredentialsSecretRef references a Secret containing Cloudflare API credentials.
	// The Secret must contain an "api-token" key with a valid Cloudflare API token.
	// +kubebuilder:validation:Required
	CloudflareCredentialsSecretRef SecretReference `json:"cloudflareCredentialsSecretRef"`

	// AccountID is the Cloudflare account ID. Optional - if not specified, it will be
	// read from the credentials secret ("account-id" key) or auto-detected if the API token
	// has access to only one account.
	// +optional
	AccountID string `json:"accountId,omitempty"`

	// TunnelID is the Cloudflare Tunnel UUID.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`
	TunnelID string `json:"tunnelID"` //nolint:tagliatelle // Cloudflare API uses tunnelID

	// TunnelTokenSecretRef references a Secret containing the tunnel token.
	// Required when cloudflared.enabled is true.
	// The Secret must contain a "tunnel-token" key.
	// +optional
	TunnelTokenSecretRef *SecretReference `json:"tunnelTokenSecretRef,omitempty"`

	// Cloudflared configures the cloudflared deployment.
	// +optional
	Cloudflared CloudflaredConfig `json:"cloudflared,omitempty"` //nolint:modernize // kubebuilder standard
}

GatewayClassConfigSpec defines the desired state of GatewayClassConfig.

func (*GatewayClassConfigSpec) DeepCopy

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

func (*GatewayClassConfigSpec) DeepCopyInto

func (in *GatewayClassConfigSpec) DeepCopyInto(out *GatewayClassConfigSpec)

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

func (*GatewayClassConfigSpec) GetCloudflaredNamespace

func (c *GatewayClassConfigSpec) GetCloudflaredNamespace() string

GetCloudflaredNamespace returns the namespace, defaulting to "cloudflare-tunnel-system".

func (*GatewayClassConfigSpec) GetCloudflaredReplicas

func (c *GatewayClassConfigSpec) GetCloudflaredReplicas() int32

GetCloudflaredReplicas returns the replica count, defaulting to 1.

func (*GatewayClassConfigSpec) IsCloudflaredEnabled

func (c *GatewayClassConfigSpec) IsCloudflaredEnabled() bool

IsCloudflaredEnabled returns whether cloudflared management is enabled. Defaults to true if not explicitly set.

type GatewayClassConfigStatus

type GatewayClassConfigStatus struct {
	// Conditions describe the current state of the GatewayClassConfig.
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

GatewayClassConfigStatus defines the observed state of GatewayClassConfig.

func (*GatewayClassConfigStatus) DeepCopy

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

func (*GatewayClassConfigStatus) DeepCopyInto

func (in *GatewayClassConfigStatus) DeepCopyInto(out *GatewayClassConfigStatus)

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

type SecretReference

type SecretReference struct {
	// Name of the Secret.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// Namespace of the Secret. Defaults to the namespace of the referencing resource.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Key in the Secret. Defaults depend on context:
	// - For cloudflareCredentialsSecretRef: "api-token"
	// - For tunnelTokenSecretRef: "tunnel-token"
	// +optional
	Key string `json:"key,omitempty"`
}

SecretReference is a reference to a Kubernetes Secret.

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

func (*SecretReference) GetAPITokenKey

func (r *SecretReference) GetAPITokenKey() string

GetAPITokenKey returns the key for API token in the secret.

func (*SecretReference) GetTunnelTokenKey

func (r *SecretReference) GetTunnelTokenKey() string

GetTunnelTokenKey returns the key for tunnel token in the secret.

Jump to

Keyboard shortcuts

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