feat(kubernetes): use host volume if nfs not explicitly specified.
Note: Can't scale sink/storage more than one pod, and one machine
This commit is contained in:
parent
bb680288f7
commit
26fc34edef
4 changed files with 17 additions and 3 deletions
|
|
@ -47,6 +47,17 @@ spec:
|
|||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- if .Values.pvc }}
|
||||
{{- if eq .Values.pvc.name "hostPath" }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.pvc.mountPath }}
|
||||
name: {{ .Values.pvc.name }}
|
||||
volumes:
|
||||
- name: mydir
|
||||
hostPath:
|
||||
# Ensure the file directory is created.
|
||||
path: {{ .Values.pvc.hostMountPath }}
|
||||
type: DirectoryOrCreate
|
||||
{{- else }}
|
||||
volumeMounts:
|
||||
- name: {{ .Values.pvc.name }}
|
||||
mountPath: {{ .Values.pvc.mountPath }}
|
||||
|
|
@ -55,6 +66,7 @@ spec:
|
|||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.pvc.volumeName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.pvc }}
|
||||
{{- if .Values.pvc.create }}
|
||||
{{- if and (.Values.pvc.create) (ne .Values.pvc.name "hostPath") }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@ resources:
|
|||
|
||||
pvc:
|
||||
create: true
|
||||
name: nfs
|
||||
name: hostPath
|
||||
storageClassName: nfs
|
||||
volumeName: nfs
|
||||
mountPath: /mnt/efs
|
||||
hostMountPath: /openreplay/storage/nfs
|
||||
storageSize: 5Gi
|
||||
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@ resources:
|
|||
pvc:
|
||||
# PVC Created from filesink.yaml
|
||||
create: false
|
||||
name: nfs
|
||||
name: hostPath
|
||||
storageClassName: nfs
|
||||
volumeName: nfs
|
||||
mountPath: /mnt/efs
|
||||
hostMountPath: /openreplay/storage/nfs
|
||||
storageSize: 5Gi
|
||||
|
||||
env:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue