Skip to content

Commit b9dda69

Browse files
author
Anna Blendermann
committed
Remove vmAffinity feature from 2.6
1 parent cacf302 commit b9dda69

6 files changed

Lines changed: 1 addition & 31 deletions

docs/resources/machine_config_v2.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ page_title: "rancher2_machine_config_v2 Resource"
66

77
Provides a Rancher v2 Machine config v2 resource. This can be used to create Machine Config v2 for Rancher v2 and retrieve their information. This resource is available from Rancher v2.6.0 and above.
88

9-
`amazonec2`, `azure`, `digitalocean`, `harvester`, `linode`, `openstack`, and `vsphere` cloud providers are supported for machine config V2
9+
`amazonec2`, `azure`, `digitalocean`, `linode`, `openstack`, and `vsphere` cloud providers are supported for machine config V2
1010

1111
**Note** This resource is used by
1212

@@ -196,7 +196,6 @@ The following attributes are exported:
196196
* `network_model` - (Optional) Network model, Default `virtio` (string)
197197
* `user_data` - (Optional) UserData content of cloud-init, base64 is supported (string)
198198
* `network_data` - (Optional) NetworkData content of cloud-init, base64 is supported (string)
199-
* `vm_affinity` - (Optional) Virtual machine affinity, base64 is supported. For Rancher v2.6.7 or above (string)
200199

201200
### `linode_config`
202201

docs/resources/node_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ The following attributes are exported:
264264
* `network_model` - (Optional) Network model, Default `virtio` (string)
265265
* `user_data` - (Optional) UserData content of cloud-init, base64 is supported (string)
266266
* `network_data` - (Optional) NetworkData content of cloud-init, base64 is supported (string)
267-
* `vm_affinity` - (Optional) Virtual machine affinity, base64 is supported. For Rancher v2.6.7 or above (string)
268267

269268
### `hetzner_config`
270269

rancher2/schema_machine_config_v2_harvester.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ func machineConfigV2HarvesterFields() map[string]*schema.Schema {
1414
Required: true,
1515
Description: "Virtual machine namespace",
1616
},
17-
"vm_affinity": {
18-
Type: schema.TypeString,
19-
Optional: true,
20-
Description: "VM affinity, base64 is supported",
21-
},
2217
"cpu_count": {
2318
Type: schema.TypeString,
2419
Optional: true,

rancher2/schema_node_template_harvester.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const (
2424

2525
type harvesterConfig struct {
2626
VMNamespace string `json:"vmNamespace,omitempty" yaml:"vmNamespace,omitempty"`
27-
VMAffinity string `json:"vmAffinity,omitempty" yaml:"vmAffinity,omitempty"`
2827
CPUCount string `json:"cpuCount,omitempty" yaml:"cpuCount,omitempty"`
2928
MemorySize string `json:"memorySize,omitempty" yaml:"memorySize,omitempty"`
3029
DiskSize string `json:"diskSize,omitempty" yaml:"diskSize,omitempty"`
@@ -47,11 +46,6 @@ func harvesterConfigFields() map[string]*schema.Schema {
4746
Required: true,
4847
Description: "Virtual machine namespace",
4948
},
50-
"vm_affinity": {
51-
Type: schema.TypeString,
52-
Optional: true,
53-
Description: "VM affinity, base64 is supported",
54-
},
5549
"cpu_count": {
5650
Type: schema.TypeString,
5751
Optional: true,

rancher2/structure_machine_config_v2_harvester.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type machineConfigV2Harvester struct {
1818
metav1.TypeMeta `json:",inline"`
1919
metav1.ObjectMeta `json:"metadata,omitempty"`
2020
VMNamespace string `json:"vmNamespace,omitempty" yaml:"vmNamespace,omitempty"`
21-
VMAffinity string `json:"vmAffinity,omitempty" yaml:"vmAffinity,omitempty"`
2221
CPUCount string `json:"cpuCount,omitempty" yaml:"cpuCount,omitempty"`
2322
MemorySize string `json:"memorySize,omitempty" yaml:"memorySize,omitempty"`
2423
DiskSize string `json:"diskSize,omitempty" yaml:"diskSize,omitempty"`
@@ -50,10 +49,6 @@ func flattenMachineConfigV2Harvester(in *MachineConfigV2Harvester) []interface{}
5049
obj["vm_namespace"] = in.VMNamespace
5150
}
5251

53-
if len(in.VMAffinity) > 0 {
54-
obj["vm_affinity"] = in.VMAffinity
55-
}
56-
5752
if len(in.CPUCount) > 0 {
5853
obj["cpu_count"] = in.CPUCount
5954
}
@@ -123,10 +118,6 @@ func expandMachineConfigV2Harvester(p []interface{}, source *MachineConfigV2) *M
123118
obj.VMNamespace = v
124119
}
125120

126-
if v, ok := in["vm_affinity"].(string); ok && len(v) > 0 {
127-
obj.VMAffinity = v
128-
}
129-
130121
if v, ok := in["cpu_count"].(string); ok && len(v) > 0 {
131122
obj.CPUCount = v
132123
}

rancher2/structure_node_template_harvester.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ func flattenHarvesterConfig(in *harvesterConfig) []interface{} {
1212
obj["vm_namespace"] = in.VMNamespace
1313
}
1414

15-
if len(in.VMAffinity) > 0 {
16-
obj["vm_affinity"] = in.VMAffinity
17-
}
18-
1915
if len(in.CPUCount) > 0 {
2016
obj["cpu_count"] = in.CPUCount
2117
}
@@ -76,10 +72,6 @@ func expandHarvestercloudConfig(p []interface{}) *harvesterConfig {
7672
obj.VMNamespace = v
7773
}
7874

79-
if v, ok := in["vm_affinity"].(string); ok && len(v) > 0 {
80-
obj.VMAffinity = v
81-
}
82-
8375
if v, ok := in["cpu_count"].(string); ok && len(v) > 0 {
8476
obj.CPUCount = v
8577
}

0 commit comments

Comments
 (0)