mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add in imagePullSecrets config for kube2iam chart (#18815)
Signed-off-by: Benjamin Farley <benalfarley@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
4055b4c48b
commit
ef59e24b7f
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: kube2iam
|
||||
version: 2.0.2
|
||||
version: 2.0.3
|
||||
appVersion: 0.10.7
|
||||
description: Provide IAM credentials to pods based on annotations.
|
||||
keywords:
|
||||
|
||||
@@ -51,6 +51,7 @@ Parameter | Description | Default
|
||||
`image.repository` | Image | `jtblin/kube2iam`
|
||||
`image.tag` | Image tag | `0.10.7`
|
||||
`image.pullPolicy` | Image pull policy | `IfNotPresent`
|
||||
`image.pullSecrets` | Image pull secrets | `[]`
|
||||
`nodeSelector` | node labels for pod assignment | `{}`
|
||||
`podAnnotations` | annotations to be added to pods | `{}`
|
||||
`priorityClassName` | priorityClassName to be added to pods | `{}`
|
||||
|
||||
@@ -25,3 +25,32 @@ Create chart name and version as used by the chart label.
|
||||
{{- define "kube2iam.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "kube2iam.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -21,6 +21,7 @@ spec:
|
||||
{{ toYaml .Values.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "kube2iam.imagePullSecrets" . | indent 6 }}
|
||||
containers:
|
||||
- name: kube2iam
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
|
||||
@@ -37,6 +37,12 @@ image:
|
||||
repository: jtblin/kube2iam
|
||||
tag: 0.10.7
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
# AWS Access keys to inject as environment variables
|
||||
aws:
|
||||
|
||||
Reference in New Issue
Block a user