Skip to content

Commit

Permalink
https://github.com/allegroai/trains-server-k8s/issues/1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaked committed Dec 27, 2019
1 parent 78a2df8 commit c3047bc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
46 changes: 34 additions & 12 deletions trains-server-chart/templates/apiserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,43 @@ spec:
value: {{ .Values.apiserver.mongoServiceName }}
- name: REDIS_SERVICE_HOST
value: {{ .Values.apiserver.redisServiceName }}
{{- if .Values.use_secrets_flexvolume }}
- name: TRAINS_CONFIG_DIR
value: /opt/trains/config:/opt/trains/secrets
{{- else }}
- name: TRAINS_CONFIG_DIR
value: /opt/trains/config
{{- end }}
args:
- apiserver
volumeMounts:
- mountPath: /var/log/trains
name: apiserver-hostpath0
volumeMounts:
- mountPath: /opt/trains/config
name: apiserver-hostpath1
volumeMounts:
{{- if .Values.use_secrets_flexvolume }}
- mountPath: /opt/trains/secrets
name: apiserver-azurekeyvault
{{- end }}
{{- with .Values.apiserver.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: Always
nodeSelector:
{{ .Values.trains.nodeSelector}}
volumes:
- name: apiserver-hostpath0
hostPath:
path: /opt/trains/logs
- name: apiserver-hostpath1
hostPath:
path: /opt/trains/config
{{- if .Values.use_secrets_flexvolume }}
- name: apiserver-azurekeyvault
flexVolume:
driver: "azure/kv"
secretRef:
name: {{ .Values.fv.secretRef }}
options:
usepodidentity: "{{ .Values.fv.usepodidentity }}"
resourcegroup: "{{ .Values.fv.resourcegroup }}"
keyvaultname: "{{ .Values.fv.keyvaultname }}"
keyvaultobjectnames: "{{ .Values.fv.keyvaultobjectnames }}"
keyvaultobjectaliases: "{{ .Values.fv.keyvaultobjectaliases }}"
keyvaultobjecttypes: "{{ .Values.fv.keyvaultobjecttypes }}"
subscriptionid: "{{ .Values.fv.subscriptionid }}"
tenantid: "{{ .Values.fv.tenantid }}"
{{- end }}
{{- with .Values.apiserver.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
16 changes: 15 additions & 1 deletion trains-server-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ apiserver:
mongoServicePort: "27017"
redisServiceName: redis
redisServicePort: "6379"
configDir: /opt/trains/config
volumeMounts:
- mountPath: /var/log/trains
name: apiserver-hostpath0
- mountPath: /opt/trains/config
name: apiserver-hostpath1
volumes:
- name: apiserver-hostpath0
hostPath:
path: /opt/trains/logs
- name: apiserver-hostpath1
hostPath:
path: /opt/trains/config
elasticsearch:
esJavaOpts: "-Xms2g -Xmx2g"
services:
Expand All @@ -28,4 +41,5 @@ services:
elasticsearch:
name: elasticsearch-service
redis:
name: redis
name: redis
use_secrets_flexvolume: false

0 comments on commit c3047bc

Please sign in to comment.