2019-05-01 01:13:10 +02:00
|
|
|
{{- if .Values.enabled }}
|
|
|
|
apiVersion: apps/v1beta2
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ template "speech.fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: {{ template "speech.name" . }}
|
|
|
|
chart: {{ template "speech.chart" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ template "speech.name" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ template "speech.name" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
spec:
|
|
|
|
securityContext:
|
|
|
|
fsGroup: 1000
|
|
|
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
|
|
|
initContainers:
|
|
|
|
- name: copy-lbrycrd-config
|
|
|
|
image: busybox
|
2019-05-17 15:19:20 +02:00
|
|
|
command: ['sh', '-c', 'cp /configmap/chainqueryConfig.json /configmap/lbryConfig.json /configmap/loggerConfig.json /configmap/mysqlConfig.json /configmap/siteConfig.json /configmap/slackConfig.json /configmap/daemon_settings.yml /config && cp /configmap/authConfig.json /private']
|
2019-05-01 01:13:10 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: configmap
|
|
|
|
mountPath: /configmap
|
|
|
|
- name: config
|
|
|
|
mountPath: /config
|
|
|
|
- name: private
|
|
|
|
mountPath: /private
|
|
|
|
containers:
|
|
|
|
- name: {{ template "speech.fullname" . }}
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
|
|
resources: {{ toYaml .Values.resources | indent 10 }}
|
|
|
|
ports:
|
|
|
|
- name: port
|
|
|
|
containerPort: {{ .Values.service.port }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: configmap
|
|
|
|
mountPath: /spee.ch/site/config
|
|
|
|
- name: private
|
|
|
|
mountPath: /spee.ch/site/private
|
2019-05-17 15:19:20 +02:00
|
|
|
- name: speech-data
|
2019-05-01 01:13:10 +02:00
|
|
|
mountPath: /data
|
2019-05-17 15:19:20 +02:00
|
|
|
{{- if .Values.lbrynet.enabled }}
|
|
|
|
- name: {{ template "speech.fullname" . }}-lbrynet
|
|
|
|
image: "{{ .Values.lbrynet.image.repository }}:{{ .Values.lbrynet.image.tag }}"
|
|
|
|
imagePullPolicy: {{ .Values.lbrynet.image.pullPolicy }}
|
|
|
|
resources: {{ toYaml .Values.resources | indent 10 }}
|
|
|
|
ports:
|
|
|
|
- name: rpc
|
|
|
|
containerPort: {{ .Values.lbrynet.service.rpcPort }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: configmap
|
|
|
|
mountPath: /etc/lbry
|
|
|
|
- name: lbrynet-home
|
|
|
|
mountPath: /home/lbrynet
|
|
|
|
- name: speech-data
|
|
|
|
mountPath: /data
|
|
|
|
{{- end }}
|
2019-05-01 01:13:10 +02:00
|
|
|
volumes:
|
|
|
|
- name: config
|
|
|
|
- name: private
|
|
|
|
- name: configmap
|
|
|
|
configMap:
|
|
|
|
name: {{ template "speech.fullname" . }}
|
2019-05-17 15:19:20 +02:00
|
|
|
- name: speech-data
|
2019-05-01 01:13:10 +02:00
|
|
|
{{- if .Values.persistence.enabled }}
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.persistence.existingClaim | default (include "speech.fullname" .) }}
|
|
|
|
{{- else }}
|
|
|
|
emptyDir: {}
|
2019-05-17 15:19:20 +02:00
|
|
|
{{- end }}
|
|
|
|
- name: lbrynet-home
|
|
|
|
{{- if .Values.persistence.enabled }}
|
|
|
|
persistentVolumeClaim:
|
|
|
|
{{- if .Values.lbrynet.persistence.existingClaim }}
|
|
|
|
claimName: {{ .Values.lbrynet.persistence.existingClaim }}
|
|
|
|
{{- else }}
|
|
|
|
claimName: {{ template "speech.fullname" .}}-lbrynet
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
emptyDir: {}
|
|
|
|
{{- end }}
|
2019-05-01 01:13:10 +02:00
|
|
|
{{- end }}
|