File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ import (
42
42
)
43
43
44
44
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*\}\}` )
47
47
)
48
+
48
49
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines,verbs=get;list;watch;create;update;patch;delete
49
50
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines/status,verbs=get;update;patch
50
51
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=cloudstackmachines/finalizers,verbs=update
@@ -186,7 +187,7 @@ func (r *CloudStackMachineReconciliationRunner) GetOrCreateVMInstance() (retRes
186
187
}
187
188
188
189
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
190
191
// {{ ds.meta_data.hostname }} is expected to be used as a name when kubelet register a node
191
192
// if more custom data needed to injected, this can be refactored into a method -- processCustomMetadata()
192
193
userData := hostnameMatcher .ReplaceAllString (string (data ), r .CAPIMachine .Name )
You can’t perform that action at this time.
0 commit comments