Skip to content

Conversation

@vishalbollu
Copy link
Contributor

@vishalbollu vishalbollu commented Mar 5, 2021


checklist:

  • run make test and make lint
  • test manually (i.e. build/push all images, restart operator, and re-deploy APIs)

"Effect": "Allow",
"Action": "sqs:*",
"Resource": "arn:aws:sqs:{{ .Region }}:{{ .AccountID }}:{{ .SQSPrefix }}*"
"Resource": "arn:aws:sqs:{{ .Region }}:{{ .AccountID }}:cortex-*"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: convert to const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cortex- prefix

"Effect": "Allow",
"Action": "sqs:*",
"Resource": "arn:aws:sqs:{{ .Region }}:{{ .AccountID }}:{{ .SQSPrefix }}*"
"Resource": "arn:aws:sqs:{{ .Region }}:{{ .AccountID }}:cortex-*"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: convert to const

// 10 was chosen to make sure that other identifiers can be added to the full queue name before reaching the 80 char SQS name limit
return hash.String(clusterName)[:10] + "-"
// 8 was chosen to make sure that other identifiers can be added to the full queue name before reaching the 80 char SQS name limit
return "cortex-" + hash.String(clusterName)[:8] + "-"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: convert to const

@RobertLucian RobertLucian changed the title Simplify aws policy by add cortex prefix to queue name Simplify aws policy by adding cortex prefix to queue name Mar 9, 2021
@vishalbollu vishalbollu merged commit df2c91d into master Mar 11, 2021
@vishalbollu vishalbollu deleted the remove-sqs-prefix-from-policy branch March 11, 2021 18:56
@vishalbollu vishalbollu added this to the 0.31 milestone Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants