From 127d7d169cf42e8d675862b1c380d8b2eca790a8 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Wed, 29 Nov 2023 14:12:23 -0800 Subject: [PATCH] Drop sqs:GetQueueAttributes from cloudformation policy --- pkg/fake/sqsapi.go | 8 +++----- .../getting-started-with-karpenter/cloudformation.yaml | 1 - .../en/docs/upgrading/v1beta1-controller-policy.json | 1 - .../getting-started-with-karpenter/cloudformation.yaml | 1 - .../en/preview/upgrading/v1beta1-controller-policy.json | 1 - .../getting-started-with-karpenter/cloudformation.yaml | 1 - .../en/v0.32/upgrading/v1beta1-controller-policy.json | 1 - 7 files changed, 3 insertions(+), 11 deletions(-) diff --git a/pkg/fake/sqsapi.go b/pkg/fake/sqsapi.go index 98a88d6df389..358eb43d67e3 100644 --- a/pkg/fake/sqsapi.go +++ b/pkg/fake/sqsapi.go @@ -30,10 +30,9 @@ const ( // SQSBehavior must be reset between tests otherwise tests will // pollute each other. type SQSBehavior struct { - GetQueueURLBehavior MockedFunction[sqs.GetQueueUrlInput, sqs.GetQueueUrlOutput] - GetQueueAttributesBehavior MockedFunction[sqs.GetQueueAttributesInput, sqs.GetQueueAttributesOutput] - ReceiveMessageBehavior MockedFunction[sqs.ReceiveMessageInput, sqs.ReceiveMessageOutput] - DeleteMessageBehavior MockedFunction[sqs.DeleteMessageInput, sqs.DeleteMessageOutput] + GetQueueURLBehavior MockedFunction[sqs.GetQueueUrlInput, sqs.GetQueueUrlOutput] + ReceiveMessageBehavior MockedFunction[sqs.ReceiveMessageInput, sqs.ReceiveMessageOutput] + DeleteMessageBehavior MockedFunction[sqs.DeleteMessageInput, sqs.DeleteMessageOutput] } type SQSAPI struct { @@ -45,7 +44,6 @@ type SQSAPI struct { // each other. func (s *SQSAPI) Reset() { s.GetQueueURLBehavior.Reset() - s.GetQueueAttributesBehavior.Reset() s.ReceiveMessageBehavior.Reset() s.DeleteMessageBehavior.Reset() } diff --git a/website/content/en/docs/getting-started/getting-started-with-karpenter/cloudformation.yaml b/website/content/en/docs/getting-started/getting-started-with-karpenter/cloudformation.yaml index 08baa8f22f81..6284f8738b95 100644 --- a/website/content/en/docs/getting-started/getting-started-with-karpenter/cloudformation.yaml +++ b/website/content/en/docs/getting-started/getting-started-with-karpenter/cloudformation.yaml @@ -178,7 +178,6 @@ Resources: "Resource": "${KarpenterInterruptionQueue.Arn}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ] diff --git a/website/content/en/docs/upgrading/v1beta1-controller-policy.json b/website/content/en/docs/upgrading/v1beta1-controller-policy.json index 69e70f4f4ceb..c65c402f9c21 100644 --- a/website/content/en/docs/upgrading/v1beta1-controller-policy.json +++ b/website/content/en/docs/upgrading/v1beta1-controller-policy.json @@ -145,7 +145,6 @@ "Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ] diff --git a/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml b/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml index 896e5c30ae3c..94c233b7c6c8 100644 --- a/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml +++ b/website/content/en/preview/getting-started/getting-started-with-karpenter/cloudformation.yaml @@ -179,7 +179,6 @@ Resources: "Resource": "${KarpenterInterruptionQueue.Arn}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ] diff --git a/website/content/en/preview/upgrading/v1beta1-controller-policy.json b/website/content/en/preview/upgrading/v1beta1-controller-policy.json index 69e70f4f4ceb..c65c402f9c21 100644 --- a/website/content/en/preview/upgrading/v1beta1-controller-policy.json +++ b/website/content/en/preview/upgrading/v1beta1-controller-policy.json @@ -145,7 +145,6 @@ "Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ] diff --git a/website/content/en/v0.32/getting-started/getting-started-with-karpenter/cloudformation.yaml b/website/content/en/v0.32/getting-started/getting-started-with-karpenter/cloudformation.yaml index 08baa8f22f81..6284f8738b95 100644 --- a/website/content/en/v0.32/getting-started/getting-started-with-karpenter/cloudformation.yaml +++ b/website/content/en/v0.32/getting-started/getting-started-with-karpenter/cloudformation.yaml @@ -178,7 +178,6 @@ Resources: "Resource": "${KarpenterInterruptionQueue.Arn}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ] diff --git a/website/content/en/v0.32/upgrading/v1beta1-controller-policy.json b/website/content/en/v0.32/upgrading/v1beta1-controller-policy.json index 69e70f4f4ceb..c65c402f9c21 100644 --- a/website/content/en/v0.32/upgrading/v1beta1-controller-policy.json +++ b/website/content/en/v0.32/upgrading/v1beta1-controller-policy.json @@ -145,7 +145,6 @@ "Resource": "arn:aws:sqs:${AWS_REGION}:${AWS_ACCOUNT_ID}:${CLUSTER_NAME}", "Action": [ "sqs:DeleteMessage", - "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:ReceiveMessage" ]