diff --git a/scripts/helm/app/openreplay/templates/deployment.yaml b/scripts/helm/app/openreplay/templates/deployment.yaml index a2259a852..e578b4bea 100644 --- a/scripts/helm/app/openreplay/templates/deployment.yaml +++ b/scripts/helm/app/openreplay/templates/deployment.yaml @@ -47,14 +47,26 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} {{- if .Values.pvc }} + {{- if eq .Values.pvc.name "hostPath" }} volumeMounts: - - name: {{ .Values.pvc.name }} + - mountPath: {{ .Values.pvc.mountPath }} + name: datadir + volumes: + - name: datadir + hostPath: + # Ensure the file directory is created. + path: {{ .Values.pvc.hostMountPath }} + type: DirectoryOrCreate + {{- else }} + volumeMounts: + - name: datadir mountPath: {{ .Values.pvc.mountPath }} volumes: - name: {{ .Values.pvc.name }} persistentVolumeClaim: claimName: {{ .Values.pvc.volumeName }} {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/scripts/helm/app/openreplay/templates/pvc.yaml b/scripts/helm/app/openreplay/templates/pvc.yaml index 2180024e6..fc02fa6c3 100644 --- a/scripts/helm/app/openreplay/templates/pvc.yaml +++ b/scripts/helm/app/openreplay/templates/pvc.yaml @@ -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: diff --git a/scripts/helm/app/sink.yaml b/scripts/helm/app/sink.yaml index 51113fdd0..8d6239d3e 100644 --- a/scripts/helm/app/sink.yaml +++ b/scripts/helm/app/sink.yaml @@ -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: diff --git a/scripts/helm/app/storage.yaml b/scripts/helm/app/storage.yaml index 39cca7f6b..ef839210e 100644 --- a/scripts/helm/app/storage.yaml +++ b/scripts/helm/app/storage.yaml @@ -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: diff --git a/scripts/helm/install.sh b/scripts/helm/install.sh index 881d98808..529d08a8c 100755 --- a/scripts/helm/install.sh +++ b/scripts/helm/install.sh @@ -31,7 +31,7 @@ which docker &> /dev/null || { # response {"data":{"valid": TRUE|FALSE, "expiration": expiration date in ms}} # Installing k3s -curl -sL https://get.k3s.io | sudo K3S_KUBECONFIG_MODE="644" INSTALL_K3S_VERSION='v1.19.5+k3s2' INSTALL_K3S_EXEC="--no-deploy=traefik --docker" sh - +curl -sL https://get.k3s.io | sudo K3S_KUBECONFIG_MODE="644" INSTALL_K3S_VERSION='v1.19.5+k3s2' INSTALL_K3S_EXEC="--no-deploy=traefik" sh - mkdir ~/.kube sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config sudo chown $(whoami) ~/.kube/config diff --git a/scripts/helm/roles/openreplay/defaults/main.yaml b/scripts/helm/roles/openreplay/defaults/main.yaml index bcd303672..e706891fb 100644 --- a/scripts/helm/roles/openreplay/defaults/main.yaml +++ b/scripts/helm/roles/openreplay/defaults/main.yaml @@ -4,6 +4,6 @@ db_name: "" app_name: "" db_list: - "minio" - - "nfs-server-provisioner" - "postgresql" - "redis" + # - "nfs-server-provisioner"