You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/caph/03-reference/06-hetzner-bare-metal-machine-template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Via MatchLabels you can specify a certain label (key and value) that identifies
78
78
|`template.spec.sshSpec.secretRef.key.name`|`string`|| yes | Name is the key in the secret's data where the SSH key's name is stored |
79
79
|`template.spec.sshSpec.secretRef.key.publicKey`|`string`|| yes | PublicKey is the key in the secret's data where the SSH key's public key is stored |
80
80
|`template.spec.sshSpec.secretRef.key.privateKey`|`string`|| yes | PrivateKey is the key in the secret's data where the SSH key's private key is stored |
81
-
|`template.spec.sshSpec.portAfterInstallImage`|`int`|`22`| no | PortAfterInstallImage specifies the port that can be used to reach the server via SSH after install image completed successfully |
81
+
|`template.spec.sshSpec.portAfterInstallImage`|`int`|`22`| no | PortAfterInstallImage specifies the port that can be used to reach the server via SSH after install image completed successfully. If `--baremetal-ssh-after-install-image=false` is set, then this value will never be used.|
82
82
|`template.spec.sshSpec.portAfterCloudInit`|`int`|`22` (install image port) | no | PortAfterCloudInit specifies the port that can be used to reach the server via SSH after cloud init completed successfully. Deprecated. Since [PR Install Cloud-Init-Data via post-install.sh #1407](https://github.com/syself/cluster-api-provider-hetzner/pull/1407) this field is not functional. |
Copy file name to clipboardExpand all lines: main.go
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,7 @@ var (
87
87
preProvisionCommandstring
88
88
imageURLCommandstring
89
89
skipWebhooksbool
90
+
sshAfterInstallImagebool
90
91
)
91
92
92
93
funcmain() {
@@ -109,6 +110,8 @@ func main() {
109
110
fs.StringVar(&preProvisionCommand, "pre-provision-command", "", "Command to run (in rescue-system) before installing the image on bare metal servers. You can use that to check if the machine is healthy before installing the image. If the exit value is non-zero, the machine is considered unhealthy. This command must be accessible by the controller pod. You can use an initContainer to copy the command to a shared emptyDir.")
110
111
fs.StringVar(&imageURLCommand, "hcloud-image-url-command", "", "Command to run (in rescue-system) to provision an hcloud machine. The command will get the imageURL, bootstrap-data and machine-name of the corresponding hcloudmachine as argument. It is up to the command to download from that URL and provision the disk accordingly. This command must be accessible by the controller pod. You can use an initContainer to copy the command to a shared emptyDir. The env var OCI_REGISTRY_AUTH_TOKEN from the caph process will be set for the command, too. The command must end with the last line containing IMAGE_URL_DONE. Otherwise the execution is considered to have failed. Docs: https://syself.com/docs/caph/developers/image-url-command")
111
112
fs.BoolVar(&skipWebhooks, "skip-webhooks", false, "Skip setting up of webhooks. Together with --leader-elect=false, you can use `go run main.go` to run CAPH in a cluster connected via KUBECONFIG. You should scale down the caph deployment to 0 before doing that. This is only for testing!")
113
+
fs.BoolVar(&sshAfterInstallImage, "baremetal-ssh-after-install-image", true, "Connect to the baremetal machine after install-image and ensure it is provisioned. Current default is true, but we might change that to false. Background: Users might not want the controller to be able to ssh onto the servers")
0 commit comments