Skip to content

Commit

Permalink
set surge_node <=> k8s_surge_node_count exists (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvthongswansea authored Oct 18, 2022
1 parent 2e3ed62 commit 45e6957
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gridscale/resource_gridscale_k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ func resourceGridscaleK8sRead(d *schema.ResourceData, meta interface{}) error {
"storage_type": props.Parameters["k8s_worker_node_storage_type"],
}
// Surge node feature is enable if k8s_surge_node_count > 0
surgeNodeCount := props.Parameters["k8s_surge_node_count"].(float64)
nodePool["surge_node"] = surgeNodeCount > 0
if surgeNodeCount, ok := props.Parameters["k8s_surge_node_count"].(float64); ok {
nodePool["surge_node"] = surgeNodeCount > 0
}

nodePoolList = append(nodePoolList, nodePool)
if err = d.Set("node_pool", nodePoolList); err != nil {
Expand Down

0 comments on commit 45e6957

Please sign in to comment.