Skip to content

Commit

Permalink
Feat: existing secret (#100)
Browse files Browse the repository at this point in the history
Co-authored-by: Loïc Antoine-Gombeaud <[email protected]>
  • Loading branch information
LoicGombeaud and Loïc Antoine-Gombeaud authored Jun 7, 2022
1 parent 9b1c809 commit b8dda9a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ and their default values.
| `serviceAccount.name` | Service account Name | none |
| `extraEnvVars` | Define environment variables to be passed to the container | `[]` |
| `secretEnvVars` | Define sensitive environment variables to be passed to the container | `{}` |
| `existingSecret` | Existing secret containing environment variables to be passed to the container | `""` |
| `extraInitContainers` | Define additional initContainers to be added to the deployment | `[]` |
| `securityContext` | Define Container Security Context | `{runAsUser=10001}` |
| `podSecurityContext` | Define Pod Security Context | `{fsGroup=101}` |
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 node.js proxy registry
name: verdaccio
version: 4.8.0
version: 4.9.0
appVersion: 5.5.0
home: https://verdaccio.org
icon: https://cdn.verdaccio.dev/logos/default.png
Expand Down
8 changes: 7 additions & 1 deletion charts/verdaccio/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ spec:
- name: {{ template "verdaccio.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.secretEnvVars }}
{{- if or .Values.secretEnvVars .Values.existingSecret }}
envFrom:
{{- if .Values.secretEnvVars }}
- secretRef:
name: {{ template "verdaccio.fullname" . }}-env
{{- end }}
{{- if .Values.existingSecret }}
- secretRef:
name: {{ .Values.existingSecret }}
{{- end }}
{{- end }}
ports:
- containerPort: 4873
Expand Down
4 changes: 4 additions & 0 deletions charts/verdaccio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ secretEnvVars: {}
# corp_artifactory: foo
# npmjs: bar

## Existing Secret
## Existing secret containing environment variables to be passed to the container
existingSecret: ""

# Extra Init Containers - allows yaml definitions
extraInitContainers: []

Expand Down

0 comments on commit b8dda9a

Please sign in to comment.