Fix EKS NodeGroup Parameter Definitions
See original GitHub issueWhen defining a NodeGroup (EKS) these two parameters need to be updated:
Labels
and Tags
In eks.py
it should be modified to fit:
class Nodegroup(AWSObject):
resource_type = "AWS::EKS::Nodegroup"
props = {
'AmiType': (basestring, False),
'ClusterName': (basestring, True),
'DiskSize': (double, False),
'ForceUpdateEnabled': (boolean, False),
'InstanceTypes': ([basestring], False),
'Labels': (dict, False),
'NodegroupName': (basestring, False),
'NodeRole': (basestring, True),
'ReleaseVersion': (basestring, False),
'RemoteAccess': (RemoteAccess, False),
'ScalingConfig': (ScalingConfig, False),
'Subnets': ([basestring], False),
'Tags': (dict, False),
'Version': (basestring, False),
}
The change is: Labels = basestring -> dict Tags = Tags -> dict
I was unable to deploy with the previous settings because I kept getting errors from cloudformation. After the change I was able to deploy correctly.
Here is an example of the deploy:
template.add_resource(Nodegroup(
"NodeGroup",
AmiType=Ref("AmiType"),
...
...
Labels=json.loads(sceptre_user_data.get("Labels")) or Ref("AWS::NoValue"),
Tags={
"MyKey": "MyValue",
"MySecondKey": "MySecond Value"
}
))
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Resolve node group errors in an EKS cluster - AWS
How do I resolve managed node group errors in an Amazon EKS cluster? ... see Create a new launch template using parameters you...
Read more >EKS Managed Nodegroups - eksctl
An EKS managed node group is an autoscaling group and associated EC2 instances that are managed by AWS for an Amazon EKS cluster....
Read more >amazon-eks-user-guide/create-managed-node-group.md at ...
Creating a managed node group. This topic describes how you can launch Amazon EKS managed node groups of nodes that register with your...
Read more >create-nodegroup — AWS CLI 2.9.8 Command Reference - eks
Creates a managed node group for an Amazon EKS cluster. You can only create a node group for your cluster that is equal...
Read more >aws_eks_node_group | Resources | hashicorp/aws
Manages an EKS Node Group, which can provision and optionally update an Auto ... AMI for a given EKS version by querying an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@PatMyron heh…don’t get me started about Tags… 😃 Here’s the thing, the Tags() helper was added given the verbosity of the original tags with Key/Value keys. Lately CloudFormation has seen Tags being of type Json without using those keys. I’m wondering if this has changed recently or was originally missed. For both those types the likely fix is to allow “dict” and the existing type for backwards compatibility. Perhaps something like:
Although the Tags likely only work one way.
Both “Labels” and “Tags” should simply be a dict, the alternate
basestring
andTags
representations simply don’t work in AWS.I’ve made that substitution in a local fork, and it works great. I don’t think you need to worry about troposphere backward compatibility since the string and Tags representations never worked.