Skip to content

Commit

Permalink
Make PersistentVolume local path configurable (#1088)
Browse files Browse the repository at this point in the history
* Make PersistentVolume local path configurable

* update volumeLocalPath in README

* Use volumeLocalPath variable instead of root object reference
  • Loading branch information
codering committed Sep 15, 2023
1 parent 2c6bb12 commit dbf1cef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions helm-charts/easegress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The following table lists the configurable parameters of the MegaEase Easegress
| service.adminPort | int | `31255` | nodePort for egctl access. |
| cluster.primaryReplicas | int | `1` | number of easegress service that persists cluster data to disk |
| cluster.volumeType | string | `emptyDir` | `emptyDir`: use pods internal filesystem that is not persisted when pod crashes. Use `emptyDir` only when primaryReplicas is 1. | `persistentVolume`, create as many persistenVolumes and persistentVolumeClaims as there are nodeHostnames.
| cluster.volumeLocalPath | string | `/opt/easegress` | local path of persistenVolume on nodes |
| cluster.nodeHostnames | list | `[]` | nodeHostnames are hostnames of VMs/Kubernetes nodes. Only used when `volumeType: persistentVolume`. Note that this require nodes to be static. |
| secondaryReplicas | int | `0` | number of easegress service that not persists cluster data to disk. |
| log.path | string | `/opt/easegress/log` | log path inside container |
Expand Down
3 changes: 2 additions & 1 deletion helm-charts/easegress/templates/PersistentVolume.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if eq .Values.cluster.volumeType "persistentVolume" }}
{{- $volumeLocalPath := .Values.cluster.volumeLocalPath -}}
{{- range $i, $hostname := .Values.cluster.nodeHostnames }}
apiVersion: v1
kind: PersistentVolume
Expand All @@ -13,7 +14,7 @@ spec:
persistentVolumeReclaimPolicy: Delete
storageClassName: easegress-storage
local:
path: /opt/easegress
path: {{$volumeLocalPath}}
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/easegress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ image:
cluster:
primaryReplicas: 1 # or 3,5,7
volumeType: emptyDir # or persistentVolume
volumeLocalPath: /opt/easegress
# nodeHostnames are hostnames of VMs/Kubernetes nodes. Only used when `volumeType: persistentVolume`.
# Note that this require nodes to be static.
nodeHostnames:
Expand Down

0 comments on commit dbf1cef

Please sign in to comment.