sparse-intern-71089
06/29/2022, 6:34 PMsteep-toddler-94095
06/29/2022, 10:08 PMdesired_size
to the ignore_changes
field: https://www.pulumi.com/docs/intro/concepts/resources/options/ignorechanges/steep-toddler-94095
06/29/2022, 10:11 PMworried-xylophone-86184
08/11/2022, 9:24 AMsome-continent-1577
08/21/2022, 12:54 PMworried-xylophone-86184
08/21/2022, 2:06 PM2. How are people supposed to manage an autoscaling EKS cluster with pulumi? Maybe I’m doing something in a nonstandard way? The cluster-autoscaler takes over modifying desired_count outside of pulumi, and thus I need pulumi not to fight against that.This was a major deal breaker for us as we had nodegroups which would start with desired as 0 but have workloads running on it later on. We also had a requirement where the aws auth ConfigMap was not being provisioned according to our requirements. Hence the re implementation.
1. Should I look in the direction of applying the ignore_changes config to the underlying NodeGroup pulumi resource? Not sure if that makes sense - not sure if users can interact at all with the underlying resources inside a component resource or not.I have tried this using transformations and it ends up giving the same warning so it wont help.
some-continent-1577
08/21/2022, 2:16 PMworried-xylophone-86184
08/21/2022, 2:24 PMavoid pulumi from messing with post-autoscaling desired_sizeIt does but you would need to hand roll functions such as • Creation of the IAM role for the EKS Cluster • aws auth config map • Installation of the VPC CNI addon • Generate the kubeconfig • Creation of a provider for any further k8s operations Eventually after all the above operations are done the nodegroup generation function would look something like this:
eks_node_group = NodeGroup(
node_group["name"],
node_group_name=node_group["name"],
cluster_name=self.eks_cluster.name,
node_role_arn=self.eks_ec2_role.arn,
subnet_ids=nodegroup_azs,
capacity_type=capacity_type,
taints=taints,
labels=node_group.get("labels", None),
instance_types=node_group["instance_types"],
scaling_config=nodegroup_scaling_args,
launch_template=launch_template_args,
tags=tag_args,
opts=ResourceOptions(
ignore_changes=["scalingConfig"],
depends_on=[self.aws_auth_configmap],
),
)