Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from Shaked/master
Browse files Browse the repository at this point in the history
Support for FlexVolume in volumes
  • Loading branch information
clearml-bot authored Jan 8, 2020
2 parents 54876d4 + 5d7cd69 commit 3ca14ea
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 11 deletions.
45 changes: 34 additions & 11 deletions trains-server-chart/templates/apiserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,43 @@ spec:
value: {{ .Values.apiserver.redisServiceName }}
- name: TRAINS_REDIS_SERVICE_PORT
value: "{{ .Values.apiserver.redisServicePort }}"
{{- 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
- 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 }}
14 changes: 14 additions & 0 deletions 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 @@ -29,3 +42,4 @@ services:
name: elasticsearch-service
redis:
name: redis
use_secrets_flexvolume: false

0 comments on commit 3ca14ea

Please sign in to comment.