pagesdeployment

package
v0.49.0 Latest Latest
Warning

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

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

Documentation

Overview

Package pagesdeployment implements the Controller for PagesDeployment CRD. This controller directly calls Cloudflare API and writes status back to CRD, following the simplified 3-layer architecture (CRD → Controller → CF API).

Index

Constants

View Source
const (
	FinalizerName = "pagesdeployment.networking.cloudflare-operator.io/finalizer"

	// AnnotationForceRedeploy is the annotation key to force a new deployment.
	// When this annotation value changes, a new deployment will be triggered
	// even if the spec hasn't changed. This is useful for re-deploying the
	// same configuration.
	AnnotationForceRedeploy = "cloudflare-operator.io/force-redeploy"

	// AnnotationLastForceRedeploy stores the last processed force-redeploy value
	AnnotationLastForceRedeploy = "cloudflare-operator.io/last-force-redeploy"

	// AnnotationAutoRetry enables automatic retry for transient failures.
	// Set to "true" to enable, "false" or absent to disable.
	// When enabled, transient failures (e.g., Cloudflare platform issues) will be automatically retried.
	AnnotationAutoRetry = "cloudflare-operator.io/auto-retry"

	// AnnotationRetryCount tracks the current retry count for automatic retries.
	// This is managed internally by the controller.
	AnnotationRetryCount = "cloudflare-operator.io/retry-count"

	// AnnotationLastFailedAt stores the timestamp of the last failure.
	// Used for exponential backoff calculations.
	AnnotationLastFailedAt = "cloudflare-operator.io/last-failed-at"

	// AnnotationFailureReason stores the categorized failure reason.
	// Values: "transient", "permanent", "unknown"
	AnnotationFailureReason = "cloudflare-operator.io/failure-reason"

	// EventReasonProductionConflict indicates another production deployment exists
	EventReasonProductionConflict = "ProductionConflict"
	// EventReasonProductionProtected indicates production deletion is blocked
	EventReasonProductionProtected = "ProductionProtected"
	// EventReasonDeprecationWarning indicates deprecated fields are being used
	EventReasonDeprecationWarning = "DeprecationWarning"
	// EventReasonDeploymentCreated indicates a new deployment was created
	EventReasonDeploymentCreated = "DeploymentCreated"
	// EventReasonDeploymentPolling indicates polling deployment status
	EventReasonDeploymentPolling = "DeploymentPolling"
	// EventReasonDeploymentSucceeded indicates deployment succeeded
	EventReasonDeploymentSucceeded = "DeploymentSucceeded"
	// EventReasonDeploymentFailed indicates deployment failed
	EventReasonDeploymentFailed = "DeploymentFailed"
	// EventReasonDeploymentRetrying indicates deployment is being retried
	EventReasonDeploymentRetrying = "DeploymentRetrying"

	// PollingInterval is the interval for polling in-progress deployments
	PollingInterval = 30 * time.Second

	// MaxAutoRetries is the maximum number of automatic retries for transient failures
	MaxAutoRetries = 3

	// BaseRetryDelay is the base delay for exponential backoff (doubles each retry)
	BaseRetryDelay = 30 * time.Second

	// MaxRetryDelay is the maximum delay between retries
	MaxRetryDelay = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PagesDeploymentReconciler

type PagesDeploymentReconciler struct {
	client.Client
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	APIFactory *common.APIClientFactory
}

PagesDeploymentReconciler reconciles a PagesDeployment object. It directly calls Cloudflare API and writes status back to CRD, following the simplified 3-layer architecture.

func (*PagesDeploymentReconciler) Reconcile

func (*PagesDeploymentReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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