quick-garden-9190
03/23/2021, 6:30 PMdesiredSize
is a required value. This size will clobber whatever the cluster-autoscaler has landed on.
I’ve tried using ignoreChanges: ['scalingConfig.desiredSize']
but this option seems to be completely ignored.
I’ve tried searching through the docs, it seems like this example is missing some key functionality, unless I’m not seeing something obvious.gentle-diamond-70147
03/23/2021, 7:30 PMignoreChanges
for this same use case yesterday and it worked as expected for me.quick-garden-9190
03/23/2021, 8:26 PMscalingConfig
scalingConfig: {
maxSize: 100,
minSize: 4,
desiredSize: 5
},
Then lets say some time passes and workloads are added to my cluster, the autoscaler will add nodes to satisfy the new requirements. If I were to run another update, even with ignoreChanges: ['scalingConfig.desiredSize']
present, the node group will revert back to whatever is defined in desiredSize
gentle-diamond-70147
03/23/2021, 8:30 PMpreview --diff
that shows this?quick-garden-9190
03/23/2021, 8:38 PMignoreChanges
to ignore any drift that the resources themselves might have made over time? That is, if I were to manually modify the desiredSize
even with ignoreChanges
in place. Would pulumi update the value because I modified what is declared?desiredSize
to be ignored, which is not what I’m seeingignoreChanges
This seems to be behavior I haven’t accounted for previously.instanceTypes
for example. In that case a new node group would be spun up and I believe ignoreChanges
would itself be ignored since it is instantiating the resource. Is it possible for me to lookup how many instances are currently running in an ASG so that I can pass that value as desiredSize
?gentle-diamond-70147
03/23/2021, 9:44 PMpulumi refresh
or run preview or up with the --refresh
flag. This will update Pulumi's state. This would pick up any manual changes you make to desiredSize
.ignoreChanges: ["scalingConfig.desiredSize", "scalingConfig.maxSize"]
in your code, then on preview
and up
, Pulumi will ignore any changes you've made to your code or configuration that is driving these values.ignoreChanges
set), your next pre
or up
should not change these values.quick-garden-9190
03/23/2021, 9:50 PMscalingConfig.desiredSize
declared as an ignored value, if I modify desiredSize
I’m seeing Pulumi recognize the diff and want to update itscalingConfig.maxSize
for some reason?gentle-diamond-70147
03/23/2021, 9:53 PMpulumi pre --diff
output? You should not need to ignore any other properties, unless you see Pulumi trying to update them too and you don't want that to occur.ignoreChanges
is working for all the properties I set.quick-garden-9190
03/23/2021, 9:56 PM~ launchTemplate: {
~ version: "1" => "$Latest"
}
~ scalingConfig : {
~ desiredSize: 7 => 9
}
{
provider: awsProvider,
ignoreChanges: ['scalingConfig.desiredSize']
}
gentle-diamond-70147
03/23/2021, 10:00 PMquick-garden-9190
03/23/2021, 10:03 PMgentle-diamond-70147
03/23/2021, 10:05 PMquick-garden-9190
03/23/2021, 10:13 PM