Skip to content

Commit 054ce34

Browse files
Release 1601 v8 (#1603)
Co-authored-by: Pedro Franco de Carvalho <pedro.carvalho@suse.com>
1 parent f16c230 commit 054ce34

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

rancher2/schema_cluster_v2_rke_config_machine_pool.go

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package rancher2
22

33
import (
4-
"strings"
5-
64
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
75
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
86
"github.com/rancher/rancher/pkg/capr"
@@ -154,26 +152,24 @@ func clusterV2RKEConfigMachinePoolFields() map[string]*schema.Schema {
154152
"machine_labels": {
155153
Type: schema.TypeMap,
156154
Optional: true,
157-
Computed: true,
158-
Description: "Labels of the machine",
159-
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
160-
// Suppressing diff for labels containing cattle.io/
161-
if (strings.Contains(k, commonAnnotationLabelCattle) || strings.Contains(k, commonAnnotationLabelRancher)) && new == "" {
162-
return true
163-
}
164-
return false
165-
},
155+
Description: "Labels for the machine pool nodes",
166156
},
167157
"hostname_length_limit": {
168158
Type: schema.TypeInt,
169159
Optional: true,
170160
Description: "maximum length for autogenerated hostname",
171161
ValidateFunc: validation.IntBetween(capr.MinimumHostnameLengthLimit, capr.MaximumHostnameLengthLimit),
172162
},
173-
}
174-
175-
for k, v := range commonAnnotationLabelFields() {
176-
s[k] = v
163+
"annotations": {
164+
Type: schema.TypeMap,
165+
Optional: true,
166+
Description: "Annotations for the MachineDeployment object",
167+
},
168+
"labels": {
169+
Type: schema.TypeMap,
170+
Optional: true,
171+
Description: "Labels for the MachineDeployment object",
172+
},
177173
}
178174

179175
return s

0 commit comments

Comments
 (0)