Skip to content
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

add s3 region #8592

Merged
merged 1 commit into from
Feb 20, 2020
Merged

add s3 region #8592

merged 1 commit into from
Feb 20, 2020

Conversation

zetaab
Copy link
Member

@zetaab zetaab commented Feb 20, 2020

we are currently seeing following error in etcd-manager:

W0220 12:42:07.934295    8002 controller.go:149] unexpected error running etcd cluster reconciliation loop: error refreshing control store after leadership change: error reading s3://xxxx/bbb.k8s.local/backups/etcd/events/control: error listing s3://xxxx/bbb.k8s.local/backups/etcd/events/control: AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-north-1'
	status code: 400, request id: 9C82F7B26B72D41D, host id: bNWE4d3rO/CnkzlfpTrUcW4LcMdxuBH7M5tY6AmOivMLSvaBqrEc8PpiaOXHDKuBi5jgx6B07Cw=

this is because we are using custom s3 credentials and s3 region is not passed to etcd-manager container (so it defaults to us-east-1)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zetaab

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2020
@rifelpet
Copy link
Member

How are you passing custom credentials to etcd-manager? Just curious

@zetaab
Copy link
Member Author

zetaab commented Feb 20, 2020

How are you passing custom credentials to etcd-manager? Just curious

I am defining following before running kops commands like kops create cluster:

export S3_ACCESS_KEY_ID=foobar
export S3_SECRET_ACCESS_KEY=xxxx
export KOPS_STATE_STORE=s3://yyyy
export S3_ENDPOINT=https://s3.eu-north-1.amazonaws.com
export S3_REGION=eu-north-1

These environment variable are then passed to etcd manager container (or before this PR all other than S3_REGION) was passed. I have tested this PR and now everything works. Use-case for this solution is that we have shared one s3 bucket to many clusters. Of course each cluster do have own iam account (and bucket policy) that those are isolated. We are doing this because some of our clusters are in OpenStack, GCE and AWS. Common place for all stores makes it much easier to manage

@hakman
Copy link
Member

hakman commented Feb 20, 2020

/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2020
@k8s-ci-robot k8s-ci-robot merged commit 2e51beb into kubernetes:master Feb 20, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Feb 20, 2020
k8s-ci-robot added a commit that referenced this pull request Feb 20, 2020
k8s-ci-robot added a commit that referenced this pull request Feb 20, 2020
@zetaab zetaab deleted the fixregion branch February 20, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants