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

[Bug]: storage_size needed KVM while creating nksNodePool #458

Open
wonchulee opened this issue Oct 8, 2024 · 2 comments
Open

[Bug]: storage_size needed KVM while creating nksNodePool #458

wonchulee opened this issue Oct 8, 2024 · 2 comments
Labels

Comments

@wonchulee
Copy link
Collaborator

wonchulee commented Oct 8, 2024

Terraform Core Version

1.5.7

NCLOUD Provider Version

3.1.2

Affected Resource(s)

ncloud_nks_node_pool

Expected Behavior

successfully created

Actual Behavior

creation failure

Relevant Error/Panic Output Snippet

ncloud_nks_node_pool.node_pool: Creating...
╷
│ Error: Status: 400 Bad Request, Body: {"error":{"errorCode":400,"statusCode":400,"message":"Bad Request","details":{"error":[{"property":"storageSize","children":[],"constraints":{"max":"storageSize must not be greater than 2000","min":"storageSize must not be less than 50"}}]}},"timestamp":"2024-10-08T08:56:48.855Z"}

Terraform Configuration Files

...

resource "ncloud_nks_cluster" "nks_cluster" {
  hypervisor_code = "KVM"
  cluster_type = "SVR.VNKS.STAND.C004.M016.G003"
  k8s_version = "1.28.10-nks.2"
  login_key_name = ncloud_login_key.loginkey.key_name
  lb_private_subnet_no = ncloud_subnet.priv_lb_subnet.id
  lb_public_subnet_no = ncloud_subnet.pub_lb_subnet.id
  kube_network_plugin = "cilium"
  subnet_no_list = [ ncloud_subnet.priv_subnet.id ]
  vpc_no = ncloud_vpc.vpc.id
  zone = "KR-1"
  log {
    audit = false
  }
}

resource "ncloud_nks_node_pool" "node_pool" {
  cluster_uuid   = ncloud_nks_cluster.nks_cluster.uuid
  node_pool_name = "pool"
  node_count     = 2
  server_spec_code = "s4-g3"
  autoscale {
    enabled = true
    min = 2
    max = 4
  }
}

Steps to Reproduce

terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

https://registry.terraform.io/providers/NaverCloudPlatform/ncloud/latest/docs/resources/nks_node_pool
In the document, it is specified as an optional argument and set default 50GB, but it requires explicit value when creating.

References

No response

Would you like to implement a fix?

None

@wonchulee wonchulee added the bug label Oct 8, 2024
@wonchulee wonchulee changed the title [Bug]: storage_size needed KVM nksNodePool creation [Bug]: storage_size needed KVM while creating nksNodePool Oct 8, 2024
@wonchulee
Copy link
Collaborator Author

wonchulee commented Oct 8, 2024

(cc. @gimmetm)

In addition, there is another tiny issue related to the nks resource (nks_cluster).
k8s_version should be specified as one of the values that showed the below error message.

Error: Status: 400 Bad Request, Body: {"message":"Invalid k8sVersion(1.28.10-nks.1)","availableOption":["1.28.10-nks.2","1.28.10-mnks.2","1.27.9-nks.2","1.27.9-mnks.2"],"timestamp":"2024-10-08T08:48:16.641Z"}

However, the ncloud_nks_versions resource that gets 1.28.10-nks.1 k8s version, not the 1.28.10-nks.2 and it will emit an error when using 1.28.10-nks.1 value as a k8s_version field.

@gimmetm
Copy link
Collaborator

gimmetm commented Oct 8, 2024

The default storage_size of the KVM node pool has been changed to 100GB, and it will be changed to be set up without having to enter it in the API.
Terraform Docs will be changed too.

(cc. @gimmetm)

In addition, there is another tiny issue related to the nks resource (nks_cluster). k8s_version should be specified as one of the values that showed the below error message.

Error: Status: 400 Bad Request, Body: {"message":"Invalid k8sVersion(1.28.10-nks.1)","availableOption":["1.28.10-nks.2","1.28.10-mnks.2","1.27.9-nks.2","1.27.9-mnks.2"],"timestamp":"2024-10-08T08:48:16.641Z"}

However, the ncloud_nks_versions resource that gets 1.28.10-nks.1 k8s version, not the 1.28.10-nks.2 and it will emit an error when using 1.28.10-nks.1 value as a k8s_version field.

*-nks.1 versions are XEN cluster versions.
Please set nks_server_images.hypervisor_code= "KVM" and test agin.

https://registry.terraform.io/providers/NaverCloudPlatform/ncloud/latest/docs/data-sources/nks_versions#hypervisor_code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants