Skip to content

🐛 fix(main.tf): fix service-linked-role creation #4

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Conversation

morga471
Copy link
Contributor

@morga471 morga471 commented Sep 3, 2024

│ Error: creating IAM Service Linked Role (spot.amazonaws.com): operation error IAM:
 CreateServiceLinkedRole, https response error StatusCode: 400, RequestID: 30c6c648-6b6a-49fc-855b-949160fd6f7c, 
InvalidInput: Custom suffix is not allowed for spot.amazonaws.com

resolves:

{"level":"ERROR","time":"2024-09-03T21:51:01.369Z","logger":"controller","message":"Reconciler error",
"commit":"62a726c","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"platform-eng-eks-mcm-node-pool-general-89qlw"},
"namespace":"","name":"platform-eng-eks-mcm-node-pool-general-89qlw","reconcileID":"fb79c654-2272-402e-9b43-1a85430a9705","error":"launching nodeclaim, creating instance, with fleet error(s), 
AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances."}

@morga471 morga471 self-assigned this Sep 3, 2024
@morga471 morga471 marked this pull request as draft September 3, 2024 22:33
@morga471
Copy link
Contributor Author

morga471 commented Sep 3, 2024

This doesn't delete

@morga471 morga471 marked this pull request as ready for review September 4, 2024 01:56
@morga471
Copy link
Contributor Author

morga471 commented Sep 4, 2024

The resource for the service-linked role for spot.amazonaws.com is an account level resource. This change will check if it exists, and create it if not. If it does exist, then we do not create it.

@morga471
Copy link
Contributor Author

morga471 commented Sep 4, 2024

I've had a bunch of issues with this. the service linked role shouldn't be a property of the cluster when it's account bound.
idk how to proceed, this works for the time being.

@morga471 morga471 merged commit 77894b8 into main Sep 4, 2024
@morga471 morga471 deleted the b101 branch September 4, 2024 18:56
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant