controller

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label and annotation prefixes for the new cloudflare.com API group
	LabelPrefix      = "cloudflare.com/"
	AnnotationPrefix = "cloudflare.com/"

	// Finalizer for cloudflare.com resources
	FinalizerCloudflare = "cloudflare.com/finalizer"

	// Legacy prefixes for backward compatibility with cloudflare-operator.io resources
	LegacyLabelPrefix      = "cloudflare-operator.io/"
	LegacyAnnotationPrefix = "cloudflare-operator.io/"
	LegacyFinalizer        = "cloudflare-operator.io/finalizer"
)

New cloudflare.com API Group constants These will be used for new CRDs (VirtualNetwork, NetworkRoute, etc.)

View Source
const (
	VirtualNetworkFinalizer = "cloudflare.com/virtualnetwork-finalizer"

	// Labels for VirtualNetwork
	LabelVirtualNetworkName = LabelPrefix + "virtualnetwork-name"
	LabelVirtualNetworkID   = LabelPrefix + "virtualnetwork-id"
)

VirtualNetwork controller constants

View Source
const (
	NetworkRouteFinalizer = "cloudflare.com/networkroute-finalizer"

	// Labels for NetworkRoute
	LabelNetworkRouteNetwork = LabelPrefix + "networkroute-network"
	LabelNetworkRouteTunnel  = LabelPrefix + "networkroute-tunnel"
)

NetworkRoute controller constants

View Source
const (
	PrivateServiceFinalizer = "cloudflare.com/privateservice-finalizer"

	// Labels for PrivateService
	LabelPrivateServiceName = LabelPrefix + "privateservice-name"
)

PrivateService controller constants

View Source
const (
	DeviceSettingsPolicyFinalizer = "cloudflare.com/devicesettingspolicy-finalizer"

	// Labels for DeviceSettingsPolicy
	LabelDeviceSettingsPolicyName = LabelPrefix + "devicesettingspolicy-name"
)

DeviceSettingsPolicy controller constants

View Source
const (
	// AnnotationLastAppliedConfig stores the last applied configuration for drift detection
	AnnotationLastAppliedConfig = AnnotationPrefix + "last-applied-configuration"

	// AnnotationManagedBy indicates the controller managing the resource
	AnnotationManagedBy = AnnotationPrefix + "managed-by"

	// AnnotationManagedByValue is the value for AnnotationManagedBy
	AnnotationManagedByValue = "cloudflare-operator"
)

Annotations used across controllers

View Source
const (
	ControllerNameVirtualNetwork       = "VirtualNetwork"
	ControllerNameNetworkRoute         = "NetworkRoute"
	ControllerNamePrivateService       = "PrivateService"
	ControllerNameDeviceSettingsPolicy = "DeviceSettingsPolicy"
)

Controller names for logging and events

View Source
const (
	// Success events
	EventReasonCreated          = "Created"
	EventReasonUpdated          = "Updated"
	EventReasonDeleted          = "Deleted"
	EventReasonSynced           = "Synced"
	EventReasonReconciled       = "Reconciled"
	EventReasonFinalizerSet     = "FinalizerSet"
	EventReasonFinalizerRemoved = "FinalizerRemoved"
	EventReasonAdopted          = "Adopted"

	// Failure events
	EventReasonCreateFailed     = "CreateFailed"
	EventReasonUpdateFailed     = "UpdateFailed"
	EventReasonDeleteFailed     = "DeleteFailed"
	EventReasonSyncFailed       = "SyncFailed"
	EventReasonReconcileFailed  = "ReconcileFailed"
	EventReasonAPIError         = "APIError"
	EventReasonInvalidConfig    = "InvalidConfig"
	EventReasonDependencyError  = "DependencyError"
	EventReasonAdoptionConflict = "AdoptionConflict"
)

Event reasons

View Source
const (
	// ManagementMarkerPrefix is the prefix for management markers in comments
	// Format: [managed:kind/namespace/name] or [managed:kind/name] for cluster-scoped
	ManagementMarkerPrefix = "[managed:"
	ManagementMarkerSuffix = "]"
)

Management tracking constants These are used to track which K8s resource manages a Cloudflare resource, preventing adoption race conditions where multiple K8s resources try to manage the same Cloudflare resource.

View Source
const (
	// Initialization events
	EventReasonSecretNotFound  = "SecretNotFound"
	EventReasonCredentialError = "CredentialError"

	// Finalizer events
	EventReasonFinalizerAdded = "FinalizerAdded"

	// Conflict events
	EventReasonConflict         = "Conflict"
	EventReasonManagedByAnother = "ManagedByAnother"
)

Additional event reasons not defined in constants.go

View Source
const (
	CredentialsJsonFilename string = "credentials.json"
	CloudflaredLatestImage  string = "cloudflare/cloudflared:latest"
)
View Source
const (
	// DefaultMaxRetries is the default number of retries for status updates
	DefaultMaxRetries = 5

	// DefaultRetryDelay is the default delay between retries
	DefaultRetryDelay = 100 * time.Millisecond
)
View Source
const (
	StatePending  = "Pending"
	StateCreating = "Creating"
	StateActive   = "Active"
	StateReady    = "Ready"
	StateError    = "Error"
	StateDeleting = "Deleting"
	StateWarning  = "Warning"
)

State constants for consistent state management across controllers

View Source
const AdoptionAnnotation = "cloudflare-operator.io/managed-by"

AdoptionAnnotation is the annotation key for marking Cloudflare resources as managed

View Source
const DefaultRequeueAfter = 30 * time.Second

DefaultRequeueAfter is the default requeue duration after an error

View Source
const (
	// OperatorNamespace is the namespace where the operator is deployed.
	// Used for cluster-scoped resources to locate secrets.
	OperatorNamespace = "cloudflare-operator-system"
)

Operator namespace constant Cluster-scoped resources should use this namespace for loading secrets when using legacy inline secret references.

Variables

This section is empty.

Functions

func BuildManagedComment added in v0.17.3

func BuildManagedComment(info ManagementInfo, userComment string) string

BuildManagedComment creates a comment with management marker prepended. If userComment is empty, only the marker is returned.

func CanManageResource added in v0.17.3

func CanManageResource(comment string, info ManagementInfo) bool

CanManageResource checks if the given K8s resource can manage a Cloudflare resource. Returns true if: - The Cloudflare resource has no management marker (first claim) - The management marker matches the K8s resource (same owner) Returns false if the Cloudflare resource is managed by a different K8s resource.

func CreateCloudflareClientFromCreds added in v0.22.0

func CreateCloudflareClientFromCreds(creds *credentials.Credentials) (*cloudflare.API, error)

CreateCloudflareClientFromCreds creates a Cloudflare API client from loaded credentials.

func EnsureFinalizer added in v0.18.1

func EnsureFinalizer(ctx context.Context, c client.Client, obj client.Object, finalizerName string) (bool, error)

EnsureFinalizer ensures the finalizer is present on the object. It uses UpdateWithConflictRetry to handle concurrent modifications. Returns true if the finalizer was added (object was updated), false if already present.

func ExtractUserComment added in v0.17.3

func ExtractUserComment(comment string) string

ExtractUserComment removes the management marker from a comment and returns the user portion.

func FormatManagedByValue added in v0.17.3

func FormatManagedByValue(namespace, name string) string

FormatManagedByValue formats the managed-by annotation value

func HasFinalizer added in v0.18.1

func HasFinalizer(obj client.Object, finalizerName string) bool

HasFinalizer checks if the object has the specified finalizer

func IsBeingDeleted added in v0.18.1

func IsBeingDeleted(obj client.Object) bool

IsBeingDeleted checks if the object is being deleted (has deletion timestamp)

func IsTerminalState added in v0.17.3

func IsTerminalState(state string) bool

IsTerminalState returns true if the state is a terminal state

func QuickHandleDeletion added in v0.18.1

