Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Harvester fix to v3.0 #1140

Merged
merged 2 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## 3.0.0 (May 1, 2023)

FEATURES:

* Add support for new Azure features - node template tags, network interface, availability zone, and option to enable standard SKU. See [#1023](https://github.com/rancher/terraform-provider-rancher2/pull/1023) and [#1062](https://github.com/rancher/terraform-provider-rancher2/pull/1062)
* Add support for node group node role on EKS clusters. See [#1049](https://github.com/rancher/terraform-provider-rancher2/pull/1049)
* Allow setting vmAffinity for Harvester clusters. See [#1024](https://github.com/rancher/terraform-provider-rancher2/pull/1024) and [#1110](https://github.com/rancher/terraform-provider-rancher2/pull/1110)
* Update Harvester node driver to support multi nics and disks. See [#1051](https://github.com/rancher/terraform-provider-rancher2/pull/1051)

ENHANCEMENTS:

* [Docs] Update branching strategy and compatibility matrix. See [#1060](https://github.com/rancher/terraform-provider-rancher2/pull/1060)
* [Docs] Add example for authenticated cluster level private registry. See [#1055](https://github.com/rancher/terraform-provider-rancher2/pull/1055)
* [Docs] Remove macAddress in Harvester node driver. See [#1089](https://github.com/rancher/terraform-provider-rancher2/pull/1089)
* Add k8s 1.25 support | Remove logging cis v1 support. See [#1056](https://github.com/rancher/terraform-provider-rancher2/pull/1056)
* Add issue and pull request templates. See [#1063](https://github.com/rancher/terraform-provider-rancher2/pull/1063)
* Update Wrangler to v1.1.0. See [#1079](https://github.com/rancher/terraform-provider-rancher2/pull/1079)
* Bump golang.org/x/net from 0.2.0 to 0.7.0. See [#1078](https://github.com/rancher/terraform-provider-rancher2/pull/1078)
* Bump github.com/hashicorp/go-getter from 1.4.0 to 1.7.0. See [#1077](https://github.com/rancher/terraform-provider-rancher2/pull/1077)
* Add script to test Terraform RCs locally on darwin/unix and windows. See [#1082](https://github.com/rancher/terraform-provider-rancher2/pull/1082) and [#1085](https://github.com/rancher/terraform-provider-rancher2/pull/1085)
* Implement retry logic to enforce timeouts. See [#1033](https://github.com/rancher/terraform-provider-rancher2/pull/1033)

BUG FIXES:

* [Docs] Add machine_pool `annotations` property. See [#1041](https://github.com/rancher/terraform-provider-rancher2/pull/1041)
* Add new field for computed values in App v2 resource. See [#1021](https://github.com/rancher/terraform-provider-rancher2/pull/1021)
* Do not sort mirror endpoints. See [#1029](https://github.com/rancher/terraform-provider-rancher2/pull/1029)
* Update SDK and make machine pool `cloud_credential_secret_name optional` to fix plan bug. See [#1070](https://github.com/rancher/terraform-provider-rancher2/pull/1070)
* Fix intermittent 409 conflict when creating new `rancher2_project` with PSPTID. See [#1058](https://github.com/rancher/terraform-provider-rancher2/pull/1058)

## 1.25.0 (November 22, 2022)

FEATURES:
Expand Down
58 changes: 44 additions & 14 deletions rancher2/schema_machine_config_v2_harvester.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,43 @@ func machineConfigV2HarvesterFields() map[string]*schema.Schema {
Description: "Memory size (in GiB)",
},
"disk_size": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Disk size (in GiB)",
Deprecated: "Use disk_info instead",
},
"disk_bus": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Disk bus",
Deprecated: "Use disk_info instead",
},
"image_name": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Image name",
Deprecated: "Use disk_info instead",
},
"disk_info": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Optional: true,
AtLeastOneOf: []string{
"harvester_config.0.image_name",
},
ConflictsWith: []string{
"harvester_config.0.disk_size",
"harvester_config.0.disk_bus",
"harvester_config.0.image_name",
},
Description: "A JSON string specifying info for the disks e.g. `{\"disks\":[{\"imageName\":\"harvester-public/image-57hzg\",\"bootOrder\":1,\"size\":40},{\"storageClassName\":\"node-driver-test\",\"bootOrder\":2,\"size\":1}]}`",
},
"ssh_user": {
Expand All @@ -65,20 +82,33 @@ func machineConfigV2HarvesterFields() map[string]*schema.Schema {
Description: "SSH password",
},
"network_name": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.network_info",
},
Description: "Network name",
Deprecated: "Use network_info instead",
},
"network_model": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.network_info",
},
Description: "Network model",
Deprecated: "Use network_info instead",
},
"network_info": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Optional: true,
AtLeastOneOf: []string{
"harvester_config.0.network_name",
},
ConflictsWith: []string{
"harvester_config.0.network_name",
"harvester_config.0.network_model",
},
Description: "A JSON string specifying info for the networks e.g. `{\"interfaces\":[{\"networkName\":\"harvester-public/vlan1\"},{\"networkName\":\"harvester-public/vlan2\"}]}`",
},
"user_data": {
Expand Down
58 changes: 44 additions & 14 deletions rancher2/schema_node_template_harvester.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,43 @@ func harvesterConfigFields() map[string]*schema.Schema {
Description: "Memory size (in GiB)",
},
"disk_size": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Disk size (in GiB)",
Deprecated: "Use disk_info instead",
},
"disk_bus": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Disk bus",
Deprecated: "Use disk_info instead",
},
"image_name": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.disk_info",
},
Description: "Image name",
Deprecated: "Use disk_info instead",
},
"disk_info": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Optional: true,
AtLeastOneOf: []string{
"harvester_config.0.image_name",
},
ConflictsWith: []string{
"harvester_config.0.disk_size",
"harvester_config.0.disk_bus",
"harvester_config.0.image_name",
},
Description: "A JSON string specifying info for the disks e.g. `{\"disks\":[{\"imageName\":\"harvester-public/image-57hzg\",\"bootOrder\":1,\"size\":40},{\"storageClassName\":\"node-driver-test\",\"bootOrder\":2,\"size\":1}]}`",
},
"ssh_user": {
Expand All @@ -100,20 +117,33 @@ func harvesterConfigFields() map[string]*schema.Schema {
Description: "SSH password",
},
"network_name": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.network_info",
},
Description: "Network name",
Deprecated: "Use network_info instead",
},
"network_model": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{
"harvester_config.0.network_info",
},
Description: "Network model",
Deprecated: "Use network_info instead",
},
"network_info": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Optional: true,
AtLeastOneOf: []string{
"harvester_config.0.network_name",
},
ConflictsWith: []string{
"harvester_config.0.network_name",
"harvester_config.0.network_model",
},
Description: "A JSON string specifying info for the networks e.g. `{\"interfaces\":[{\"networkName\":\"harvester-public/vlan1\"},{\"networkName\":\"harvester-public/vlan2\"}]}`",
},
"user_data": {
Expand Down