Documentation
¶
Overview ¶
Package ruleset provides sync controllers for managing Cloudflare Ruleset resources.
Index ¶
- Constants
- type AggregatedRedirectRule
- type AggregatedTransformRule
- type AggregatedZoneRuleset
- type PhaseConflict
- type RedirectRuleController
- type RedirectRuleWithOwner
- type RuleWithOwner
- type TransformRuleController
- type TransformRuleWithOwner
- type WildcardExpressionOptions
- type WildcardRedirectRuleWithOwner
- type ZoneRulesetController
Constants ¶
const (
// RedirectRuleFinalizerName is the finalizer for Redirect Rule SyncState resources.
RedirectRuleFinalizerName = "redirectrule.sync.cloudflare-operator.io/finalizer"
)
const (
// TransformRuleFinalizerName is the finalizer for Transform Rule SyncState resources.
TransformRuleFinalizerName = "transformrule.sync.cloudflare-operator.io/finalizer"
)
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
// PhaseConflicts tracks sources that have different phases than the first source
// These conflicts should be logged as warnings
PhaseConflicts []PhaseConflict
}
AggregatedZoneRuleset contains merged rules from all sources.
type PhaseConflict ¶ added in v0.25.0
type PhaseConflict struct {
// Source is the source with the conflicting phase
Source v1alpha2.SourceReference
// ExpectedPhase is the phase from the first source
ExpectedPhase string
// ActualPhase is the phase from this source
ActualPhase string
}
PhaseConflict represents a phase mismatch between 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 WildcardExpressionOptions ¶ added in v0.25.0
type WildcardExpressionOptions struct {
// IncludeSubdomains matches both the domain and its subdomains
IncludeSubdomains bool
// SubpathMatching appends /* if the pattern doesn't end with a wildcard
SubpathMatching bool
}
WildcardExpressionOptions contains options for building wildcard expressions.
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.