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

[EKS] [request]: New API for Supported EKS Node Group Release Versions #771

Open
bflad opened this issue Feb 26, 2020 · 1 comment
Open
Assignees
Labels
EKS Managed Nodes EKS Managed Nodes EKS Amazon Elastic Kubernetes Service Proposed Community submitted issue

Comments

@bflad
Copy link

bflad commented Feb 26, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request

Provide an EKS DescribeNodegroupReleaseVersions API call or similar.

Which service(s) is this request for?

EKS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

The EKS CreateNodeGroup API call accepts a parameter named releaseVersion which needs to match the published "AMI Version" names on the Amazon EKS-Optimized Linux AMI Versions documentation page, e.g. 1.14.8-20191213.

Over time, it appears the supported values change. From the Terraform AWS Provider acceptance testing we currently see:

--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1225.88s)
    testing.go:654: Step 0 error: errors during apply:
        
        Error: error creating EKS Node Group (tf-acc-test-9113909416381506697:tf-acc-test-9113909416381506697): InvalidParameterException: Requested Node Group release version 1.14.7-20190927 is invalid. Allowed release version is 1.14.8-20191213

There is currently no API or SSM Parameter lookup mechanism to find the latest AMI version supported by the EKS API. I have filed a separate issue in awslabs/amazon-eks-ami to potentially support an additional SSM Parameter with the latest value, however there also appears to be a delay between the AMI release process and the EKS API validation. For example, AMI 1.14.9-20200122 was released earlier today, but it returns a similar error:

--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1375.87s)
    testing.go:654: Step 0 error: errors during apply:

        Error: error creating EKS Node Group (tf-acc-test-7174874914828901519:tf-acc-test-7174874914828901519): InvalidParameterException: Requested Node Group release version 1.14.9-20200122 is invalid. Allowed release version is 1.14.8-20191213

Since the API service logic is authoritative about valid values, it would be great if the API provided functionality to return acceptable values. In the Terraform AWS Provider, we would implement a data source for this lookup and its value changing over time would allow Terraform to automatically propose upgrades.

Are you currently working around this issue?

Hardcoding an acceptable value and manually updating it over time.

References

@bflad bflad added the Proposed Community submitted issue label Feb 26, 2020
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Feb 26, 2020
…aseVersion argument value

Reference: awslabs/amazon-eks-ami#423
Reference: aws/containers-roadmap#771

There is currently no lookup mechanism for these values other than the website. See referenced issue for hopeful path forward via a new SSM Parameter, although there does appear to be a delay between the AMI release and EKS API support.

Previous output from acceptance testing (master and latest version testing):

