-
Notifications
You must be signed in to change notification settings - Fork 16
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 Addon fails on update if resolve_conflicts must be OVERWRITE #1243
Comments
Thanks for your bug report @tgillitzer. I think this is a subtle interaction between the state management for pulunmi and EKS: When you change This requirement might be implied by This bit that you wrote:
is a bit concerning though. First, I want to check: did you use |
Yeah, based on what I saw, I am pretty sure they expect you to send it with every update. The Admin Console (browser) sends it with every install/update request. It make sense in some was as logically, the "ResolveConflicts" property isn't a property of the addon itself, but of the request to install/update it. I am pretty sure I used "ResolveConflicts" when I tried to patch via the CLI. I agree that the issue is at least, if not completely, related to the Cloud Control API. It seems to me they likely didn't factor in exactly how the Addon's work when they designed the Cloud Control API. Or maybe it was generated and thus it doesn't jive with how it actually works. As far as I could tell, there wasn't a way to use the Cloud Control API to update an addon that needed ResolveConflicts set to overwrite. |
What happened?
Updating EKS Addon (coredns). This cluster was created long before we started using Pulumi. Used Pulumi to migrate to the EKS coredns Addon. When this was done, I had to use the OVERWRITE option on resource_conflicts.
Now I am updating the coredns EKS Addon to a new version. I still have the OVERWRITE option set on resource_conflicts.
The update fails, with an error of:
Conflicts found when trying to apply. Will not continue due to resolve conflicts mode.
I turned on debug logging in Pulumi and looked through the log. I see that Pulumi is calling the cloud control API and doing a PATCH. The patch body is here:
{"ClientToken":"<removed>","Identifier":"development|coredns","PatchDocument":"[{\"op\":\"replace\",\"path\":\"/AddonVersion\",\"value\":\"v1.9.3-eksbuild.10\"}]","TypeName":"AWS::EKS::Addon"}
When I do the same operation via the AWS console, it does a POST against /clusters/development/addons/coredns/update and include the ResourceConflicts parameter.
I tried to use the aws CLI and the clouldcontrol command to update the Addon via a PATCH like Pulumi is doing and it doesn't accept ResourceConflicts as a path that is allowed to be update. When I do a cloudcontrol get-resource on it, it doesn't show the ResourceConflicts parameter either.
Maybe this is an AWS Cloud Control problem and not a pulumi problem? Does it make sense for aws-native to use the REST API instead of the CloudFormation API for this?
Thanks
Example
Create a cluster and then add CoreDNS as an addon. My conflict comes from the coredns config map that was created back when the cluster was originally created. If you make a cluster today with the AWS Console, it forces you to deploy the coredns addon and that doesn't result in this same conflict.
Once the previous update is complete, change the code as below to update the addon to a new version.
Run update again, and in my case, it fails with the error above.
Output of
pulumi about
CLI
Version 3.97.0
Go Version go1.21.5
Go Compiler gc
Plugins
NAME VERSION
aws 6.17.0
aws-native 0.90.0
docker 3.6.1
kubernetes 4.6.1
python unknown
Host
OS Microsoft Windows 11 Pro
Version 10.0.22000 Build 22000
Arch x86_64
This project is written in python: version='3.11.3'
Backend
Name pulumi.com
Dependencies:
NAME VERSION
pip 23.3.1
pulumi-aws 6.17.0
pulumi-aws-native 0.90.0
pulumi-docker 3.6.1
pulumi-kubernetes 4.6.1
setuptools 69.0.2
wheel 0.42.0
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: