mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
stable/kube2iam: added support for aws access keys (#2675)
Added a secret resource to allow setting AWS access keys and region
This commit is contained in:
committed by
Michael Goodness
parent
442cc3c5c5
commit
e601cef6eb
@@ -1,5 +1,5 @@
|
||||
name: kube2iam
|
||||
version: 0.6.0
|
||||
version: 0.6.1
|
||||
description: Provide IAM credentials to pods based on annotations.
|
||||
keywords:
|
||||
- kube2iam
|
||||
|
||||
@@ -42,6 +42,22 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
{{- if and .Values.aws.secret_key .Values.aws.access_key }}
|
||||
- name: AWS_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "kube2iam.fullname" . }}
|
||||
key: aws_access_key_id
|
||||
- name: AWS_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "kube2iam.fullname" . }}
|
||||
key: aws_secret_access_key
|
||||
{{- end }}
|
||||
{{- if .Values.aws.region }}
|
||||
- name: AWS_DEFAULT_REGION
|
||||
value: {{ .Values.aws.region }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8181
|
||||
resources:
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if and .Values.aws.secret_key .Values.aws.access_key -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "kube2iam.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "kube2iam.fullname" . }}
|
||||
type: Opaque
|
||||
data:
|
||||
aws_access_key_id: {{ .Values.aws.access_key | b64enc | quote }}
|
||||
aws_secret_access_key: {{ .Values.aws.secret_key | b64enc | quote }}
|
||||
{{- end }}
|
||||
@@ -14,6 +14,12 @@ image:
|
||||
tag: 0.7.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
# AWS Access keys to inject as environment variables
|
||||
aws:
|
||||
secret_key: ""
|
||||
access_key: ""
|
||||
region: ""
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user