3 Commits

Author SHA1 Message Date
Devin Canterberry
e224a31190 🏁 v1.16.0 Release 2021-12-11 14:20:24 -08:00
Devin Canterberry
a36de54d0c Merge pull request #44 from MrSimonEmms/main
Conditionally create service account and add to deployment
2021-12-11 14:19:18 -08:00
Simon Emms
2b24174cea Conditionally create service account and add to deployment
Signed-off-by: Simon Emms <simon@simonemms.com>
2021-12-07 11:54:11 +00:00
5 changed files with 31 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.15.0
version: 1.16.0
appVersion: 2.7.1
home: https://hub.docker.com/_/registry/
icon: https://helm.twun.io/docker-registry.png

View File

@@ -43,6 +43,9 @@ their default values.
| `persistence.size` | Amount of space to claim for PVC | `10Gi` |
| `persistence.storageClass` | Storage Class to use for PVC | `-` |
| `persistence.existingClaim` | Name of an existing PVC to use for config | `nil` |
| `serviceAccount.create` | Create ServiceAccount | `false` |
| `serviceAccount.name` | ServiceAccount name | `nil` |
| `serviceAccount.annotations` | Annotations to add to the ServiceAccount | `{}` |
| `service.port` | TCP port on which the service is exposed | `5000` |
| `service.type` | service type | `ClusterIP` |
| `service.clusterIP` | if `service.type` is `ClusterIP` and this is non-empty, sets the cluster IP of the service | `nil` |

View File

@@ -33,6 +33,9 @@ spec:
{{ toYaml $.Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}

View File

@@ -0,0 +1,19 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .Values.serviceAccount.name }}
name: {{ .Values.serviceAccount.name }}
{{- else }}
name: {{ include "docker-registry.fullname" . }}
{{- end }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
{{- end -}}

View File

@@ -12,6 +12,11 @@ updateStrategy: {}
podAnnotations: {}
podLabels: {}
serviceAccount:
create: false
name: ""
annotations: {}
image:
repository: registry
tag: 2.7.1