func QuickHandleDeletion(
	ctx context.Context,
	c client.Client,
	log logr.Logger,
	recorder record.EventRecorder,
	obj client.Object,
	finalizerName string,
	deleteFn func() error,
) (ctrl.Result, bool, error)

QuickHandleDeletion is a convenience function for simple deletion scenarios It combines HandleDeletion with finalizer checking

func RecordError added in v0.18.1

func RecordError(recorder record.EventRecorder, obj runtime.Object, reason string, err error)

RecordError is a shorthand for recording an error event with sanitized message Does not modify conditions

func RecordErrorEventAndCondition added in v0.18.1

func RecordErrorEventAndCondition(
	recorder record.EventRecorder,
	obj runtime.Object,
	conditions *[]metav1.Condition,
	reason string,
	err error,
)

RecordErrorEventAndCondition records an error event and sets Ready condition to False It sanitizes the error message to remove sensitive information

func RecordEventAndSetCondition added in v0.18.1

func RecordEventAndSetCondition(
	recorder record.EventRecorder,
	obj runtime.Object,
	conditions *[]metav1.Condition,
	eventType string,
	reason string,
	message string,
	conditionStatus metav1.ConditionStatus,
)

RecordEventAndSetCondition records an event and sets a condition on the resource This is a common pattern used throughout the controllers

func RecordSuccess added in v0.18.1

func RecordSuccess(recorder record.EventRecorder, obj runtime.Object, reason string, message string)

RecordSuccess is a shorthand for recording a success event Does not modify conditions

func RecordSuccessEventAndCondition added in v0.18.1

func RecordSuccessEventAndCondition(
	recorder record.EventRecorder,
	obj runtime.Object,
	conditions *[]metav1.Condition,
	reason string,
	message string,
)

RecordSuccessEventAndCondition records a success event and sets Ready condition to True

func RecordWarningEventAndCondition added in v0.18.1

func RecordWarningEventAndCondition(
	recorder record.EventRecorder,
	obj runtime.Object,
	conditions *[]metav1.Condition,
	reason string,
	message string,
)

RecordWarningEventAndCondition records a warning event and sets Ready condition to False

func RemoveFinalizerSafely added in v0.18.1

func RemoveFinalizerSafely(ctx context.Context, c client.Client, obj client.Object, finalizerName string) (bool, error)

RemoveFinalizerSafely removes the finalizer from the object safely. It uses UpdateWithConflictRetry to handle concurrent modifications. Returns true if the finalizer was removed (object was updated), false if not present.

func RetryOnConflict added in v0.17.3

func RetryOnConflict(ctx context.Context, c client.Client, obj client.Object, fn func() error) error

RetryOnConflict retries a function that may return a conflict error This is useful for status updates where optimistic locking may fail

func SetCondition added in v0.17.3

func SetCondition(conditions *[]metav1.Condition, conditionType string, status metav1.ConditionStatus, reason, message string)

SetCondition is a helper to set a condition on a resource It handles the common pattern of setting conditions with proper timestamps

func SetErrorCondition added in v0.17.3

func SetErrorCondition(conditions *[]metav1.Condition, err error)

SetErrorCondition sets the Ready condition to False with an error reason

func SetReadyCondition added in v0.17.3

func SetReadyCondition(conditions *[]metav1.Condition, status metav1.ConditionStatus, reason, message string)

SetReadyCondition is a shorthand for setting the Ready condition

func SetSuccessCondition added in v0.17.3

func SetSuccessCondition(conditions *[]metav1.Condition, message string)

SetSuccessCondition sets the Ready condition to True

func ShouldReconcileDeletion added in v0.18.1

func ShouldReconcileDeletion(obj client.Object, finalizerName string) bool

ShouldReconcileDeletion returns true if the object is being deleted and has the finalizer

func UpdateStatusWithConflictRetry added in v0.17.3

func UpdateStatusWithConflictRetry(ctx context.Context, c client.Client, obj client.Object, updateFn func()) error

UpdateStatusWithConflictRetry is a convenience function that updates status with retry on conflict

