Conditions
Every Cloudflare-side custom resource this project owns reports status the same way: a fixed set of condition types, each carrying one of a fixed set of Reason strings. This page is the reference for both — see Status and Conditions for the “why” before the “what” below.
Condition types
Section titled “Condition types”- Accepted — the object’s spec is valid and admissible: every reference it names (a configuration, a zone, a target) resolves, and nothing about the spec itself is rejected.
- Synced — the last reconcile against the Cloudflare API succeeded: whatever this resource implies got written.
- Ready — the resulting Cloudflare-side resource is healthy and actually serving.
These are independent. Accepted=True, Synced=True, Ready=False is a real, meaningful state:
the spec was fine and the write succeeded, but what got written isn’t healthy yet — a
materially different signal from a spec that was rejected outright.
Every condition also carries observedGeneration, so you can tell whether a condition
reflects the object’s current spec or a stale one from before your last edit.
Reasons
Section titled “Reasons”The Reason string is what tells you why a condition has the status it does. This project
uses one fixed set of Reasons across every CRD — InvalidParameters means the same thing
whether you see it on a CloudflareTunnel or a CloudflareDNSRecord — though not every
Reason applies to every kind: TargetNotFound, for example, only ever appears on
policy-ancestor status (see Policy and ancestor status below).
Accepted
Section titled “Accepted”The positive outcome: whatever this condition is reporting on is fine. Nothing to do.
InvalidParameters
Section titled “InvalidParameters”A reference this object depends on — a configurationRef, parametersRef, or similar —
either doesn’t resolve, or resolves to something that itself isn’t in a usable state (for
example, a CloudflareGatewayConfiguration that isn’t Accepted, or one with the wrong
mode). The condition’s message names which reference. Fix the reference, or fix the object it
points at.
Conflicted
Section titled “Conflicted”Something else already claims the same slot: two GatewayClass objects naming the same
controller, two policies attaching to the same target under Gateway API’s own conflict
resolution, or two resources generating a DNS record for the same hostname. The condition’s
message names what it lost to. Only one of the colliding objects wins; the other reports
Conflicted until the collision is removed, or one side is renamed or retargeted.
A CloudflareAccessServiceToken reports Conflicted in two further cases, both distinct from
the “rename or retarget” fix above: its target Secret name already exists and isn’t owned by
this object (fix: rename the CloudflareAccessServiceToken or remove the conflicting Secret),
or the object is in an inconsistent recovery state — its Secret exists and is owned by it, but
no matching service token can be found at Cloudflare under this cluster’s marker (fix: delete
and recreate the object to mint a fresh token; the existing one can’t be recovered).
InvalidZone
Section titled “InvalidZone”The zone this object targets isn’t in the referenced configuration’s zone allowlist. Check
zoneAllowlist on the CloudflareGatewayConfiguration this object resolves to. A zone that
is in the allowlist but that the configured credential can’t actually see at the Cloudflare
API is a different case — it’s reported as CloudflareAPIError, not InvalidZone.
RateLimited
Section titled “RateLimited”A recent write to the Cloudflare API returned a rate-limit response. Nothing to do — the controller retries automatically with backoff, and the condition clears once the window passes. The condition message’s content depends on the underlying error: it isn’t guaranteed to include a specific retry-after window.
CloudflareAPIError
Section titled “CloudflareAPIError”The Cloudflare API rejected the last write with a terminal, non-retryable error, or the last write failed for a reason not covered by a more specific Reason above (for example, a zone the configured credential can’t see, even though it’s in the allowlist). The condition message includes Cloudflare’s own numeric error code and text where available — read it, it usually points straight at the problem (a permission the token lacks, a value Cloudflare itself rejected, and so on).
DriftDetected
Section titled “DriftDetected”The observed Cloudflare-side state no longer matches what this controller last wrote. Most
of the time this self-heals on the next reconcile: the controller re-applies its desired
state and the condition clears on its own. If it doesn’t clear, check whether a reference
this object depends on was repointed at a different Cloudflare account after the object was
first created (for example, a CloudflareTunnel’s configurationRef) — the Cloudflare-side
resource behind status.externalID is now unreachable under the new account, and that
specific case doesn’t self-heal. Delete and recreate the object in that case.
UnsupportedFeature
Section titled “UnsupportedFeature”The Gateway API feature or route type this object uses isn’t supported by the mode it’s
running in yet. See Supported Features for what is. It also
appears as a CloudflareAccessApplication’s Accepted/Synced/Ready Reason when the
hostname it targets can’t be protected by Access at all (for example, a route type Access
protection doesn’t support) — in that case the message names why.
CertificateCoverageInsufficient
Section titled “CertificateCoverageInsufficient”Reserved for a listener hostname needing certificate coverage the zone’s active certificate configuration doesn’t currently provide. This Reason is defined in the frozen enum but not currently emitted by any controller — nothing in this project sets it yet.
TargetNotFound
Section titled “TargetNotFound”A policy’s targetRef names an object that doesn’t exist in the policy’s namespace. This
Reason is scoped to policy-ancestor status only — see
Policy and ancestor status below for the full ancestor Reason
set. Fix the targetRef, or create the object it names.
AdoptionRefused
Section titled “AdoptionRefused”A pre-existing Cloudflare-side resource already matches what this object would create, and
adoption wasn’t explicitly requested. CloudflareTunnel and CloudflareDNSRecord both carry
a spec.adopt field — set it to true to adopt the existing resource instead of failing.
CloudflareAccessApplication has no such field and refuses adoption unconditionally; a
naming collision there needs to be resolved by renaming or removing one side.
Pending
Section titled “Pending”The object is waiting on external state this controller doesn’t produce itself. The most
common case is a DNS-mode CloudflareGatewayStatus with no usable address yet, because Envoy
Gateway (or its load-balancer implementation) hasn’t assigned one to the Gateway it
tracks — that case clears on its own once an address shows up. A CloudflareGatewayStatus
where no listener declares a hostname at all also reports Accepted=False/Pending — that’s
a spec problem, not something that resolves by waiting; fix the listener.
The other common case is a hostname whose Cloudflare Access application isn’t Ready yet,
where publishing was deliberately withheld until it is. The condition’s message names each
withheld hostname and its state — absent, pending, settling, blocked, rejected, or
ineffective. Only settling is time-bounded and reliably clears on its own; absent and
pending may also clear without help, but blocked, rejected, and ineffective do not —
those need a human to fix the underlying Access application. Read the message’s named
application and state before assuming waiting is the fix.
Which conditions each kind sets
Section titled “Which conditions each kind sets”| Kind | Conditions | Location | Notes |
|---|---|---|---|
CloudflareTunnel |
Accepted/Synced/Ready |
status.conditions |
— |
CloudflareDNSRecord |
Accepted/Synced/Ready |
status.conditions |
— |
CloudflareGatewayConfiguration |
Accepted/Synced/Ready |
status.conditions |
Synced/Ready always mirror Accepted — nothing to separately sync or serve for a configuration object |
CloudflareAccessApplication |
Accepted/Synced/Ready |
status.conditions |
On a transient Cloudflare API failure, Ready is deliberately left untouched rather than re-asserted, so its observedGeneration can lag behind the object’s current generation even after a real reconcile happened |
CloudflareAccessIdentityProvider |
Accepted/Synced/Ready |
status.conditions |
— |
CloudflareAccessServiceToken |
Accepted/Synced/Ready |
status.conditions |
— |
CloudflareGatewayStatus |
Accepted/Synced/Ready |
status.ancestors[0].conditions |
A controller-generated, per-Gateway singleton (see Status and Conditions) — always exactly one ancestor entry, carrying the full three-condition core inside it rather than Accepted alone |
CloudflareTunnelPolicy |
Accepted only |
status.ancestors[].conditions |
One entry per attached target; see Policy and ancestor status |
CloudflareAccessPolicy |
Accepted only |
status.ancestors[].conditions |
Same shape as CloudflareTunnelPolicy |
CloudflareTunnelPolicy and CloudflareAccessPolicy are the only two policy-attachment CRDs
this project has today.
GatewayClass, Gateway, HTTPRoute, GRPCRoute, TCPRoute, and TLSRoute are Gateway
API’s own types. This project publishes Gateway API’s own standard conditions on them
(Accepted, Programmed, ResolvedRefs, and so on), and a handful of the Reason strings
above do appear as the Reason string on those standard conditions — this project reuses its
own vocabulary rather than inventing a second one. Beyond Conflicted/InvalidParameters on
GatewayClass’s own Accepted condition, UnsupportedFeature is written directly as a
GRPCRoute/TCPRoute/TLSRoute’s status.parents[].conditions Accepted=False Reason when
the route uses a feature or protocol this project’s mode doesn’t support. The condition Type
itself always stays Gateway API’s standard one — this project never adds a new condition Type
to these objects.
Policy and ancestor status
Section titled “Policy and ancestor status”Policy kinds report through status.ancestors[], following Gateway API’s
PolicyAncestorStatus shape (ancestorRef, controllerName, conditions[]) rather than a
top-level status.conditions[] — one entry per object the policy attaches to. Each entry’s
conditions[] carries Accepted only: a policy has no Cloudflare-side resource of its own to
sync or check health on, so Synced/Ready have no meaning there. The Reason on that
Accepted condition comes from a narrower set than the full list above:
Accepted, Conflicted, TargetNotFound, InvalidParameters.
CloudflareGatewayStatus uses the same ancestors[] container for a different reason — it’s
a controller-generated per-Gateway singleton, always exactly one entry — and carries the full
Accepted/Synced/Ready core inside it, not Accepted alone.
Events
Section titled “Events”Not every condition transition produces a Kubernetes Event — only CloudflareTunnelPolicy
and CloudflareAccessPolicy emit an Event (Warning into any non-positive Reason, Normal
into Accepted) on a transition of their ancestor Accepted condition. CloudflareTunnel,
CloudflareDNSRecord, CloudflareGatewayConfiguration, and
CloudflareAccessIdentityProvider emit no condition-transition Events at all; check
status.conditions directly on those kinds rather than kubectl describe.
CloudflareAccessApplication emits Events for specific transitions named in the table below,
not for every condition change generically.
Beyond transition Events, a handful of Event reasons exist that aren’t condition Reasons at
all — they report something worth surfacing to kubectl describe/kubectl get events that
doesn’t correspond to a condition transition. This set isn’t frozen the way the condition
Reason enum above is.
| Event reason | What it means |
|---|---|
AccessProtectionApplicable |
An Access application became eligible to be applied to a route or hostname. |
AccessApplicationRecreated |
The Cloudflare-side Access application had to be recreated rather than updated in place. |
AccessProtectionExtended |
An HTTPRoute or GRPCRoute newly came under an Access application’s protection. Emitted on the affected route. |
AccessProtectionWithdrawn |
Access protection ended for an HTTPRoute or GRPCRoute that previously had it — the route is no longer gated by Access. Emitted on the affected route. |
AccessProtectionUnsupported |
A hostname transitioned into a state Access protection can’t apply to — the requested protection doesn’t fit the route/hostname combination it’s now attached to. |
AccessCarrierOrphanSwept |
A stale Access carrier with no remaining owner was cleaned up. |
AncestorStatusDropped |
A desired ancestor entry didn’t fit in a policy’s status.ancestors (capped at 16 entries) and was dropped. |
CarrierMigrationPending |
An Access carrier is mid-migration between two owning objects. |
ConfigRefUnresolved |
The owning Gateway’s configurationRef couldn’t be resolved, so no CloudflareAccessApplication could be generated for one of its hostnames this reconcile. |
CarrierOwnerConflict |
Two objects both claim ownership of the same Access carrier. |
NoHostnamesResolved |
A policy resolved to zero hostnames, so it has nothing to attach to. |
TargetDeclined |
A policy’s targetRef names an object this controller doesn’t manage (for example, a Gateway whose GatewayClass names a different controller) — not a conflict; a real conflict shows up as Conflicted in the ancestor status instead. |
ServiceTokenExpired |
A Cloudflare Access service token has expired. |
PassthroughProxiedForced |
A TLS-passthrough hostname’s proxied value was forced to false, overriding the configured default. |
AccessOrderingBypassed |
A DNS/route record was written before its associated Access protection, out of the normal ordering. |