What steps did you take and what happened:
When Status.Capacity is not set, the HCloudMachineTemplate controller computes it by listing the hcloud server types and looking for the one named in spec.template.spec.type. If no server type matches, getCapacity returns an error (machinetemplate.go#L88-L89):
failed to reconcile machine template for HCloudMachineTemplate xxx: failed to get capacity: failed to find server type for cpx53
The controller treats this like any other reconcile failure. It sets the Available condition to False with the reason InternalError and returns the error (hcloudmachinetemplate_controller.go#L241-L248), so the reconcile is logged at error level and retried with exponential backoff. A missing server type is not an internal error. The type can be misspelled in the spec, or it can be a type that hcloud does not temporarily offer, and either way the operator sees only InternalError while the real cause repeats in the logs on every retry.
What should happen:
Record the missing server type in the Available condition with the reason ServerTypeNotFound, and stop returning the error so it is no longer logged as a failure or retried with backoff.
Rely on CAPH restarts to recheck the type instead of requeuing on a fixed interval. CAPH reconciles every HCloudMachineTemplate again when it restarts, and it restarts regularly (for example on upgrades and rollouts or manually), so a server type that hcloud starts offering again is picked up on the next restart. A type that was misspelled is fixed by editing the spec, which reconciles on its own. So the reconcile can set the condition and return, without polling for the type.
What steps did you take and what happened:
When
Status.Capacityis not set, the HCloudMachineTemplate controller computes it by listing the hcloud server types and looking for the one named inspec.template.spec.type. If no server type matches,getCapacityreturns an error (machinetemplate.go#L88-L89):The controller treats this like any other reconcile failure. It sets the
Availablecondition to False with the reasonInternalErrorand returns the error (hcloudmachinetemplate_controller.go#L241-L248), so the reconcile is logged at error level and retried with exponential backoff. A missing server type is not an internal error. The type can be misspelled in the spec, or it can be a type that hcloud does not temporarily offer, and either way the operator sees onlyInternalErrorwhile the real cause repeats in the logs on every retry.What should happen:
Record the missing server type in the
Availablecondition with the reasonServerTypeNotFound, and stop returning the error so it is no longer logged as a failure or retried with backoff.Rely on CAPH restarts to recheck the type instead of requeuing on a fixed interval. CAPH reconciles every HCloudMachineTemplate again when it restarts, and it restarts regularly (for example on upgrades and rollouts or manually), so a server type that hcloud starts offering again is picked up on the next restart. A type that was misspelled is fixed by editing the spec, which reconciles on its own. So the reconcile can set the condition and return, without polling for the type.