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

Update supported SDKs for JS support #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion docs/sdk-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ guide for those that have support already.
| [AWS CLI](#aws-cli) | :heavy_check_mark: | `>=1.16.43` | |
| [Ruby AWS SDK](#) | :heavy_plus_sign: | | Supported but not yet tested ([aws-sdk-ruby/#1820](https://github.com/aws/aws-sdk-ruby/pull/1820)) |
| [Golang AWS SDK](#golang-aws-sdk) | :heavy_check_mark: | `>=v1.16.2` | |
| [JS AWS SDK](#) | :heavy_multiplication_x: | | Not yet supported ([aws-sdk-js/#1923](https://github.com/aws/aws-sdk-js/pull/1923)) |
| [JS AWS SDK](#js-aws-sdk) | :heavy_plus_sign: | `>=2.429.0` | |

## Java AWS SDK (JVM)

Expand Down Expand Up @@ -72,6 +72,60 @@ You also need to mount the secret named after the `AWSIAMRole` resource into the

See full [Java example project](https://github.com/mikkeloscar/kube-aws-iam-controller-java-example).

## JS AWS SDK

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-iam-js-example
spec:
replicas: 1
selector:
matchLabels:
application: aws-iam-js-example
template:
metadata:
labels:
application: aws-iam-js-example
spec:
containers:
- name: aws-iam-python-example
image: mikkeloscar/kube-aws-iam-controller-js-example:latest
env:
# must be set for the AWS SDK/AWS CLI to find the credentials file.
- name: AWS_SDK_LOAD_CONFIG
value: "true"
- name: AWS_SHARED_CREDENTIALS_FILE # used by JS SDK
value: /meta/aws-iam/credentials.process
- name: AWS_CONFIG_FILE
value: /meta/aws-iam/credentials.process
mikkeloscar marked this conversation as resolved.
Show resolved Hide resolved
- name: AWS_DEFAULT_REGION # adjust to your AWS region
value: eu-central-1
volumeMounts:
- name: aws-iam-credentials
mountPath: /meta/aws-iam
readOnly: true
volumes:
- name: aws-iam-credentials
secret:
secretName: aws-iam-js-example # name of the AWSIAMRole resource
---
apiVersion: zalando.org/v1
kind: AWSIAMRole
metadata:
name: aws-iam-js-example
spec:
roleReference: aws-iam-example
```

It's important that you set the `AWS_SHARED_CREDENTIALS_FILE` and `AWS_CONFIG_FILE` environment
variables as shown in the example as well as mounting the secret named after the
`AWSIAMRole` resource into the pod under `/meta/aws-iam`. This
secret will be provisioned by the **kube-aws-iam-controller**.

See full [JS example project](https://github.com/mikkeloscar/kube-aws-iam-controller-js-example).

## Python AWS SDK (boto3)

| SDK | Tested version |
Expand Down