Skip to content

Commit a7c525f

Browse files
authored
adding service-account as optional (#15)
1 parent 5b1ae81 commit a7c525f

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ and their default values.
8181
| `service.port` | Service port to expose | `4873` |
8282
| `service.nodePort` | Service port to expose | none |
8383
| `service.type` | Type of service to create | `ClusterIP` |
84+
| `serviceAccount.enabled` | Enable service account | `false` |
85+
| `serviceAccount.name` | Service account Name | none |
86+
| `extraEnvVars` | Define environment variables to be passed to the container | `{}` |
8487

8588
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
8689

charts/verdaccio/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: A lightweight private npm proxy registry (sinopia fork)
33
name: verdaccio
4-
version: 0.8.0
4+
version: 0.8.1
55
appVersion: 3.12.0
66
home: https://verdaccio.org
77
icon: https://cdn.verdaccio.dev/logos/default.png

charts/verdaccio/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ metadata:
88
release: {{ .Release.Name }}
99
name: {{ template "verdaccio.fullname" . }}
1010
spec:
11+
{{- if .Values.serviceAccount.enabled }}
12+
serviceAccountName: {{ template ".Values.serviceAccount.name" . }}
13+
{{- end}}
1114
replicas: {{ .Values.replicaCount }}
1215
selector:
1316
matchLabels:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.serviceAccount.enabled }}
2+
---
3+
apiVersion: v1
4+
kind: ServiceAccount
5+
metadata:
6+
name: {{ template ".Values.serviceAccount.name" . }}
7+
labels:
8+
app: {{ template "verdaccio.name" . }}
9+
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
10+
release: {{ .Release.Name }}
11+
heritage: {{ .Release.Service }}
12+
{{- end }}

charts/verdaccio/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ ingress:
4848
# hosts:
4949
# - npm.blah.com
5050

51+
## Service account
52+
serviceAccount:
53+
enabled: false
54+
# name:
55+
5156
configMap: |
5257
# This is the config file used for the docker images.
5358
# It allows all users to do anything, so don't use it on production systems.

0 commit comments

Comments
 (0)