Skip to content

Commit 4592e95

Browse files
pamanseauantejavor
andauthored
Persistent Storage with Existing Claim and other improvments (memgraph#26)
Added features: NodeAffinity ImagePullSecrets Version bump to 2.17 Added User, Password ENV Added Enterprise License and Organization ENV Probes (Liveliness, readiness, and startup) --------- Co-authored-by: Ante Javor <ante.javor@memgraph.io>
1 parent 82c5b3f commit 4592e95

File tree

4 files changed

+279
-75
lines changed

4 files changed

+279
-75
lines changed

charts/memgraph/README.md

+39-11
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,51 @@ The following table lists the configurable parameters of the Memgraph chart and
2727
| `image.repository` | Memgraph Docker image repository | `memgraph/memgraph` |
2828
| `image.tag` | Specific tag for the Memgraph Docker image. Overrides the image tag whose default is chart version. | `""` (Defaults to chart's app version) |
2929
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
30+
| `useImagePullSecrets` | Override the default imagePullSecrets | `false` |
31+
| `imagePullSecrets` | Specify image pull secrets | `- name: regcred` |
3032
| `replicaCount` | Number of Memgraph instances to run. Note: no replication or HA support. | `1` |
31-
| `service.type` | Kubernetes service type | `NodePort` |
32-
| `service.port` | Kubernetes service port | `7687` |
33-
| `service.targetPort` | Kubernetes service target port | `7687` |
34-
| `service.protocol` | Protocol used by the service | `TCP` |
33+
| `affinity.nodeKey` | Key for node affinity (Preferred) | `""` |
34+
| `affinity.nodeValue` | Value for node affinity (Preferred) | `""` |
35+
| `service.type` | Kubernetes service type | `ClusterIP` |
36+
| `service.enableBolt` | Enable Bolt protocol | `true` |
37+
| `service.boltPort` | Bolt protocol port | `7687` |
38+
| `service.boltProtocol` | Protocol used by Bolt | `TCP` |
39+
| `service.enableWebsocketMonitoring` | Enable WebSocket monitoring | `false` |
40+
| `service.websocketPortMonitoring` | WebSocket monitoring port | `7444` |
41+
| `service.websocketPortMonitoringProtocol` | Protocol used by WebSocket monitoring | `TCP` |
42+
| `service.enableHttpMonitoring` | Enable HTTP monitoring | `false` |
43+
| `service.httpPortMonitoring` | HTTP monitoring port | `9091` |
44+
| `service.httpPortMonitoringProtocol` | Protocol used by HTTP monitoring | `http` |
3545
| `service.annotations` | Annotations to add to the service | `{}` |
36-
| `persistentVolumeClaim.storagePVC` | Enable persistent volume claim for storage | `true` |
37-
| `persistentVolumeClaim.storagePVCClassName` | Storage class name for the persistent volume claim for storage. If not specified, default used. | `""` |
38-
| `persistentVolumeClaim.storagePVCSize` | Size of the persistent volume claim for storage | `1Gi` |
39-
| `persistentVolumeClaim.logPVC` | Enable persistent volume claim for logs | `true` |
40-
| `persistentVolumeClaim.logPVCClassName` | Storage class name for the persistent volume claim for logs. If not specified, default used. | `""` |
41-
| `persistentVolumeClaim.logPVCSize` | Size of the persistent volume claim for logs | `256Mi` |
46+
| `persistentVolumeClaim.createStorageClaim` | Enable creation of a Persistent Volume Claim for storage | `true` |
47+
| `persistentVolumeClaim.storageClassName` | Storage class name for the persistent volume claim | `""` |
48+
| `persistentVolumeClaim.storageSize` | Size of the persistent volume claim for storage | `10Gi` |
49+
| `persistentVolumeClaim.existingClaim` | Use an existing Persistent Volume Claim | `memgraph-0` |
50+
| `persistentVolumeClaim.storageVolumeName` | Name of an existing Volume to create a PVC for | `""` |
51+
| `persistentVolumeClaim.createLogStorage` | Enable creation of a Persistent Volume Claim for logs | `true` |
52+
| `persistentVolumeClaim.logStorageClassName` | Storage class name for the persistent volume claim for logs | `""` |
53+
| `persistentVolumeClaim.logStorageSize` | Size of the persistent volume claim for logs | `1Gi` |
4254
| `memgraphConfig` | List of strings defining Memgraph configuration settings | `["--also-log-to-stderr=true"]` |
55+
| `memgraphUser` | User for the Memgraph database | `""` |
56+
| `memgraphPassword` | Password for the Memgraph database | `""` |
57+
| `memgraphEnterpriseLicense` | Memgraph Enterprise License | `""` |
58+
| `memgraphOrganizationName` | Organization name for Memgraph Enterprise License | `""` |
4359
| `statefulSetAnnotations` | Annotations to add to the stateful set | `{}` |
4460
| `podAnnotations` | Annotations to add to the pod | `{}` |
45-
| `resources` | CPU/Memory resource requests/limits. Left empty by default. | `{}` (See note on uncommenting) |
61+
| `resources` | CPU/Memory resource requests/limits. Left empty by default. | `{}` |
4662
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
4763
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
4864
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated. | `""` |
65+
| `container.terminationGracePeriodSeconds` | Grace period for pod termination | `1800` |
66+
| `probes.liveliness.initialDelaySeconds` | Initial delay for liveliness probe | `10` |
67+
| `probes.liveliness.periodSeconds` | Period seconds for liveliness probe | `60` |
68+
| `probes.liveliness.failureThreshold` | Failure threshold for liveliness probe | `3` |
69+
| `probes.readiness.initialDelaySeconds` | Initial delay for readiness probe | `10` |
70+
| `probes.readiness.periodSeconds` | Period seconds for readiness probe | `30` |
71+
| `probes.readiness.failureThreshold` | Failure threshold for readiness probe | `3` |
72+
| `probes.startup.initialDelaySeconds` | Initial delay for startup probe | `10` |
73+
| `probes.startup.periodSeconds` | Period seconds for startup probe | `10` |
74+
| `probes.startup.failureThreshold` | Failure threshold for startup probe | `30` |
4975

5076
**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:
5177

@@ -66,5 +92,7 @@ The `memgraphConfig` parameter should be a list of strings defining the values o
6692
memgraphConfig:
6793
- "--also-log-to-stderr=true"
6894
- "--log-level=TRACE"
95+
- "--log-file=''"
96+
6997
```
7098
For all available database settings, refer to the [Configuration settings reference guide](https://memgraph.com/docs/memgraph/reference-guide/configuration).

charts/memgraph/templates/service.yaml

+18-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,23 @@ metadata:
1111
spec:
1212
type: {{ .Values.service.type }}
1313
ports:
14-
- port: {{ .Values.service.port }}
15-
targetPort: {{ .Values.service.targetPort}}
16-
protocol: {{ .Values.service.protocol }}
17-
name: bolt
14+
{{- if .Values.service.boltPort }}
15+
- port: {{ .Values.service.boltPort }}
16+
targetPort: {{ .Values.service.boltPort }}
17+
protocol: {{ .Values.service.boltProtocol }}
18+
name: bolt-port
19+
{{- end }}
20+
{{- if .Values.service.enableWebsocketMonitoring }}
21+
- port: {{ .Values.service.websocketPortMonitoring }}
22+
targetPort: {{ .Values.service.websocketPortMonitoring }}
23+
protocol: {{ .Values.service.websocketPortMonitoringProtocol }}
24+
name: websocket-monitoring-port
25+
{{- end }}
26+
{{- if .Values.service.enableHttpMonitoring }}
27+
- port: {{ .Values.service.httpPortMonitoring }}
28+
targetPort: {{ .Values.service.httpPortMonitoring }}
29+
protocol: {{ .Values.service.httpPortMonitoringProtocol }}
30+
name: http-monitoring-port
31+
{{- end }}
1832
selector:
1933
{{- include "memgraph.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)