func UpdateWithConflictRetry added in v0.17.3

func UpdateWithConflictRetry(ctx context.Context, c client.Client, obj client.Object, updateFn func()) error

UpdateWithConflictRetry is a convenience function that updates object with retry on conflict

Types

type AdoptionChecker added in v0.17.3

type AdoptionChecker struct {
	// ManagedByValue is the value to use for the managed-by annotation
	// typically in the format "namespace/name"
	ManagedByValue string
}

AdoptionChecker provides utilities for checking if Cloudflare resources are already managed by another Kubernetes object

func NewAdoptionChecker added in v0.17.3

func NewAdoptionChecker(namespace, name string) *AdoptionChecker

NewAdoptionChecker creates a new AdoptionChecker

func (*AdoptionChecker) CheckByName added in v0.17.3

func (c *AdoptionChecker) CheckByName(name string, lookupFn func(name string) (id string, managedBy string, err error)) AdoptionResult

CheckByName checks if a resource with the given name exists and can be adopted lookupFn should return (id, managedBy, error) for the resource with the given name If the resource is not found, lookupFn should return ("", "", nil)

func (*AdoptionChecker) ConflictError added in v0.17.3

func (*AdoptionChecker) ConflictError(resourceType, name, existingManager string) error

ConflictError returns an error for adoption conflict

type AdoptionResult added in v0.17.3

type AdoptionResult struct {
	// Found indicates if the resource was found in Cloudflare
	Found bool
	// CanAdopt indicates if the resource can be adopted by this controller
	CanAdopt bool
	// ExistingID is the ID of the existing resource (if found)
	ExistingID string
	// ManagedBy is the current manager of the resource (if any)
	ManagedBy string
	// Error contains any error that occurred during the check
	Error error
}

AdoptionResult represents the result of an adoption check

func (AdoptionResult) IsAvailable added in v0.17.3

func (r AdoptionResult) IsAvailable() bool

IsAvailable returns true if the resource is available for adoption (either not found or can be adopted)

type ClusterTunnelAdapter

type ClusterTunnelAdapter struct {
	Tunnel    *networkingv1alpha2.ClusterTunnel
	Namespace string
}

ClusterTunnelAdapter implementation

func (ClusterTunnelAdapter) DeepCopyTunnel

func (o ClusterTunnelAdapter) DeepCopyTunnel() Tunnel

func (ClusterTunnelAdapter) GetAnnotations

func (o ClusterTunnelAdapter) GetAnnotations() map[string]string

func (ClusterTunnelAdapter) GetLabels

func (o ClusterTunnelAdapter) GetLabels() map[string]string

func (ClusterTunnelAdapter) GetName

func (o ClusterTunnelAdapter) GetName() string

func (ClusterTunnelAdapter) GetNamespace

func (o ClusterTunnelAdapter) GetNamespace() string

func (ClusterTunnelAdapter) GetObject

func (o ClusterTunnelAdapter) GetObject() client.Object

func (ClusterTunnelAdapter) GetSpec

func (ClusterTunnelAdapter) GetStatus

func (ClusterTunnelAdapter) GetUID

func (o ClusterTunnelAdapter) GetUID() types.UID

func (ClusterTunnelAdapter) SetAnnotations

func (o ClusterTunnelAdapter) SetAnnotations(in map[string]string)

func (ClusterTunnelAdapter) SetLabels

func (o ClusterTunnelAdapter) SetLabels(in map[string]string)

func (ClusterTunnelAdapter) SetStatus

type ClusterTunnelReconciler

type ClusterTunnelReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	Recorder  record.EventRecorder
	Namespace string
	// contains filtered or unexported fields
}

ClusterTunnelReconciler reconciles a ClusterTunnel object

func (*ClusterTunnelReconciler) GetCfAPI

func (r *ClusterTunnelReconciler) GetCfAPI() *cf.API

func (*ClusterTunnelReconciler) GetCfSecret

func (r *ClusterTunnelReconciler) GetCfSecret() *corev1.Secret