```
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1225.88s)
    testing.go:654: Step 0 error: errors during apply:

        Error: error creating EKS Node Group (tf-acc-test-9113909416381506697:tf-acc-test-9113909416381506697): InvalidParameterException: Requested Node Group release version 1.14.7-20190927 is invalid. Allowed release version is 1.14.8-20191213

--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1375.87s)
    testing.go:654: Step 0 error: errors during apply:

        Error: error creating EKS Node Group (tf-acc-test-7174874914828901519:tf-acc-test-7174874914828901519): InvalidParameterException: Requested Node Group release version 1.14.9-20200122 is invalid. Allowed release version is 1.14.8-20191213
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (1564.18s)
```
@mikestef9 mikestef9 added the EKS Amazon Elastic Kubernetes Service label Feb 26, 2020
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Mar 4, 2020
…aseVersion argument value (#12172)

Reference: awslabs/amazon-eks-ami#423
Reference: aws/containers-roadmap#771

There is currently no lookup mechanism for these values other than the website. See referenced issue for hopeful path forward via a new SSM Parameter, although there does appear to be a delay between the AMI release and EKS API support.

Previous output from acceptance testing (master and latest version testing):

```
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1225.88s)
    testing.go:654: Step 0 error: errors during apply:

        Error: error creating EKS Node Group (tf-acc-test-9113909416381506697:tf-acc-test-9113909416381506697): InvalidParameterException: Requested Node Group release version 1.14.7-20190927 is invalid. Allowed release version is 1.14.8-20191213

--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (1375.87s)
    testing.go:654: Step 0 error: errors during apply:

        Error: error creating EKS Node Group (tf-acc-test-7174874914828901519:tf-acc-test-7174874914828901519): InvalidParameterException: Requested Node Group release version 1.14.9-20200122 is invalid. Allowed release version is 1.14.8-20191213
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (1564.18s)
```
@mikestef9 mikestef9 self-assigned this Mar 11, 2020
@mikestef9 mikestef9 added the EKS Managed Nodes EKS Managed Nodes label Jun 18, 2020
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Nov 12, 2020
Reference: #16146
Reference: aws/containers-roadmap#771
Reference: awslabs/amazon-eks-ami#559

Previously:

```
=== CONT  TestAccAWSEksNodeGroup_LaunchTemplate_Version
TestAccAWSEksNodeGroup_LaunchTemplate_Version: resource_aws_eks_node_group_test.go:394: Step 3/3, expected an error but got none
--- FAIL: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2495.73s)

=== CONT  TestAccAWSEksNodeGroup_ReleaseVersion
TestAccAWSEksNodeGroup_ReleaseVersion: resource_aws_eks_node_group_test.go:433: Step 3/3 error: Error running apply: 2020/11/11 10:20:03 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: error updating EKS Node Group (tf-acc-test-7656789780485850868:tf-acc-test-7656789780485850868) version: InvalidParameterException: Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107
{
RespMetadata: {
StatusCode: 400,
RequestID: "17a52d81-285a-4e03-924c-874d3d895e3b"
},
ClusterName: "tf-acc-test-7656789780485850868",
Message_: "Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107",
NodegroupName: "tf-acc-test-7656789780485850868"
}
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (4466.46s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2424.12s)
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (4059.77s)
```
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Nov 12, 2020
Reference: #16146
Reference: aws/containers-roadmap#771
Reference: awslabs/amazon-eks-ami#559

Previously:

```
=== CONT  TestAccAWSEksNodeGroup_LaunchTemplate_Version
TestAccAWSEksNodeGroup_LaunchTemplate_Version: resource_aws_eks_node_group_test.go:394: Step 3/3, expected an error but got none
--- FAIL: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2495.73s)

=== CONT  TestAccAWSEksNodeGroup_ReleaseVersion
TestAccAWSEksNodeGroup_ReleaseVersion: resource_aws_eks_node_group_test.go:433: Step 3/3 error: Error running apply: 2020/11/11 10:20:03 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: error updating EKS Node Group (tf-acc-test-7656789780485850868:tf-acc-test-7656789780485850868) version: InvalidParameterException: Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107
{
RespMetadata: {
StatusCode: 400,
RequestID: "17a52d81-285a-4e03-924c-874d3d895e3b"
},
ClusterName: "tf-acc-test-7656789780485850868",
Message_: "Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107",
NodegroupName: "tf-acc-test-7656789780485850868"
}
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (4466.46s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2424.12s)
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (4059.77s)
```
@bflad
Copy link
Author

bflad commented Dec 10, 2020

Just updating this with details from awslabs/amazon-eks-ami#559. The "recommended" SSM parameter value is still fairly regularly out of date with an incompatible release version, along with the associated documentation.

Edit: It turns out the particular issue mentioned in awslabs/amazon-eks-ami#559 happens in our case because our AWS account has special staging API access, which does not accept the production release version value. The feature request here is still otherwise valid though -- providing an API to lookup the acceptable values would solve the problem for accounts with either staging and production access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EKS Managed Nodes EKS Managed Nodes EKS Amazon Elastic Kubernetes Service Proposed Community submitted issue
Projects
None yet
Development

No branches or pull requests

2 participants