ruleset

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ruleset provides sync controllers for managing Cloudflare Ruleset resources.

Index

Constants

View Source
const (

	// RedirectRuleFinalizerName is the finalizer for Redirect Rule SyncState resources.
	RedirectRuleFinalizerName = "redirectrule.sync.cloudflare-operator.io/finalizer"
)
View Source
const (
	// TransformRuleFinalizerName is the finalizer for Transform Rule SyncState resources.
	TransformRuleFinalizerName = "transformrule.sync.cloudflare-operator.io/finalizer"
)
View Source
const (
	// ZoneRulesetFinalizerName is the finalizer for Zone Ruleset SyncState resources.
	ZoneRulesetFinalizerName = "zoneruleset.sync.cloudflare-operator.io/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedRedirectRule added in v0.24.0

type AggregatedRedirectRule struct {
	// Zone is the domain name
	Zone string
	// Description is the ruleset description
	Description string
	// Rules is the aggregated list of expression-based redirect rules with ownership tracking
	Rules []RedirectRuleWithOwner
	// WildcardRules is the aggregated list of wildcard-based redirect rules with ownership tracking
	WildcardRules []WildcardRedirectRuleWithOwner
	// SourceCount is the number of sources that contributed
	SourceCount int
}

AggregatedRedirectRule contains merged rules from all sources.

type AggregatedTransformRule added in v0.24.0

type AggregatedTransformRule struct {
	// Zone is the domain name
	Zone string
	// Type is the transform rule type (url_rewrite, request_header, response_header)
	Type string
	// Description is the ruleset description
	Description string
	// Rules is the aggregated list of rules with ownership tracking
	Rules []TransformRuleWithOwner
	// SourceCount is the number of sources that contributed
	SourceCount int
}

AggregatedTransformRule contains merged rules from all sources.

type AggregatedZoneRuleset added in v0.24.0

type AggregatedZoneRuleset struct {
	// Zone is the domain name
	Zone string
	// Phase is the ruleset phase
	Phase string
	// Description is the ruleset description
	Description string
	// Rules is the aggregated list of rules with ownership tracking
	Rules []RuleWithOwner
	// SourceCount is the number of sources that contributed
	SourceCount int
}

AggregatedZoneRuleset contains merged rules from all sources.

type RedirectRuleController

type RedirectRuleController struct {
	*common.BaseSyncController
}

RedirectRuleController is the Sync Controller for Redirect Rule Configuration. It watches CloudflareSyncState resources of type RedirectRule, extracts the configuration, and syncs to Cloudflare API.

func NewRedirectRuleController

func NewRedirectRuleController(c client.Client) *RedirectRuleController

NewRedirectRuleController creates a new RedirectRuleSyncController

func (*RedirectRuleController) Reconcile

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

Reconcile processes a CloudflareSyncState resource for redirect rule.

func (*RedirectRuleController) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type RedirectRuleWithOwner added in v0.24.0

type RedirectRuleWithOwner struct {
	Rule  rulesetsvc.RedirectRuleDefinitionConfig
	Owner v1alpha2.SourceReference
}

RedirectRuleWithOwner contains a redirect rule with its owner information.

type RuleWithOwner added in v0.24.0

type RuleWithOwner struct {
	Rule  rulesetsvc.RulesetRuleConfig
	Owner v1alpha2.SourceReference
}

RuleWithOwner contains a rule with its owner information.

type TransformRuleController

type TransformRuleController struct {
	*common.BaseSyncController
}

TransformRuleController is the Sync Controller for Transform Rule Configuration. It watches CloudflareSyncState resources of type TransformRule, extracts the configuration, and syncs to Cloudflare API.

func NewTransformRuleController

func NewTransformRuleController(c client.Client) *TransformRuleController

NewTransformRuleController creates a new TransformRuleSyncController

func (*TransformRuleController) Reconcile

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

Reconcile processes a CloudflareSyncState resource for transform rule.

func (*TransformRuleController) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TransformRuleWithOwner added in v0.24.0

type TransformRuleWithOwner struct {
	Rule  rulesetsvc.TransformRuleDefinitionConfig
	Owner v1alpha2.SourceReference
}

TransformRuleWithOwner contains a transform rule with its owner information.

type WildcardRedirectRuleWithOwner added in v0.24.0

type WildcardRedirectRuleWithOwner struct {
	Rule  rulesetsvc.WildcardRedirectRuleConfig
	Owner v1alpha2.SourceReference
}

WildcardRedirectRuleWithOwner contains a wildcard redirect rule with its owner information.

type ZoneRulesetController

type ZoneRulesetController struct {
	*common.BaseSyncController
}

ZoneRulesetController is the Sync Controller for Zone Ruleset Configuration. It watches CloudflareSyncState resources of type ZoneRuleset, extracts the configuration, and syncs to Cloudflare API.

func NewZoneRulesetController

func NewZoneRulesetController(c client.Client) *ZoneRulesetController

NewZoneRulesetController creates a new ZoneRulesetSyncController

func (*ZoneRulesetController) Reconcile

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

Reconcile processes a CloudflareSyncState resource for zone ruleset.

func (*ZoneRulesetController) SetupWithManager

func (r *ZoneRulesetController) 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