func (*ClusterTunnelReconciler) GetClient

func (r *ClusterTunnelReconciler) GetClient() client.Client

func (*ClusterTunnelReconciler) GetContext

func (r *ClusterTunnelReconciler) GetContext() context.Context

func (*ClusterTunnelReconciler) GetLog

func (r *ClusterTunnelReconciler) GetLog() logr.Logger

func (*ClusterTunnelReconciler) GetReconciledObject

func (r *ClusterTunnelReconciler) GetReconciledObject() client.Object

func (*ClusterTunnelReconciler) GetReconcilerName

func (r *ClusterTunnelReconciler) GetReconcilerName() string

func (*ClusterTunnelReconciler) GetRecorder

func (r *ClusterTunnelReconciler) GetRecorder() record.EventRecorder

func (*ClusterTunnelReconciler) GetScheme

func (r *ClusterTunnelReconciler) GetScheme() *runtime.Scheme

func (*ClusterTunnelReconciler) GetTunnel

func (r *ClusterTunnelReconciler) GetTunnel() Tunnel

func (*ClusterTunnelReconciler) GetTunnelCreds

func (r *ClusterTunnelReconciler) GetTunnelCreds() string

func (*ClusterTunnelReconciler) Reconcile

func (r *ClusterTunnelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. It compares the state specified by the ClusterTunnel object against the actual cluster state, and then performs operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*ClusterTunnelReconciler) SetCfAPI

func (r *ClusterTunnelReconciler) SetCfAPI(in *cf.API)

func (*ClusterTunnelReconciler) SetTunnelCreds

func (r *ClusterTunnelReconciler) SetTunnelCreds(in string)

func (*ClusterTunnelReconciler) SetupWithManager

