Events¶
The controller records an event when something happens to an object, once per transition or occurrence rather than on every reconcile. Read them with:
Most Warning events repeat what a condition already says, at the moment it changed, and name the Job involved. Use them for the timeline: what happened first. The Events reference is the generated list; this page adds what to do.
Events expire; conditions do not
Kubernetes keeps events for a limited time (one hour by default), so the condition is the record to rely on. Messages never carry credentials, variable values, output values or raw stderr, and are cut at 512 bytes.
Warning events¶
| Reason | Emitted on | When | What to do | See |
|---|---|---|---|---|
ConditionChanged | TerraformCluster, TerraformMachine, TerraformMachinePool | Any other owned condition changed. It is a Warning when the condition enters its bad state, Normal otherwise. The note reads <Type>: <Status>/<Reason>: <message>. | Find the type and reason in the conditions table. | Conditions |
DestructivePlanBlocked | TerraformCluster, TerraformMachinePool | An apply stopped before a plan that deletes or replaces resources: a cluster apply, or a pool apply of a change of the cluster’s exports. Once per blocked Job, in place of JobFailed. | Review the plan summary in the condition and approve the TerraformPlan it names, or change the inputs. A blocked pool change is held while the pool keeps applying its last exports. | Destructive-plan guard |
DestroyInputsMismatch | TerraformCluster, TerraformMachine, TerraformMachinePool | A destroy renders inputs whose hash is not the state’s: an apply that failed partway, or no record carries the state’s hash. | Check the infrastructure once the destroy ran. | Which record a destroy renders |
DigestUnknown | TerraformCluster, TerraformMachine, TerraformMachinePool | No image digest is pinned, so an operation runs the spec’s image reference, or a Job succeeded without a readable digest. | Usually clears after the next successful apply. Pin the image by digest in the spec if you need it fixed. | Job inputs |
DriftDetected | TerraformCluster, TerraformMachine, TerraformMachinePool | A drift check found a difference. Once per finding. | Decide whether to accept it or remediate. | Drift |
ExportsNotPublished | TerraformCluster | The module’s exports exceed 64 KiB as compact JSON, so status.exports was cleared. | Shrink exports in the cluster module. Machines and pools keep reading exports from the state and are unaffected. | TerraformCluster status |
ExternallyManagedReleased | TerraformCluster, TerraformMachine, TerraformMachinePool | A deleting object carries cluster.x-k8s.io/managed-by: only CAPTF’s finalizer was removed. | Nothing: the external manager owns the state, Secrets and infrastructure. | Lifecycle |
ForceUnlocked | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job was started with a stale state lock to force-unlock: its holder pod no longer exists. | Nothing, unless it repeats. Frequent unlocks mean runners are being killed: check evictions and memory limits. | The state lock |
IdentityNotAllowed | TerraformCluster, TerraformMachine, TerraformMachinePool | IdentityAllowed entered False, whatever the reason: IdentityNotFound, NamespaceNotAllowed or SecretNotFound. Again when the reason or message changes. | Read the condition’s reason and fix it. | Identity runbook |
IdentitySecretNotFound | TerraformClusterIdentity | The identity’s credentials Secret went missing, or lacks a key listed in spec.requiredKeys. | Recreate the Secret at spec.secretRef, or add the missing keys. | Identity runbook |
ImageInspectFailed | TerraformMachineTemplate | The registry could not be read for the template’s capacity labels: a fetch or authentication failure, the egress policy (a non-public address, or a registry outside --image-inspect-allowed-registries) or an image config over 1 MiB. | Fix the image reference or the registry credentials. | Templates |
InstanceUnhealthy | TerraformCluster, TerraformMachine, TerraformMachinePool | InfrastructureHealthy became False for an unhealthy, degraded, stopped or terminated instance. | Look at the instance. Remediation can replace it. | Machine remediation |
JobDeadlineExceeded | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job hit activeDeadlineSeconds. Once per Job. | Raise the deadline or find what hangs. | Deadlines |
JobFailed | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job failed, or an apply or destroy could not start (ApplyJobSucceeded is False without a Job). Once per Job. | Read the condition and the Job’s logs. | Failing Jobs |
JobInterrupted | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job was stopped from outside: a drain, an eviction or a deletion. It retries without backoff. | Nothing, unless it repeats: find what keeps stopping the pod. | Retries |
OutputsInvalid | TerraformCluster, TerraformMachine, TerraformMachinePool | OutputsValid entered False: OutputsMissing, OutputsInvalid, FailureDomainMismatch or ProviderIDChanged. Again when the reason or message changes. | Fix the output named in the condition. | Module contract |
PlanChanged | TerraformCluster | An approved apply planned other changes and stopped before applying them. Once per such approved apply, for Manual and Destructive plans. | Review the new plan, if any, and approve it. | Manual plan approval |
RemediationRequested | TerraformMachine | The owner Machine was annotated with cluster.x-k8s.io/remediate-machine. Emitted only when the patch was made; on a write Conflict the Machine is re-read and decided once more. | Expected with a MachineHealthCheck. Check why the instance is unhealthy. | Machine remediation |
RetainedStateFound | TerraformCluster, TerraformMachine, TerraformMachinePool | A new object found Secrets retained from an earlier object of the same kind, namespace and name. It holds on them: no Job runs and nothing is owned or backed up. | Set spec.adoptRetainedState: true to adopt them, or delete the Secrets labeled captf.io/retained-from-uid to discard them. | A recreated object holds |
ReplicasManagedExternally | TerraformMachinePool | Valid autoscaler annotations, but another controller owns spec.replicas. | Pick one owner for the replicas. | Machine pools |
StateLocked | TerraformCluster, TerraformMachine, TerraformMachinePool | The state lock is held by something other than the object’s runner. | Release it with force-unlock once the holder is gone. | Stale lock |
StateLost | TerraformCluster, TerraformMachine, TerraformMachinePool | A provisioned object’s state is gone or carries no inputs hash, or an apply with an unconfirmed outcome may have left resources no state records (ApplyOutcomeUnknown). | Restore a backup, or confirm the apply created nothing with captf.io/confirm-no-resources. | Unreadable state |
StateRestoreFailed | TerraformCluster, TerraformMachine, TerraformMachinePool | A restore Job failed. It is not retried for the same serial. | Read the Job’s logs, then retry with a fresh annotation. | Other manual actions |
StateUnreadable | TerraformCluster, TerraformMachine, TerraformMachinePool | The state could not be read: corrupt, encrypted or inconsistent. | See the StateReadable reason. | Unreadable state |
ImagePullFallback | TerraformCluster, TerraformMachine, TerraformMachinePool | A destroy, refresh, drift or restore Job could not pull its module image for 2 minutes. It was deleted and the operation starts again on the next image (the applied tag, then spec.source.image). | Image pull failures | |
StuckJobDeleted | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job that could never start, because its per-run Secret was missing and no pod started, was deleted. It starts again. | Nothing, unless it repeats: check quota and API errors in the manager’s log. | Naming and adoption |
StepFailed | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | A runtime step failed. The note carries the runner’s curated summary, never raw stderr. Needs --runner-events. | Read the Job’s logs for the full output. | Failing Jobs |
RunFinished | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | The run ended. A Warning when it did not succeed: failed, interrupted, blocked before a destructive plan, or stopped because the approved plan changed. Needs --runner-events. | As for StepFailed. | Failing Jobs |
Informational events¶
These are Normal and need no action. They are the record of what the controller did.
| Reason | Emitted on | Meaning | See |
|---|---|---|---|
JobCreated | TerraformCluster, TerraformMachine, TerraformMachinePool | A Job started: op, attempt, image and why, and whether it falls back to another image. | Jobs |
JobSucceeded | TerraformCluster, TerraformMachine, TerraformMachinePool | An apply, destroy, refresh or drift Job succeeded. | Jobs |
WaitingForRunLease | TerraformCluster, TerraformMachine, TerraformMachinePool | An operation waits for the run lease. Once per wait. | Leases |
WaitingForJobSlot | TerraformCluster, TerraformMachine, TerraformMachinePool | An operation waits for a Job slot. Once per wait. | Job limits |
WaitingForClusterOperation | TerraformMachine, TerraformMachinePool | An operation waits for its cluster’s. | Leases |
WaitingForMachineOperations | TerraformCluster | An operation waits for its machines’ and pools’. | Leases |
PlanReady | TerraformCluster | A Manual TerraformPlan was created: its name, counts and the approve command. Also when the plan changes nothing and the apply runs without an approval. | Manual plan approval |
PlanApproved | TerraformCluster, TerraformMachinePool | Bookkeeping first saw an approval on a TerraformPlan of the target, with approvedBy. | Operating the gates |
PlanApplied | TerraformCluster, TerraformMachinePool | The apply of an approved plan succeeded; the plan is Applied. | Operating the gates |
PlanSuperseded | TerraformCluster, TerraformMachinePool | A plan was superseded by a newer plan or became moot. A Warning when it had been approved. | Operating the gates |
DeletionStarted | TerraformCluster, TerraformMachine, TerraformMachinePool | The first reconcile with a deletion timestamp. | Deletion and Teardown |
Destroyed | TerraformCluster, TerraformMachine, TerraformMachinePool | The destroy succeeded and cleanup ran. | Cleanup |
FinalizerRemoved | TerraformCluster, TerraformMachine, TerraformMachinePool | The finalizer was removed: after a destroy, with no state, or without an owner. | Order and finalizers |
InfrastructureRetained | TerraformCluster, TerraformMachine, TerraformMachinePool | A deletion with spec.deletionPolicy: Retain ended without a destroy. The note says how many state, backup and inputs Secrets (durable and applied, usually 2) were kept and the captf.io/retained-from-uid label. The infrastructure keeps running. | What Retain keeps |
RetainedStateAdopted | TerraformCluster, TerraformMachine, TerraformMachinePool | spec.adoptRetainedState: true made the object remove the captf.io/retained-from-uid label from retained Secrets. It owns them from the next reconcile. | Adopting retained state |
Paused | TerraformCluster, TerraformMachine, TerraformMachinePool | The Paused condition became True. | Order and finalizers |
Resumed | TerraformCluster, TerraformMachine, TerraformMachinePool | The Paused condition became False again. | Lifecycle |
Provisioned | TerraformCluster, TerraformMachine, TerraformMachinePool | status.initialization.provisioned latched true. | Lifecycle |
ProviderIDSet | TerraformMachine, TerraformMachinePool | spec.providerID was written. | Machine role |
ControlPlaneEndpointSet | TerraformCluster | spec.controlPlaneEndpoint was written from the module output. | Cluster role |
FailureDomainsChanged | TerraformCluster | status.failureDomains changed. | Cluster role |
InputsChanged | TerraformCluster, TerraformMachine, TerraformMachinePool | The inputs hash differs from the state’s and an apply starts. | Choosing the operation |
DigestPinned | TerraformCluster, TerraformMachine, TerraformMachinePool | A successful apply’s image digest was recorded with its inputs on the applied Secret: a new digest, or one that differs from the previous apply’s. | Job inputs |
AppliedInputsUnknown | TerraformCluster, TerraformMachine, TerraformMachinePool | An apply succeeded, but its inputs were no longer on the per-run Secret or the attempt record, so the applied record kept an older apply’s inputs. | Job inputs |
StateAdopted | TerraformCluster, TerraformMachine, TerraformMachinePool | The state a successful apply wrote was adopted with its inputs hash (or, after a restore of a backup taken without one, with none, so the state no longer shows a completed apply). | Terraform State |
StateBackedUp | TerraformCluster, TerraformMachine, TerraformMachinePool | A new state serial was copied into a backup. | Backups |
StateRestored | TerraformCluster, TerraformMachine, TerraformMachinePool | A restore Job pushed a backup and the annotation was removed. | State restore |
DriftResolved | TerraformCluster, TerraformMachine, TerraformMachinePool | DriftDetected went from True to False. | Drift |
DriftRemediationStarted | TerraformCluster, TerraformMachine, TerraformMachinePool | An apply remediating drift started. | Drift |
InstanceHealthy | TerraformCluster, TerraformMachine, TerraformMachinePool | InfrastructureHealthy became True. | Drift and health |
RemediationWithdrawn | TerraformMachine | The instance read healthy again and the remediation annotation was removed. | Machine remediation |
ReplicasWrittenBack | TerraformMachinePool | An autoscaled pool’s observed replicas were written to MachinePool.spec.replicas. | Machine pools |
IdentitySecretFound | TerraformClusterIdentity | The credentials Secret appeared. | Identities |
MirrorCreated | TerraformCluster, TerraformMachine, TerraformMachinePool | The namespace’s credential mirror was created for this object. | Identities |
OwnerReferencesRepaired | TerraformCluster, TerraformMachine, TerraformMachinePool | Secrets of this object (state, backups, durable inputs, plan key, its mirror entry) were owned by it again after a restore, or because a chunk had no owner reference. | State adoption |
MirrorRemoved | TerraformCluster, TerraformMachine, TerraformMachinePool | The mirror was deleted: its last user went, the identity no longer allows the namespace, or the identity was deleted. | Cleanup |
CapacityResolved | TerraformMachineTemplate | A template’s capacity or node info changed from its image labels. | Templates |
RunStarted | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | The runtime is ready and the first step is about to run. | Job Environment |
StepStarted | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | A runtime step started. | Job Environment |
StepSucceeded | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | A runtime step finished. | Job Environment |
PlanSummary | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | A plan the runner parsed: counts only. | Job Environment |
ResourcesChanged | TerraformCluster, TerraformMachine, TerraformMachinePool (runner) | What an apply or destroy step changed: counts only. | Job Environment |