Merge pull request #200 from rjshrjndrn/main

Replace nfs with host volume.
Replace docker with containerd for kubernetes installation.
This commit is contained in:
Rajesh Rajendran 2021-10-18 19:12:04 +00:00 committed by GitHub
commit 6d755ddd18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 6 deletions

View file

@ -47,14 +47,26 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.pvc }} {{- if .Values.pvc }}
{{- if eq .Values.pvc.name "hostPath" }}
volumeMounts: 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 }} mountPath: {{ .Values.pvc.mountPath }}
volumes: volumes:
- name: {{ .Values.pvc.name }} - name: {{ .Values.pvc.name }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ .Values.pvc.volumeName }} claimName: {{ .Values.pvc.volumeName }}
{{- end }} {{- end }}
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View file

@ -1,5 +1,5 @@
{{- if .Values.pvc }} {{- if .Values.pvc }}
{{- if .Values.pvc.create }} {{- if and (.Values.pvc.create) (ne .Values.pvc.name "hostPath") }}
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:

View file

@ -23,10 +23,11 @@ resources:
pvc: pvc:
create: true create: true
name: nfs name: hostPath
storageClassName: nfs storageClassName: nfs
volumeName: nfs volumeName: nfs
mountPath: /mnt/efs mountPath: /mnt/efs
hostMountPath: /openreplay/storage/nfs
storageSize: 5Gi storageSize: 5Gi
env: env:

View file

@ -24,10 +24,11 @@ resources:
pvc: pvc:
# PVC Created from filesink.yaml # PVC Created from filesink.yaml
create: false create: false
name: nfs name: hostPath
storageClassName: nfs storageClassName: nfs
volumeName: nfs volumeName: nfs
mountPath: /mnt/efs mountPath: /mnt/efs
hostMountPath: /openreplay/storage/nfs
storageSize: 5Gi storageSize: 5Gi
env: env:

View file

@ -31,7 +31,7 @@ which docker &> /dev/null || {
# response {"data":{"valid": TRUE|FALSE, "expiration": expiration date in ms}} # response {"data":{"valid": TRUE|FALSE, "expiration": expiration date in ms}}
# Installing k3s # 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 mkdir ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(whoami) ~/.kube/config sudo chown $(whoami) ~/.kube/config

View file

@ -4,6 +4,6 @@ db_name: ""
app_name: "" app_name: ""
db_list: db_list:
- "minio" - "minio"
- "nfs-server-provisioner"
- "postgresql" - "postgresql"
- "redis" - "redis"
# - "nfs-server-provisioner"