privateservice

package
v0.23.1 Latest Latest
Warning

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

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

Documentation

Overview

Package privateservice provides the PrivateService Sync Controller for managing Cloudflare Tunnel Routes. Similar to NetworkRouteSyncController, but specifically for PrivateService resources which derive their route CIDR from K8s Service ClusterIPs.

Unified Sync Architecture Flow: K8s Resources → Resource Controllers → Core Services → SyncState CRD → Sync Controllers → Cloudflare API

This Sync Controller is the SINGLE point that calls Cloudflare API for PrivateService routes. It handles create, update, and delete operations based on SyncState changes.

Index

Constants

View Source
const (
	// FinalizerName is the finalizer for PrivateService SyncState resources.
	// This ensures we delete the tunnel route from Cloudflare before removing SyncState.
	FinalizerName = "privateservice.sync.cloudflare-operator.io/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	*common.BaseSyncController
}

Controller is the Sync Controller for PrivateService Configuration. It watches CloudflareSyncState resources of type PrivateService, extracts the configuration, and syncs to Cloudflare API. This is the SINGLE point that calls Cloudflare Tunnel Route API for PrivateService.

func NewController

func NewController(c client.Client) *Controller

NewController creates a new PrivateServiceSyncController

func (*Controller) Reconcile

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

Reconcile processes a CloudflareSyncState resource for PrivateService. Following Unified Sync Architecture: K8s Resources → Resource Controllers → Core Services → SyncState CRD → Sync Controllers → Cloudflare API

func (*Controller) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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