-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Optional AWS Route53 region #7287
Optional AWS Route53 region #7287
Conversation
Signed-off-by: Richard Wall <[email protected]>
Remove webhook validation for Route53 region Signed-off-by: Richard Wall <[email protected]>
b96b8a9
to
9378c8e
Compare
pkg/apis/acme/v1/types_issuer.go
Outdated
Region string `json:"region"` | ||
// Override the AWS region. | ||
// The region is used to compute the STS endpoint and it is used in API | ||
// request signatures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know what would happen if the signature has the wrong region?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood. My latest understanding is that the region given here or from AWS_REGION is used as a hint to select one of two credential scope regions.
I've updated the comment and added some links to AWS documentation.
See also:
Signed-off-by: Richard Wall <[email protected]>
Signed-off-by: Richard Wall <[email protected]>
9378c8e
to
398c9e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/apis/acme/v1/types_issuer.go
Outdated
Region string `json:"region"` | ||
// Override the AWS region. | ||
// The region is used to compute the STS endpoint and it is used in API | ||
// request signatures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood. My latest understanding is that the region given here or from AWS_REGION is used as a hint to select one of two credential scope regions.
I've updated the comment and added some links to AWS documentation.
See also:
pkg/apis/acme/v1/types_issuer.go
Outdated
// Region is ignored if ambient credentials mode is disabled, by | ||
// `--cluster-issuer-ambient-credentials` or `--isssuer-ambient-credentials` | ||
// controller flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this wrong. Should be:
// Region is ignored if ambient credentials mode is disabled, by | |
// `--cluster-issuer-ambient-credentials` or `--isssuer-ambient-credentials` | |
// controller flags. | |
// Region is used unconditionally if ambient credentials mode is disabled, by | |
// `--cluster-issuer-ambient-credentials` or `--isssuer-ambient-credentials` | |
// controller flags. |
Personally, I think this is a bug, but that is how it's coded.
Ambient mode should only concern the loading of ambient credentials,
not other metadata such as region.
Signed-off-by: Richard Wall <[email protected]>
398c9e3
to
9de6aa6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating this. I'm 100% onboard with making the region field optional.
Might want to tune the comment a bit more in the future, but LGTM for this beta release.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inteon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind bug |
/kind feature |
When you install cert-manager on EKS and use IAM Roles for Service Accounts or Pod Identity,
an AWS mutating webhook will add
AWS_REGION
andAWS_DEFAULT_REGION
environment variables to the controller Pod. There's no need to specify the region in the Issuer config so it should not be a required field.AWS Route53 is a global service and does not have regional endpoints.
The AWS SDK for Go V2 uses the region (whether supplied or detected from environment variables) as a hint,
with which to compute the AWS partition domain name (i.e. route53.amazonaws.com / amazonaws.com.cn / route53.us-gov.amazonaws.com) and the credential scope (us-east-1 / cn-northwest-1 / us-gov-west-1).
Here is the metadata that the SDK uses for Route53.
omitempty
and+optional
and regenerated the CRDS.Fixes: #6175
Fixes: cert-manager/website#56
/kind bug
Testing
API Documentation