func (r *ClusterTunnelReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DeletionHandler added in v0.18.1

type DeletionHandler struct {
	Client        client.Client
	Log           logr.Logger
	Recorder      record.EventRecorder
	FinalizerName string
}

DeletionHandler handles the standard deletion flow for resources

func NewDeletionHandler added in v0.18.1

func NewDeletionHandler(c client.Client, log logr.Logger, recorder record.EventRecorder, finalizerName string) *DeletionHandler

NewDeletionHandler creates a new DeletionHandler

func (*DeletionHandler) HandleDeletion added in v0.18.1

func (h *DeletionHandler) HandleDeletion(
	ctx context.Context,
	obj client.Object,
	deleteFn func() error,
) (ctrl.Result, bool, error)

HandleDeletion performs the standard deletion workflow: 1. Check if finalizer is present 2. Execute the delete function (to clean up external resources) 3. Remove the finalizer

The deleteFn should handle NotFound errors gracefully (return nil if already deleted). Returns (result, requeue, error) where: - result is the reconcile result - requeue indicates if reconciliation should be requeued - error is any error that occurred

func (*DeletionHandler) HandleDeletionWithMultipleResources added in v0.18.1

func (h *DeletionHandler) HandleDeletionWithMultipleResources(
	ctx context.Context,
	obj client.Object,
	deleteFns []func() error,
) (ctrl.Result, bool, error)

HandleDeletionWithMultipleResources handles deletion when multiple external resources need to be cleaned up. It aggregates errors and only removes the finalizer if all deletions succeed.

type GenericTunnelReconciler

type GenericTunnelReconciler interface {
	k8s.GenericReconciler

	GetScheme() *runtime.Scheme
	GetTunnel() Tunnel
	GetCfAPI() *cf.API
	SetCfAPI(*cf.API)
	GetCfSecret() *corev1.Secret
	GetTunnelCreds() string
	SetTunnelCreds(string)
}

type ManagementInfo added in v0.17.3

type ManagementInfo struct {
	Kind      string
	Namespace string // Empty for cluster-scoped resources
	Name      string
}

ManagementInfo represents the K8s resource managing a Cloudflare resource

func GetConflictingManager added in v0.17.3

func GetConflictingManager(comment string, info ManagementInfo) *ManagementInfo

GetConflictingManager returns the ManagementInfo of the resource that conflicts with the given info. Returns nil if there's no conflict.

func NewManagementInfo added in v0.17.3

func NewManagementInfo(obj metav1.Object, kind string) ManagementInfo

NewManagementInfo creates a ManagementInfo from a K8s object

func ParseManagementMarker added in v0.17.3

func ParseManagementMarker(comment string) *ManagementInfo

ParseManagementMarker extracts ManagementInfo from a comment string. Returns nil if no management marker is found.

func (ManagementInfo) Equals added in v0.17.3

func (m ManagementInfo) Equals(other ManagementInfo) bool

Equals returns true if two ManagementInfo are equal

func (ManagementInfo) String added in v0.17.3

func (m ManagementInfo) String() string

String returns the management marker string for embedding in comments

type StatusUpdater added in v0.17.3

type StatusUpdater struct {
	Client     client.Client
	MaxRetries int
	RetryDelay time.Duration
}

StatusUpdater provides utilities for updating resource status with retry logic

func NewStatusUpdater added in v0.17.3

func NewStatusUpdater(c client.Client) *StatusUpdater

NewStatusUpdater creates a new StatusUpdater with default settings

func (*StatusUpdater) UpdateStatusWithRetry added in v0.17.3

func (u *StatusUpdater) UpdateStatusWithRetry(ctx context.Context, obj client.Object, updateFn func()) error

UpdateStatusWithRetry updates the status of an object with retry on conflict

func (*StatusUpdater) UpdateWithRetry added in v0.17.3

func (u *StatusUpdater) UpdateWithRetry(ctx context.Context, obj client.Object, updateFn func()) error

UpdateWithRetry updates an object with retry on conflict

type Tunnel

type Tunnel interface {
	GetObject() client.Object
	GetNamespace() string
	GetName() string
	GetLabels() map[string]string
	SetLabels(map[string]string)
	GetAnnotations() map[string]string
	SetAnnotations(map[string]string)
	GetSpec() networkingv1alpha2.TunnelSpec
	GetStatus() networkingv1alpha2.TunnelStatus
	SetStatus(networkingv1alpha2.TunnelStatus)
	DeepCopyTunnel() Tunnel
}

type TunnelAdapter

type TunnelAdapter struct {
	Tunnel *networkingv1alpha2.Tunnel
}

TunnelAdapter implementation

func (TunnelAdapter) DeepCopyTunnel

func (o TunnelAdapter) DeepCopyTunnel() Tunnel

func (TunnelAdapter) GetAnnotations

func (o TunnelAdapter) GetAnnotations() map[string]string

func (TunnelAdapter) GetLabels

func (o TunnelAdapter) GetLabels() map[string]string

func (TunnelAdapter) GetName

func (o TunnelAdapter) GetName() string

func (TunnelAdapter) GetNamespace

func (o TunnelAdapter) GetNamespace() string

func (TunnelAdapter) GetObject

func (o TunnelAdapter) GetObject() client.Object

func (TunnelAdapter) GetSpec

func (TunnelAdapter) GetStatus

func (TunnelAdapter) GetUID

func (o TunnelAdapter) GetUID() types.UID

func (TunnelAdapter) SetAnnotations

func (o TunnelAdapter) SetAnnotations(in map[string]string)

func (TunnelAdapter) SetLabels

func (o TunnelAdapter) SetLabels(in map[string]string)

func (TunnelAdapter) SetStatus

type TunnelBindingReconciler

type TunnelBindingReconciler struct {
	client.Client
	Scheme             *runtime.Scheme
	Recorder           record.EventRecorder
	Namespace          string
	OverwriteUnmanaged bool
	// contains filtered or unexported fields
}

TunnelBindingReconciler reconciles a TunnelBinding object

func (*TunnelBindingReconciler) Reconcile

func (r *TunnelBindingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*TunnelBindingReconciler) SetupWithManager

func (r *TunnelBindingReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TunnelReconciler

type TunnelReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

TunnelReconciler reconciles a Tunnel object

func (*TunnelReconciler) GetCfAPI

func (r *TunnelReconciler) GetCfAPI() *cf.API

func (*TunnelReconciler) GetCfSecret

func (r *TunnelReconciler) GetCfSecret() *corev1.Secret

func (*TunnelReconciler) GetClient

func (r *TunnelReconciler) GetClient() client.Client

func (*TunnelReconciler) GetContext

func (r *TunnelReconciler) GetContext() context.Context

func (*TunnelReconciler) GetLog

func (r *TunnelReconciler) GetLog() logr.Logger

func (*TunnelReconciler) GetReconciledObject

func (r *TunnelReconciler) GetReconciledObject() client.Object

func (*TunnelReconciler) GetReconcilerName

func (r *TunnelReconciler) GetReconcilerName() string

func (*TunnelReconciler) GetRecorder

func (r *TunnelReconciler) GetRecorder() record.EventRecorder

func (*TunnelReconciler) GetScheme

func (r *TunnelReconciler) GetScheme() *runtime.Scheme

func (*TunnelReconciler) GetTunnel

func (r *TunnelReconciler) GetTunnel() Tunnel

func (*TunnelReconciler) GetTunnelCreds

func (r *TunnelReconciler) GetTunnelCreds() string

func (*TunnelReconciler) Reconcile

func (r *TunnelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*TunnelReconciler) SetCfAPI

func (r *TunnelReconciler) SetCfAPI(in *cf.API)

func (*TunnelReconciler) SetTunnelCreds

func (r *TunnelReconciler) SetTunnelCreds(in string)

func (*TunnelReconciler) SetupWithManager

func (r *TunnelReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis
Package accesstunnel contains the code associated with the reconciliation process for the accessTunnel resource
Package accesstunnel contains the code associated with the reconciliation process for the accessTunnel resource
Package domainregistration provides a controller for managing Cloudflare Registrar domains.
Package domainregistration provides a controller for managing Cloudflare Registrar domains.
Package gateway implements Kubernetes Gateway API controllers for cloudflared tunnels.
Package gateway implements Kubernetes Gateway API controllers for cloudflared tunnels.
Package ingress implements the Kubernetes Ingress Controller for Cloudflare Tunnels.
Package ingress implements the Kubernetes Ingress Controller for Cloudflare Tunnels.
Package origincacertificate provides a controller for managing Cloudflare Origin CA certificates.
Package origincacertificate provides a controller for managing Cloudflare Origin CA certificates.
Package r2bucket provides a controller for managing Cloudflare R2 storage buckets.
Package r2bucket provides a controller for managing Cloudflare R2 storage buckets.
Package r2bucketdomain provides a controller for managing Cloudflare R2 bucket custom domains.
Package r2bucketdomain provides a controller for managing Cloudflare R2 bucket custom domains.
Package r2bucketnotification provides a controller for managing R2 bucket event notifications.
Package r2bucketnotification provides a controller for managing R2 bucket event notifications.
Package redirectrule provides a controller for managing Cloudflare Redirect Rules.
Package redirectrule provides a controller for managing Cloudflare Redirect Rules.
Package route provides shared utilities for building cloudflared ingress rules from various Kubernetes resources (Ingress, Gateway API routes, TunnelBinding).
Package route provides shared utilities for building cloudflared ingress rules from various Kubernetes resources (Ingress, Gateway API routes, TunnelBinding).
Package transformrule provides a controller for managing Cloudflare Transform Rules.
Package transformrule provides a controller for managing Cloudflare Transform Rules.
Package tunnel provides shared tunnel resolution and management utilities for controllers that work with Tunnel and ClusterTunnel resources.
Package tunnel provides shared tunnel resolution and management utilities for controllers that work with Tunnel and ClusterTunnel resources.
Package zoneruleset provides a controller for managing Cloudflare zone rulesets.
Package zoneruleset provides a controller for managing Cloudflare zone rulesets.

Jump to

Keyboard shortcuts

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