diff --git a/charts/memgraph/README.md b/charts/memgraph/README.md index f9c8712..d4a12bd 100644 --- a/charts/memgraph/README.md +++ b/charts/memgraph/README.md @@ -22,61 +22,62 @@ helm install memgraph/memgraph -f values.yaml The following table lists the configurable parameters of the Memgraph chart and their default values. -| 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` | -| `useImagePullSecrets` | Override the default imagePullSecrets | `false` | -| `imagePullSecrets` | Specify image pull secrets | `- name: regcred` | -| `replicaCount` | Number of Memgraph instances to run. Note: no replication or HA support. | `1` | -| `affinity.nodeKey` | Key for node affinity (Preferred) | `""` | -| `affinity.nodeValue` | Value for node affinity (Preferred) | `""` | -| `nodeSelector` | Constrain which nodes your Memgraph pod is eligible to be scheduled on, based on the labels on the nodes. Left empty by default. | `{}` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.enableBolt` | Enable Bolt protocol | `true` | -| `service.boltPort` | Bolt protocol port | `7687` | -| `service.boltProtocol` | Protocol used by Bolt | `TCP` | -| `service.enableWebsocketMonitoring` | Enable WebSocket monitoring | `false` | -| `service.websocketPortMonitoring` | WebSocket monitoring port | `7444` | -| `service.websocketPortMonitoringProtocol` | Protocol used by WebSocket monitoring | `TCP` | -| `service.enableHttpMonitoring` | Enable HTTP monitoring | `false` | -| `service.httpPortMonitoring` | HTTP monitoring port | `9091` | -| `service.httpPortMonitoringProtocol` | Protocol used by HTTP monitoring | `http` | -| `service.annotations` | Annotations to add to the service | `{}` | -| `persistentVolumeClaim.createStorageClaim` | Enable creation of a Persistent Volume Claim for storage | `true` | -| `persistentVolumeClaim.storageClassName` | Storage class name for the persistent volume claim | `""` | -| `persistentVolumeClaim.storageSize` | Size of the persistent volume claim for storage | `10Gi` | -| `persistentVolumeClaim.existingClaim` | Use an existing Persistent Volume Claim | `memgraph-0` | -| `persistentVolumeClaim.storageVolumeName` | Name of an existing Volume to create a PVC for | `""` | -| `persistentVolumeClaim.createLogStorage` | Enable creation of a Persistent Volume Claim for logs | `true` | -| `persistentVolumeClaim.logStorageClassName` | Storage class name for the persistent volume claim for logs | `""` | -| `persistentVolumeClaim.logStorageSize` | Size of the persistent volume claim for logs | `1Gi` | -| `memgraphConfig` | List of strings defining Memgraph configuration settings | `["--also-log-to-stderr=true"]` | -| `secrets.enabled` | Enable the use of Kubernetes secrets for Memgraph credentials | `false` | -| `secrets.name` | The name of the Kubernetes secret containing Memgraph credentials | `memgraph-secrets` | -| `secrets.userKey` | The key in the Kubernetes secret for the Memgraph user, the value is passed to the `MEMGRAPH_USER` env | `USER` | -| `secrets.passwordKey` | The key in the Kubernetes secret for the Memgraph password, the value is passed to the `MEMGRAPH_PASSWORD` | `PASSWORD` | -| `memgraphEnterpriseLicense` | Memgraph Enterprise License | `""` | -| `memgraphOrganizationName` | Organization name for Memgraph Enterprise License | `""` | -| `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. | `{}` | -| `tolerations` | A toleration is applied to a pod and allows the pod to be scheduled on nodes with matching taints. Left empty by default. | `[]` | -| `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. | `""` | -| `container.terminationGracePeriodSeconds` | Grace period for pod termination | `1800` | -| `probes.liveliness.initialDelaySeconds` | Initial delay for liveliness probe | `10` | -| `probes.liveliness.periodSeconds` | Period seconds for liveliness probe | `60` | -| `probes.liveliness.failureThreshold` | Failure threshold for liveliness probe | `3` | -| `probes.readiness.initialDelaySeconds` | Initial delay for readiness probe | `10` | -| `probes.readiness.periodSeconds` | Period seconds for readiness probe | `30` | -| `probes.readiness.failureThreshold` | Failure threshold for readiness probe | `3` | -| `probes.startup.initialDelaySeconds` | Initial delay for startup probe | `10` | -| `probes.startup.periodSeconds` | Period seconds for startup probe | `10` | -| `probes.startup.failureThreshold` | Failure threshold for startup probe | `30` | -| `nodeSelectors` | Node selectors for pod. Left empty by default. +| 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` | +| `useImagePullSecrets` | Override the default imagePullSecrets | `false` | +| `imagePullSecrets` | Specify image pull secrets | `- name: regcred` | +| `replicaCount` | Number of Memgraph instances to run. Note: no replication or HA support. | `1` | +| `affinity.nodeKey` | Key for node affinity (Preferred) | `""` | +| `affinity.nodeValue` | Value for node affinity (Preferred) | `""` | +| `nodeSelector` | Constrain which nodes your Memgraph pod is eligible to be scheduled on, based on the labels on the nodes. Left empty by default. | `{}` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.enableBolt` | Enable Bolt protocol | `true` | +| `service.boltPort` | Bolt protocol port | `7687` | +| `service.boltProtocol` | Protocol used by Bolt | `TCP` | +| `service.enableWebsocketMonitoring` | Enable WebSocket monitoring | `false` | +| `service.websocketPortMonitoring` | WebSocket monitoring port | `7444` | +| `service.websocketPortMonitoringProtocol` | Protocol used by WebSocket monitoring | `TCP` | +| `service.enableHttpMonitoring` | Enable HTTP monitoring | `false` | +| `service.httpPortMonitoring` | HTTP monitoring port | `9091` | +| `service.httpPortMonitoringProtocol` | Protocol used by HTTP monitoring | `http` | +| `service.annotations` | Annotations to add to the service | `{}` | +| `persistentVolumeClaim.createStorageClaim` | Enable creation of a Persistent Volume Claim for storage | `true` | +| `persistentVolumeClaim.storageClassName` | Storage class name for the persistent volume claim | `""` | +| `persistentVolumeClaim.storageSize` | Size of the persistent volume claim for storage | `10Gi` | +| `persistentVolumeClaim.existingClaim` | Use an existing Persistent Volume Claim | `memgraph-0` | +| `persistentVolumeClaim.storageVolumeName` | Name of an existing Volume to create a PVC for | `""` | +| `persistentVolumeClaim.createLogStorage` | Enable creation of a Persistent Volume Claim for logs | `true` | +| `persistentVolumeClaim.logStorageClassName` | Storage class name for the persistent volume claim for logs | `""` | +| `persistentVolumeClaim.logStorageSize` | Size of the persistent volume claim for logs | `1Gi` | +| `memgraphConfig` | List of strings defining Memgraph configuration settings | `["--also-log-to-stderr=true"]` | +| `secrets.enabled` | Enable the use of Kubernetes secrets for Memgraph credentials | `false` | +| `secrets.name` | The name of the Kubernetes secret containing Memgraph credentials | `memgraph-secrets` | +| `secrets.userKey` | The key in the Kubernetes secret for the Memgraph user, the value is passed to the `MEMGRAPH_USER` env | `USER` | +| `secrets.passwordKey` | The key in the Kubernetes secret for the Memgraph password, the value is passed to the `MEMGRAPH_PASSWORD` | `PASSWORD` | +| `memgraphEnterpriseLicense` | Memgraph Enterprise License | `""` | +| `memgraphOrganizationName` | Organization name for Memgraph Enterprise License | `""` | +| `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. | `{}` | +| `tolerations` | A toleration is applied to a pod and allows the pod to be scheduled on nodes with matching taints. Left empty by default. | `[]` | +| `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. | `""` | +| `container.terminationGracePeriodSeconds` | Grace period for pod termination | `1800` | +| `probes.liveliness.initialDelaySeconds` | Initial delay for liveliness probe | `10` | +| `probes.liveliness.periodSeconds` | Period seconds for liveliness probe | `60` | +| `probes.liveliness.failureThreshold` | Failure threshold for liveliness probe | `3` | +| `probes.readiness.initialDelaySeconds` | Initial delay for readiness probe | `10` | +| `probes.readiness.periodSeconds` | Period seconds for readiness probe | `30` | +| `probes.readiness.failureThreshold` | Failure threshold for readiness probe | `3` | +| `probes.startup.initialDelaySeconds` | Initial delay for startup probe | `10` | +| `probes.startup.periodSeconds` | Period seconds for startup probe | `10` | +| `probes.startup.failureThreshold` | Failure threshold for startup probe | `30` | +| `nodeSelectors` | Node selectors for pod. Left empty by default. | `{}` | +| `customQueryModules` | List of custom Query modules that should be mounted to Memgraph Pod | `[]` | **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: diff --git a/charts/memgraph/templates/statefulset.yaml b/charts/memgraph/templates/statefulset.yaml index a1c3d40..3b55c5d 100644 --- a/charts/memgraph/templates/statefulset.yaml +++ b/charts/memgraph/templates/statefulset.yaml @@ -96,6 +96,12 @@ spec: persistentVolumeClaim: claimName: {{ include "memgraph.fullname" . }}-user-storage {{- end }} + {{- range .Values.customQueryModules }} + - name: {{ .volume | quote }} + configMap: + name: {{ .volume | quote }} + {{- end }} + containers: - name: memgraph @@ -191,6 +197,11 @@ spec: - name: {{ include "memgraph.fullname" . }}-user-storage mountPath: {{ .Values.persistentVolumeClaim.userMountPath }} {{- end }} + {{- range .Values.customQueryModules }} + - name: {{ .volume | quote }} + mountPath: {{ printf "/var/lib/memgraph/internal_modules/%s" .file }} + subPath: {{ .file | quote }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/memgraph/values.yaml b/charts/memgraph/values.yaml index dd08f79..0600f3c 100644 --- a/charts/memgraph/values.yaml +++ b/charts/memgraph/values.yaml @@ -136,3 +136,12 @@ container: initialDelaySeconds: 10 periodSeconds: 10 failureThreshold: 30 + +# List of custom query modules to be mounted into the app. +# These will be loaded automatically, on startup. +# Each module must be exposed by a ConfigMap under a specific file name. +customQueryModules: [] +# Must be an existing ConfigMap +# - volume: "" +# Must be present in the ConfigMap referenced with `volume` +# file: ""