Skip to content

Commit

Permalink
add: imagePullSecret support for private container registry
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Nguyen <[email protected]>
  • Loading branch information
tylern91 authored and mrueg committed Jul 24, 2021
1 parent 52cc966 commit b77eed8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.16.2
version: 1.16.3
appVersion: 1.8.4
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand Down
2 changes: 2 additions & 0 deletions stable/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The command removes all the Kubernetes components associated with the chart and
| `image.repository` | The image repository to pull from | coredns/coredns |
| `image.tag` | The image tag to pull from | `1.8.4` |
| `image.pullPolicy` | Image pull policy | IfNotPresent |
| `image.pullSecrets` | Specify container image pull secrets | `[]` |
| `replicaCount` | Number of replicas | 1 |
| `resources.limits.cpu` | Container maximum CPU | `100m` |
| `resources.limits.memory` | Container maximum memory | `128Mi` |
Expand Down Expand Up @@ -114,6 +115,7 @@ The command removes all the Kubernetes components associated with the chart and
| `autoscaler.image.repository` | The image repository to pull autoscaler from | k8s.gcr.io/cluster-proportional-autoscaler-amd64 |
| `autoscaler.image.tag` | The image tag to pull autoscaler from | `1.8.1` |
| `autoscaler.image.pullPolicy` | Image pull policy for the autoscaler | IfNotPresent |
| `autoscaler.image.pullSecrets` | Specify container image pull secrets | `[]` |
| `autoscaler.priorityClassName` | Optional priority class for the autoscaler pod. `priorityClassName` used if not set. | `""` |
| `autoscaler.affinity` | Affinity settings for pod assignment for autoscaler | {} |
| `autoscaler.nodeSelector` | Node labels for pod assignment for autoscaler | {} |
Expand Down
6 changes: 6 additions & 0 deletions stable/coredns/templates/serviceaccount-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ metadata:
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
{{- if .Values.autoscaler.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.autoscaler.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions stable/coredns/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions stable/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ image:
repository: coredns/coredns
tag: "1.8.4"
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

replicaCount: 1

Expand Down Expand Up @@ -246,6 +252,12 @@ autoscaler:
repository: k8s.gcr.io/cluster-proportional-autoscaler-amd64
tag: "1.8.1"
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

# Optional priority class to be used for the autoscaler pods. priorityClassName used if not set.
priorityClassName: ""
Expand Down

0 comments on commit b77eed8

Please sign in to comment.