When attempting to use the Hetzner example here, I get the following error:
Error from server (BadRequest): error when creating ".../clusterTemplateFromDocs.yaml": HCloudMachineTemplate in version "v1beta1" cannot be handled as a HCloudMachineTemplate: strict decoding error: unknown field "spec.imageName", unknown field "spec.sshKeys", unknown field "spec.type"
Looking at the reference docs for HCloudMachineTemplate, I edited it from
Now the kubectl apply succeeds but it's still broken:
% kubectl events --for machinedeployment/hetnzer-test-md
LAST SEEN TYPE REASON OBJECT MESSAGE
21m (x14 over 21m) Warning ReconcileError MachineDeployment/hetnzer-test-md failed to retrieve HCloudMachineTemplate external object "default"/"hetzner-test-mt": HCloudMachineTemplate.infrastructure.cluster.x-k8s.io "hetzner-test-mt" not found
11m (x11 over 11m) Warning ReconcileError MachineDeployment/hetnzer-test-md failed to retrieve HCloudMachineTemplate external object "default"/"hetzner-test-mt": HCloudMachineTemplate.infrastructure.cluster.x-k8s.io "hetzner-test-mt" not found
6m1s (x12 over 6m11s) Warning ReconcileError MachineDeployment/hetnzer-test-md failed to retrieve HCloudMachineTemplate external object "default"/"hetzner-test-mt": HCloudMachineTemplate.infrastructure.cluster.x-k8s.io "hetzner-test-mt" not found
5m49s (x4 over 5m49s) Warning ReconcileError MachineDeployment/hetnzer-test-md failed to retrieve HCloudMachineTemplate external object "default"/"hetzner-test-mt": HCloudMachineTemplate.infrastructure.cluster.x-k8s.io "hetzner-test-mt" not found
5m49s Warning ReconcileError MachineDeployment/hetnzer-test-md failed to retrieve K0sWorkerConfigTemplate external object "default"/"hetzner-test-machine-config": K0sWorkerConfigTemplate.bootstrap.cluster.x-k8s.io "hetzner-test-machine-config" not found
5m49s Normal SuccessfulCreate MachineDeployment/hetnzer-test-md Created MachineSet default/hetnzer-test-md-qmkv5
Looking at the hcloudmachinetemplate reveals a cryptic error
kubectl get hcloudmachinetemplate hetzner-test-mt
NAME IMAGE PLACEMENT GROUP TYPE REASON MESSAGE
hetzner-test-mt ubuntu-22.04 cx21 HetznerSecretUnreachable could not find HetznerSecret
When attempting to use the Hetzner example here, I get the following error:
Error from server (BadRequest): error when creating ".../clusterTemplateFromDocs.yaml": HCloudMachineTemplate in version "v1beta1" cannot be handled as a HCloudMachineTemplate: strict decoding error: unknown field "spec.imageName", unknown field "spec.sshKeys", unknown field "spec.type"
Looking at the reference docs for HCloudMachineTemplate, I edited it from
to
and I added the ssh key configuration to the
HetznerCluster
resource since from those docs it seems like that's where it goes:Now the
kubectl apply
succeeds but it's still broken:Looking at the hcloudmachinetemplate reveals a cryptic error
I don't see anything in the HCloudMachineTemplate docs about configuring a secret... let's dive into the source I guess? Looks like the hcloudmachinetemplate controller pulls secret info from the parent cluster: https://github.com/syself/cluster-api-provider-hetzner/blob/3498a49c7540c1f27b0f66f1bb76625120f74cc0/controllers/hcloudmachinetemplate_controller.go#L120-L124
And my parent cluster has a secret ref that appears to be correct:
So I'm officially stumped. Will also ask the caph folks if they have any insight.
Thanks for any tips you can provide.