Skip to content

Commit dec7bfe

Browse files
committed
wording.
1 parent 0e3c069 commit dec7bfe

6 files changed

+31
-27
lines changed

api/v1beta1/hetznerbaremetalmachine_types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ const (
6767

6868
// HetznerBareMetalMachineSpec defines the desired state of HetznerBareMetalMachine.
6969
type HetznerBareMetalMachineSpec struct {
70-
// ProviderID will be the hetznerbaremetalmachine which is set by the controller in the
71-
// `hrobot://<server-id>` format. Before caph v1.1.0 the ProviderID had the format
72-
// `hcloud://bm-NNNNN`. Starting with caph v1.1.x this was changed to `hrobot://NNNNN`. This
73-
// aligns to the upstream hcloud ccm. In the long run we want to discontinue our ccm fork. After
74-
// the ProviderID was set once, it never changes. It is safe to update the ccm in a running
75-
// workload-cluster. Only new nodes will get the new format.
70+
// ProviderID is set by the controller in the `hrobot://<server-id>` format. Before CAPH v1.1.0
71+
// the ProviderID had the format `hcloud://bm-NNNNN`. Starting with CAPH v1.1.0 this was changed
72+
// to `hrobot://NNNNN`. This aligns with the upstream hcloud CCM. In the long run we want to
73+
// discontinue our CCM fork. After the ProviderID was set once, it never changes. It is safe to
74+
// update the CCM in a running workload-cluster. Only new nodes will get the new format.
7675
//
7776
// +optional
7877
ProviderID *string `json:"providerID,omitempty"`

config/crd/bases/infrastructure.cluster.x-k8s.io_hetznerbaremetalmachines.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,11 @@ spec:
254254
type: object
255255
providerID:
256256
description: |-
257-
ProviderID will be the hetznerbaremetalmachine which is set by the controller in the
258-
`hrobot://<server-id>` format. Before caph v1.1.0 the ProviderID had the format
259-
`hcloud://bm-NNNNN`. Starting with caph v1.1.x this was changed to `hrobot://NNNNN`. This
260-
aligns to the upstream hcloud ccm. In the long run we want to discontinue our ccm fork. After
261-
the ProviderID was set once, it never changes. It is safe to update the ccm in a running
262-
workload-cluster. Only new nodes will get the new format.
257+
ProviderID is set by the controller in the `hrobot://<server-id>` format. Before CAPH v1.1.0
258+
the ProviderID had the format `hcloud://bm-NNNNN`. Starting with CAPH v1.1.0 this was changed
259+
to `hrobot://NNNNN`. This aligns with the upstream hcloud CCM. In the long run we want to
260+
discontinue our CCM fork. After the ProviderID was set once, it never changes. It is safe to
261+
update the CCM in a running workload-cluster. Only new nodes will get the new format.
263262
type: string
264263
sshSpec:
265264
description: SSHSpec gives a reference on the secret where SSH details

config/crd/bases/infrastructure.cluster.x-k8s.io_hetznerbaremetalmachinetemplates.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,11 @@ spec:
241241
type: object
242242
providerID:
243243
description: |-
244-
ProviderID will be the hetznerbaremetalmachine which is set by the controller in the
245-
`hrobot://<server-id>` format. Before caph v1.1.0 the ProviderID had the format
246-
`hcloud://bm-NNNNN`. Starting with caph v1.1.x this was changed to `hrobot://NNNNN`. This
247-
aligns to the upstream hcloud ccm. In the long run we want to discontinue our ccm fork. After
248-
the ProviderID was set once, it never changes. It is safe to update the ccm in a running
249-
workload-cluster. Only new nodes will get the new format.
244+
ProviderID is set by the controller in the `hrobot://<server-id>` format. Before CAPH v1.1.0
245+
the ProviderID had the format `hcloud://bm-NNNNN`. Starting with CAPH v1.1.0 this was changed
246+
to `hrobot://NNNNN`. This aligns with the upstream hcloud CCM. In the long run we want to
247+
discontinue our CCM fork. After the ProviderID was set once, it never changes. It is safe to
248+
update the CCM in a running workload-cluster. Only new nodes will get the new format.
250249
type: string
251250
sshSpec:
252251
description: SSHSpec gives a reference on the secret where

config/crd/bases/infrastructure.cluster.x-k8s.io_hetznerclusters.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,17 @@ spec:
266266
type: string
267267
type: object
268268
name:
269-
default: hetzner
269+
default: hcloud
270270
description: |-
271271
Name defines the name of the secret. The name gets used for reading the credential in the
272272
mgt-cluster, and it gets used for creating a secret in the wl-cluster. About the secret in
273273
the wl-cluster: Attention, the upstream hcloud-ccm helm chart expects the name to be
274-
"hcloud". The Syself ccm defaults to "hetzner". The secret will be created in the namespace
275-
"mgt-system" of the workload-cluster. Set `spec.skipCreatingHetznerSecretInWorkloadCluster`,
276-
if you don't want that secret in the wl-cluster to be created.
274+
"hcloud". The Syself ccm defaults to "hetzner". For compatibilty with upstream hcloud-ccm the
275+
controller creates two secrets, if the name is different from "hcloud" (one with name
276+
"hcloud", one with name being the value of this setting). The secret will be created in the
277+
namespace "mgt-system" of the workload-cluster. Set
278+
`spec.skipCreatingHetznerSecretInWorkloadCluster`, if you don't want that secret in the
279+
wl-cluster to be created.
277280
type: string
278281
required:
279282
- key

config/crd/bases/infrastructure.cluster.x-k8s.io_hetznerclustertemplates.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,17 @@ spec:
297297
type: string
298298
type: object
299299
name:
300-
default: hetzner
300+
default: hcloud
301301
description: |-
302302
Name defines the name of the secret. The name gets used for reading the credential in the
303303
mgt-cluster, and it gets used for creating a secret in the wl-cluster. About the secret in
304304
the wl-cluster: Attention, the upstream hcloud-ccm helm chart expects the name to be
305-
"hcloud". The Syself ccm defaults to "hetzner". The secret will be created in the namespace
306-
"mgt-system" of the workload-cluster. Set `spec.skipCreatingHetznerSecretInWorkloadCluster`,
307-
if you don't want that secret in the wl-cluster to be created.
305+
"hcloud". The Syself ccm defaults to "hetzner". For compatibilty with upstream hcloud-ccm the
306+
controller creates two secrets, if the name is different from "hcloud" (one with name
307+
"hcloud", one with name being the value of this setting). The secret will be created in the
308+
namespace "mgt-system" of the workload-cluster. Set
309+
`spec.skipCreatingHetznerSecretInWorkloadCluster`, if you don't want that secret in the
310+
wl-cluster to be created.
308311
type: string
309312
required:
310313
- key

pkg/services/hcloud/util/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ func ProviderIDFromServerID(serverID int) string {
4545
return fmt.Sprintf("%s%v", providerIDPrefix, serverID)
4646
}
4747

48-
// ServerIDFromProviderID returns the serverID from a providerID.
48+
// ServerIDFromProviderID returns the serverID from a providerID. This is used for hcloud machines
49+
// only. The format must be "hcloud://NNN".
4950
func ServerIDFromProviderID(providerID *string) (int64, error) {
5051
if providerID == nil {
5152
return 0, ErrNilProviderID

0 commit comments

Comments
 (0)