Skip to content

Commit 06e3d78

Browse files
committed
rephase words in comments
1 parent c3e6961 commit 06e3d78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

controllers/cloudstackmachine_controller.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ import (
4242
)
4343

4444
var (
45-
hostnameMatcher = regexp.MustCompile(`\{\{\s*ds\.meta_data\.hostname\s*\}\}`)
46-
failuredomainMatcher = regexp.MustCompile(`\{\{\s*ds\.meta_data\.failuredomain\s*\}\}`)
45+
hostnameMatcher = regexp.MustCompile(`\{\{\s*ds\.meta_data\.hostname\s*\}\}`)
46+
failuredomainMatcher = regexp.MustCompile(`\{\{\s*ds\.meta_data\.failuredomain\s*\}\}`)
4747
)
48+
4849
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines,verbs=get;list;watch;create;update;patch;delete
4950
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines/status,verbs=get;update;patch
5051
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines/finalizers,verbs=update
@@ -186,7 +187,7 @@ func (r *CloudStackMachineReconciliationRunner) GetOrCreateVMInstance() (retRes
186187
}
187188

188189
func processUserData(data []byte, r *CloudStackMachineReconciliationRunner) string {
189-
// since cloudstack metadata does not allow custom data added into meta_data, following line is a hack to specify a hostname name
190+
// since cloudstack metadata does not allow custom data added into meta_data, following line is a walkaround to specify a hostname name
190191
// {{ ds.meta_data.hostname }} is expected to be used as a name when kubelet register a node
191192
// if more custom data needed to injected, this can be refactored into a method -- processCustomMetadata()
192193
userData := hostnameMatcher.ReplaceAllString(string(data), r.CAPIMachine.Name)

0 commit comments

Comments
 (0)