Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
feat: Update aws-sdk to enable IRSA (AWS IAM Roles for ServiceAccount…
Browse files Browse the repository at this point in the history
…s) support, add securityContext to helm chart (#200)

- Update AWS SDK version
- securityContext in a helm chart
  • Loading branch information
arruzk authored and Flydiverny committed Nov 7, 2019
1 parent 25e2f74 commit 165662c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 48 deletions.
10 changes: 9 additions & 1 deletion charts/kubernetes-external-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ $ helm install --name my-release external-secrets/kubernetes-external-secrets

> **Tip:** A namespace can be specified by the `Helm` option '`--namespace kube-external-secrets`'
To install the chart with [AWS IAM Roles for Service Accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html):

```bash
$ helm install --name my-release --set securityContext.fsGroup=65534 --set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"='arn:aws:iam::111111111111:role/ROLENAME' external-secrets/kubernetes-external-secrets
```

## Uninstalling the Chart

To uninstall/delete the deployment:
Expand Down Expand Up @@ -49,8 +55,10 @@ The following table lists the configurable parameters of the `kubernetes-externa
| `nameOverride` | Override the name of app | `nil` |
| `fullnameOverride` | Override the full name of app | `nil` |
| `rbac.create` | Create & use RBAC resources | `true` |
| `securityContext.fsGroup` | Security context for the container | `{}` |
| `serviceAccount.create` | Whether a new service account name should be created. | `true` |
| `serviceAccount.name` | Service account to be used. | automatically generated
| `serviceAccount.name` | Service account to be used. | automatically generated |
| `serviceAccount.annotations` | Annotations to be added to service account | `nil` |
| `podAnnotations` | Annotations to be added to pods | `{}` |
| `replicaCount` | Number of replicas | `1` |
| `nodeSelector` | node labels for pod assignment | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions charts/kubernetes-external-secrets/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ template "kubernetes-external-secrets.serviceAccountName" . }}
{{- if .Values.securityContext }}
securityContext: {{ toYaml .Values.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/kubernetes-external-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ fullnameOverride: ""

podAnnotations: {}

securityContext: {}
# fsGroup: 65534

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down
90 changes: 44 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"node": ">=12.0.0"
},
"dependencies": {
"aws-sdk": "^2.433.0",
"aws-sdk": "^2.566.0",
"express": "^4.17.1",
"json-stream": "^1.0.0",
"kubernetes-client": "^8.3.0",
Expand Down

0 comments on commit 165662c

Please sign in to comment.