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

feat: support for multiple s3 profiles #8963

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

starpit
Copy link
Contributor

@starpit starpit commented Aug 1, 2022

Up till now, we only supported a single profile. Worse, if the user had more than one including a profile named "default", we would always use default; otherwise we would pick the first.

BREAKING CHANGE: with this PR, the aws s3 mount points are of the form /s3/aws/default and /s3/aws/myOtherProfile. Any logic that was hard-coding an expectation that /s3/aws/mybucket would work must now specify the profile explicitly e.g. /s3/aws/default/mybucket

Also, neither the aws config/credentials nor the aws CLI support encoding the endpoint url in a config file. See aws/aws-cli#1270

Lacking this support, for now, this PR assumes that, if needed, a profile's endpoint_url is a config key with that name in the config file, e.g.

[default]
endpoint_url=https://my-s3-server.com
...

Description of what you did:

My PR is a:

  • 💥 Breaking change
  • 🐛 Bug fix
  • 💅 Enhancement
  • 🚀 New feature

Please confirm that your PR fulfills these requirements

  • Multiple commits are squashed into one commit.
  • The commit message follows Conventional Commits, which allows us to autogenerate release notes; e.g. fix(plugins/plugin-k8s): fixed annoying bugs
  • All npm dependencies are pinned.

Up till now, we only supported a single profile. Worse, if the user had more than one *including* a profile named "default", we would always use default; otherwise we would pick the first.

BREAKING CHANGE: with this PR, the aws s3 mount points are of the form `/s3/aws/default` and `/s3/aws/myOtherProfile`. Any logic that was hard-coding an expectation that `/s3/aws/mybucket` would work must now specify the profile explicitly e.g. `/s3/aws/default/mybucket`

Also, neither the aws config/credentials nor the `aws` CLI support encoding the endpoint url in a config file. See aws/aws-cli#1270

Lacking this support, for now, this PR assumes that, if needed, a profile's `endpoint_url` is a config key with that name in the `config` file, e.g.

```conf
[default]
endpoint_url=https://my-s3-server.com
...
```
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 1, 2022
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: starpit

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 1, 2022
@starpit starpit merged commit 5434230 into kubernetes-sigs:master Aug 1, 2022
@starpit starpit deleted the s3-prof branch August 1, 2022 17:14
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants