Skip to content

Commit

Permalink
Use create for serviceAccount instead of enabled (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimxogus authored Mar 15, 2021
1 parent 71b994e commit bec2476
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ and their default values.
| `service.port` | Service port to expose | `4873` |
| `service.nodePort` | Service port to expose | none |
| `service.type` | Type of service to create | `ClusterIP` |
| `serviceAccount.enabled` | Enable service account | `false` |
| `serviceAccount.create` | Create service account | `false` |
| `serviceAccount.name` | Service account Name | none |
| `extraEnvVars` | Define environment variables to be passed to the container | `{}` |

Expand Down
2 changes: 1 addition & 1 deletion charts/verdaccio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: A lightweight private npm proxy registry (sinopia fork)
name: verdaccio
version: 1.2.0
version: 2.0.0
appVersion: 4.10.0
home: https://verdaccio.org
icon: https://cdn.verdaccio.dev/logos/default.png
Expand Down
2 changes: 1 addition & 1 deletion charts/verdaccio/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Create the name of the service account to use
*/}}
{{- define "verdaccio.serviceAccountName" -}}
{{- if .Values.serviceAccount.enabled }}
{{- if .Values.serviceAccount.create }}
{{- default (include "verdaccio.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
Expand Down
2 changes: 0 additions & 2 deletions charts/verdaccio/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ spec:
{{- include "tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ include "verdaccio.serviceAccountName" . }}
{{- end}}
containers:
- name: {{ template "verdaccio.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
2 changes: 1 addition & 1 deletion charts/verdaccio/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.serviceAccount.enabled -}}
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
Expand Down
4 changes: 2 additions & 2 deletions charts/verdaccio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ ingress:
## Service account
serviceAccount:
# Specifies whether a service account should be created
enabled: false
create: false
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and enabled is true, a name is generated using the Chart's fullname template
# If not set and create is true, a name is generated using the Chart's fullname template
name: ""

# Extra Environment Values - allows yaml definitions
Expand Down

0 comments on commit bec2476

Please sign in to comment.