@@ -5,12 +5,13 @@ metadata:
55 labels :
66 {{- include "codexdocs.labels" . | nindent 4 }}
77spec :
8- {{/* {{- if not .Values.autoscaling.enabled }}*/}}
9- {{/* replicas: {{ .Values.replicaCount }}*/}}
10- {{/* {{- end }}*/}}
8+ {{- if or (eq .Values.configuration.database.driver "local") (eq .Values.configuration.uploads.driver "local")}}
119 replicas : 1
1210 strategy :
1311 type : Recreate
12+ {{- else }}
13+ replicas : {{ .Values.replicaCount }}
14+ {{- end }}
1415 selector :
1516 matchLabels :
1617 {{- include "codexdocs.selectorLabels" . | nindent 6 }}
@@ -34,35 +35,40 @@ spec:
3435 configMap :
3536 defaultMode : 420
3637 name : {{ .Release.Name }}-config
38+ {{- if eq .Values.configuration.database.driver "local" }}
3739 - name : {{ include "codexdocs.fullname" . }}-db
3840 persistentVolumeClaim :
3941 claimName : {{ include "codexdocs.fullname" . }}-db
42+ {{- end }}
43+ {{- if eq .Values.configuration.uploads.driver "local" }}
4044 - name : {{ include "codexdocs.fullname" . }}-uploads
4145 persistentVolumeClaim :
4246 claimName : {{ include "codexdocs.fullname" . }}-uploads
47+ {{- end }}
4348 containers :
4449 - name : {{ .Chart.Name }}
4550 securityContext :
4651 {{- toYaml .Values.securityContext | nindent 12 }}
4752 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4853 imagePullPolicy : {{ .Values.image.pullPolicy }}
4954 env :
50- - name : PASSWORD
55+ - name : APP_CONFIG_auth_password
5156 valueFrom :
5257 secretKeyRef :
5358 name : {{ template "codexdocs.secretName" . }}
5459 key : {{ template "codexdocs.secretPasswordKey" . }}
5560 volumeMounts :
5661 - name : config
57- mountPath : /usr/src/app/.codexdocsrc
58- subPath : " codexdocsrc"
59- - name : config
60- mountPath : /usr/src/app/config/production.json
61- subPath : " production.json"
62+ mountPath : /usr/src/app/config/docs-config.yaml
63+ subPath : " docs-config.yaml"
64+ {{- if eq .Values.configuration.database.driver "local" }}
6265 - name : {{ include "codexdocs.fullname" . }}-db
63- mountPath : {{ .Values.configuration.production.database }}
66+ mountPath : {{ .Values.configuration.database.local.path }}
67+ {{- end}}
68+ {{- if eq .Values.configuration.uploads.driver "local" }}
6469 - name : {{ include "codexdocs.fullname" . }}-uploads
65- mountPath : {{ .Values.configuration.production.uploads }}
70+ mountPath : {{ .Values.configuration.uploads.local.path }}
71+ {{- end}}
6672 ports :
6773 - name : http
6874 containerPort : 3000
0 commit comments