diff --git a/charts/memgraph/Chart.yaml b/charts/memgraph/Chart.yaml index f157e11..945b448 100644 --- a/charts/memgraph/Chart.yaml +++ b/charts/memgraph/Chart.yaml @@ -2,17 +2,17 @@ apiVersion: v2 name: memgraph home: https://memgraph.com/ type: application -version: 0.1.1 -appVersion: "2.10.0" +version: 0.1.2 +appVersion: "2.16.0" description: MemgraphDB Helm Chart keywords: - - graph - - database - - cypher - - analytics +- graph +- database +- cypher +- analytics icon: https://public-assets.memgraph.com/memgraph-logo/logo-large.png sources: - - https://github.com/memgraph/memgraph +- https://github.com/memgraph/memgraph maintainers: - - name: Memgraph - email: tech@memgraph.com +- name: Memgraph + email: tech@memgraph.com diff --git a/charts/memgraph/README.md b/charts/memgraph/README.md index ef5cb4c..c236b59 100644 --- a/charts/memgraph/README.md +++ b/charts/memgraph/README.md @@ -18,23 +18,51 @@ Or you can modify a `values.yaml` file and override the desired values: helm install memgraph/memgraph -f values.yaml ``` -## Configuration options +## Configuration Options + The following table lists the configurable parameters of the Memgraph chart and their default values. -parameter | description | default ---- | --- | --- -`image` | Memgraph Docker image repository | `memgraph` -`persistentVolumeClaim.storagePVC` | Enable persistent volume claim for storage | `true` -`persistanceVolumeClaim.storagePVCSize` | Size of the persistent volume claim for storage | `1Gi` -`persistentVolumeClaim.logPVC` | Enable persistent volume claim for logs | `true` -`persistanceVolumeClaim.logPVCSize` | Size of the persistent volume claim for logs | `256Mi` -`service.type` | Kubernetes service type | `NodePort` -`service.port` | Kubernetes service port | `7687` -`service.targetPort` | Kubernetes service target port | `7687` -`memgraphConfig` | Memgraph configuration settings | `["--also-log-to-stderr=true"]` +| Parameter | Description | Default | +|---------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------| +| `image.repository` | Memgraph Docker image repository | `memgraph/memgraph` | +| `image.tag` | Specific tag for the Memgraph Docker image. Overrides the image tag whose default is chart version. | `""` (Defaults to chart's app version) | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `replicaCount` | Number of Memgraph instances to run. Note: no replication or HA support. | `1` | +| `service.type` | Kubernetes service type | `NodePort` | +| `service.port` | Kubernetes service port | `7687` | +| `service.targetPort` | Kubernetes service target port | `7687` | +| `service.protocol` | Protocol used by the service | `TCP` | +| `service.annotations` | Annotations to add to the service | `{}` | +| `persistentVolumeClaim.storagePVC` | Enable persistent volume claim for storage | `true` | +| `persistentVolumeClaim.storagePVCClassName` | Storage class name for the persistent volume claim for storage. If not specified, default used. | `""` | +| `persistentVolumeClaim.storagePVCSize` | Size of the persistent volume claim for storage | `1Gi` | +| `persistentVolumeClaim.logPVC` | Enable persistent volume claim for logs | `true` | +| `persistentVolumeClaim.logPVCClassName` | Storage class name for the persistent volume claim for logs. If not specified, default used. | `""` | +| `persistentVolumeClaim.logPVCSize` | Size of the persistent volume claim for logs | `256Mi` | +| `memgraphConfig` | List of strings defining Memgraph configuration settings | `["--also-log-to-stderr=true"]` | +| `statefulSetAnnotations` | Annotations to add to the stateful set | `{}` | +| `podAnnotations` | Annotations to add to the pod | `{}` | +| `resources` | CPU/Memory resource requests/limits. Left empty by default. | `{}` (See note on uncommenting) | +| `serviceAccount.create` | Specifies whether a service account should be created | `true` | +| `serviceAccount.annotations` | Annotations to add to the service account | `{}` | +| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated. | `""` | + +**Note:** It's often recommended not to specify default resources and leave it as a conscious choice for the user. If you want to specify resources, uncomment the following lines in your `values.yaml`, adjust them as necessary: + +```yaml +resources: + limits: + cpu: "100m" + memory: "128Mi" + requests: + cpu: "100m" + memory: "128Mi" -The `memgraphConfig` parameter should be a list of strings defining the values of Memgraph configuration settings. For example, this is how you can define `memgraphConfig` parameter in your `values.yaml`: ``` + +The `memgraphConfig` parameter should be a list of strings defining the values of Memgraph configuration settings. For example, this is how you can define `memgraphConfig` parameter in your `values.yaml`: + +```yaml memgraphConfig: - "--also-log-to-stderr=true" - "--log-level=TRACE" diff --git a/charts/memgraph/templates/persistentvolumeclaim.yaml b/charts/memgraph/templates/persistentvolumeclaim.yaml deleted file mode 100644 index f027ace..0000000 --- a/charts/memgraph/templates/persistentvolumeclaim.yaml +++ /dev/null @@ -1,26 +0,0 @@ - -{{ if .Values.persistentVolumeClaim.storagePVC }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "memgraph.fullname" . }}-lib-storage -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.persistentVolumeClaim.storagePVCSize }} -{{ end }} ---- -{{ if .Values.persistentVolumeClaim.logPVC }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "memgraph.fullname" . }}-log-storage -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.persistentVolumeClaim.logPVCSize }} -{{ end }} diff --git a/charts/memgraph/templates/statefulset.yaml b/charts/memgraph/templates/statefulset.yaml index 2a02ba5..1e258a1 100644 --- a/charts/memgraph/templates/statefulset.yaml +++ b/charts/memgraph/templates/statefulset.yaml @@ -28,17 +28,6 @@ spec: {{- end }} spec: securityContext: - volumes: - {{- if .Values.persistentVolumeClaim.storagePVC }} - - name: memgraph-lib-storage - persistentVolumeClaim: - claimName: {{ include "memgraph.fullname" . }}-lib-storage - {{- end }} - {{- if .Values.persistentVolumeClaim.logPVC }} - - name: memgraph-log-storage - persistentVolumeClaim: - claimName: {{ include "memgraph.fullname" . }}-log-storage - {{- end }} containers: - name: memgraph image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" @@ -58,10 +47,37 @@ spec: {{- end }} volumeMounts: {{- if .Values.persistentVolumeClaim.storagePVC }} - - name: memgraph-lib-storage + - name: {{ include "memgraph.fullname" . }}-lib-storage mountPath: /var/lib/memgraph {{- end }} {{- if .Values.persistentVolumeClaim.logPVC }} - - name: memgraph-log-storage + - name: {{ include "memgraph.fullname" . }}-log-storage mountPath: /var/log/memgraph {{- end }} + volumeClaimTemplates: + {{- if .Values.persistentVolumeClaim.storagePVC }} + - metadata: + name: {{ include "memgraph.fullname" . }}-lib-storage + spec: + accessModes: + - "ReadWriteOnce" + {{- if .Values.persistentVolumeClaim.storagePVCClassName }} + storageClassName: {{ .Values.persistentVolumeClaim.storagePVCClassName }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistentVolumeClaim.storagePVCSize }} + {{- end }} + {{- if .Values.persistentVolumeClaim.logPVC }} + - metadata: + name: {{ include "memgraph.fullname" . }}-log-storage + spec: + accessModes: + - "ReadWriteOnce" + {{- if .Values.persistentVolumeClaim.logPVCClassName }} + storageClassName: {{ .Values.persistentVolumeClaim.logPVCClassName }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistentVolumeClaim.logPVCSize }} + {{- end }} diff --git a/charts/memgraph/values.yaml b/charts/memgraph/values.yaml index 638c1df..237f18e 100644 --- a/charts/memgraph/values.yaml +++ b/charts/memgraph/values.yaml @@ -4,6 +4,7 @@ image: tag: "" pullPolicy: IfNotPresent +# Can be increased to more but there is no replication or HA support in this chart. replicaCount: 1 service: @@ -14,8 +15,10 @@ service: annotations: {} persistentVolumeClaim: + storagePVCClassName: "" storagePVC: true storagePVCSize: 1Gi + logPVCClassName: "" logPVC: true logPVCSize: 256Mi