Skip to content

Commit

Permalink
Make dns_domain and max_node_unavailable optional (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Kirill Eliseev <[email protected]>
  • Loading branch information
qynonyq and Kirill Eliseev authored Jul 18, 2022
1 parent 27227de commit 2b8181d
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 29 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: |-

# VKCS Provider's changelog

#### v0.1.10
- Minor updates for resource_vkcs_kubernetes_cluster, resource_vkcs_kubernetes_node_group,
- data_source_vkcs_kubernetes_cluster and examples

#### v0.1.9
- Fix re-creation of db user after re-creation of db instance

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/vkcs_kubernetes_node_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ attributes are exported:
* `uuid` - The UUID of the cluster's node group.
* `volume_size` - The amount of memory of volume in Gb.
* `volume_type` - The type of volume.
* `max_node_unavailable` - Specified as a percentage. The maximum number of nodes that can fail during an upgrade. **New since version v0.1.3**.
* `max_node_unavailable` - Specified as a percentage. The maximum number of nodes that can fail during an upgrade.
4 changes: 2 additions & 2 deletions docs/resources/vkcs_kubernetes_node_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The following arguments are supported:
Changing this will force to create a new node group.
* `volume_type` - (Optional) The volume type to load nodes from.
Changing this will force to create a new node group.
* `max_node_unavailable` - (Optional) The maximum number of nodes that can fail during an upgrade. The default value is 25 percent. **New since version v0.1.3**.
* `max_node_unavailable` - (Optional) The maximum number of nodes that can fail during an upgrade. The default value is 25 percent.


## Attributes
Expand All @@ -68,7 +68,7 @@ attributes are exported:
* `uuid` - The UUID of the cluster's node group.
* `volume_size` - The size in GB for volume to load nodes from.
* `volume_type` - The volume type to load nodes from.
* `max_node_unavailable` - (Optional) The maximum number of nodes that can fail during an upgrade. **New since version v0.1.3**.
* `max_node_unavailable` - The maximum number of nodes that can fail during an upgrade.

## Import

Expand Down
1 change: 0 additions & 1 deletion examples/vkcs-kubernetes-cluster-create/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ resource "vkcs_kubernetes_cluster" "k8s-cluster" {
floating_ip_enabled = true
availability_zone = "MS1"
insecure_registries = ["1.2.3.4"]
dns_domain = var.dns-domain
}
4 changes: 0 additions & 4 deletions examples/vkcs-kubernetes-cluster-create/vars.tf

This file was deleted.

4 changes: 1 addition & 3 deletions examples/vkcs-kubernetes-node-group-create/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ resource "vkcs_kubernetes_cluster" "k8s-cluster" {
floating_ip_enabled = true
availability_zone = "MS1"
insecure_registries = ["1.2.3.4"]
dns_domain = var.dns-domain
}

resource "vkcs_kubernetes_node_group" "default_ng" {
cluster_id = vkcs_kubernetes_cluster.k8s-cluster.id

node_count = 1
name = var.name
name = "default"
max_nodes = 5
min_nodes = 1
max_node_unavailable = var.max-node-unavailable

labels {
key = "env"
Expand Down
14 changes: 0 additions & 14 deletions examples/vkcs-kubernetes-node-group-create/vars.tf

This file was deleted.

2 changes: 1 addition & 1 deletion vkcs/data_source_vkcs_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func dataSourceKubernetesCluster() *schema.Resource {
"dns_domain": {
Type: schema.TypeString,
Optional: true,
Computed: false,
Computed: true,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion vkcs/data_source_vkcs_kubernetes_node_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func dataSourceKubernetesNodeGroup() *schema.Resource {
"max_node_unavailable": {
Type: schema.TypeInt,
Optional: true,
Computed: false,
Computed: true,
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion vkcs/resource_vkcs_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ func resourceKubernetesCluster() *schema.Resource {
},
"dns_domain": {
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Computed: true,
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion vkcs/resource_vkcs_kubernetes_node_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ func resourceKubernetesNodeGroup() *schema.Resource {
},
"max_node_unavailable": {
Type: schema.TypeInt,
Required: true,
Optional: true,
Computed: true,
},
},
}
Expand Down

0 comments on commit 2b8181d

Please sign in to comment.