-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memgraph platform #13
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
62ef4b7
upgrade AppVersion to 2.13.0
tewnut cb0961b
make appVersion string
tewnut 78a3689
add memgraph-platform chart
tewnut a544401
add maintainer for memgraph-platform chart
tewnut 3bb9cf6
feat: add ENV to statefullset
tewnut e11a9fe
update README.md
tewnut 6b53a31
upgrade actions for node20
tewnut 55afefe
implement nodeSelector, tolerations and affinity
tewnut 0f0fd02
add maintainer for memgraph-platform chart
tewnut a3ae089
use helm v3.13.3
tewnut 245f183
specify full version
tewnut 783430b
upgrade chart-testing-actions to fix cosign issue
tewnut a2d66a7
bump chart version
tewnut 5f1ab60
lint: trailing space
tewnut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v2 | ||
name: memgraph-platform | ||
home: https://memgraph.com/ | ||
type: application | ||
description: Memgraph Platform is a single docker image containing Memgraph, query modules from Memgraph Mage and Memgraph Lab. | ||
|
||
version: 0.1.1 | ||
appVersion: "latest" | ||
|
||
keywords: | ||
- graph | ||
- database | ||
- cypher | ||
- analytics | ||
icon: https://public-assets.memgraph.com/memgraph-logo/logo-large.png | ||
sources: | ||
- https://github.com/memgraph/memgraph-platform | ||
maintainers: | ||
- name: Memgraph | ||
email: [email protected] | ||
- name: tewnut | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Memgraph Platform Kubernetes Helm Chart | ||
A Helm Chart for deploying Memgraph platform (including the database, lab and mage) on Kubernetes. | ||
|
||
## Installing the Memgraph Platform Helm Chart | ||
To install the Memgraph Platform Helm Chart, follow the steps below: | ||
``` | ||
helm install <release-name> memgraph/memgraph-platform | ||
``` | ||
Replace `<release-name>` with a name of your choice for the release. | ||
|
||
## Changing the default chart values | ||
To change the default chart values, run the command with the specified set of flags: | ||
``` | ||
helm install <resource-name> memgraph/memgraph-platform --set <flag1>=<value1>,<flag2>=<value2>,... | ||
``` | ||
Or you can modify a `values.yaml` file and override the desired values: | ||
``` | ||
helm install <resource-name> memgraph/memgraph-platform -f values.yaml | ||
``` | ||
|
||
## Configuration options | ||
When working with Memgraph Platform Docker image, you should pass configuration flags inside of environment variables. | ||
|
||
For example, you can start the memgraph Docker image with docker run memgraph/memgraph --bolt-port=7687 --log-level=TRACE, but you should start memgraph-platform Docker image with docker run -p 7687:7687 -p 7444:7444 -p 3000:3000 -e MEMGRAPH="--bolt-port=7687 --log-level=TRACE" memgraph/memgraph-platform. | ||
|
||
Each configuration setting is in the form: --setting-name=value. | ||
|
||
For all available database settings, refer to the [Configuration settings reference guide](https://memgraph.com/docs/memgraph/reference-guide/configuration). | ||
|
||
The following table lists the configurable parameters of the Memgraph Platform chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
| -------------------------------------------- | ----------------------------------------------------------- | --------------------------- | | ||
| `replicaCount` | Number of replicas | `1` | | ||
| `image.repository` | Memgraph Platform Docker image repository | `memgraph-platform` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `image.tag` | Image tag (overrides chart appVersion) | `""` | | ||
| `imagePullSecrets` | Image pull secrets | `[]` | | ||
| `nameOverride` | Override chart name | `""` | | ||
| `fullnameOverride` | Override full chart name | `""` | | ||
| `serviceAccount.create` | Create service account | `true` | | ||
| `serviceAccount.automount` | Automatically mount service account API credentials | `true` | | ||
| `serviceAccount.annotations` | Service account annotations | `{}` | | ||
| `serviceAccount.name` | Service account name | (auto-generated if not set) | | ||
| `podAnnotations` | Annotations to add to the pods | `{}` | | ||
| `podLabels` | Labels to add to the pods | `{}` | | ||
| `podSecurityContext` | Pod-level security context | `{}` | | ||
| `securityContext` | Container security context | `{}` | | ||
| `service.type` | Kubernetes service type | `ClusterIP` | | ||
| `service.portBolt` | Service port for Bolt protocol | `7687` | | ||
| `service.portLab` | Service port for Lab UI | `3000` | | ||
| `service.portLog` | Service port for logs | `7444` | | ||
| `env.MEMGRAPH` | Memgraph environment variable | `{}` | | ||
| `persistentVolumeClaim.storagePVC` | Enable persistent volume claim for storage | `true` | | ||
| `persistentVolumeClaim.storagePVCSize` | Size of the persistent volume claim for storage | `1Gi` | | ||
| `persistentVolumeClaim.logPVC` | Enable persistent volume claim for logs | `true` | | ||
| `persistentVolumeClaim.logPVCSize` | Size of the persistent volume claim for logs | `256Mi` | | ||
| `ingress.enabled` | Enable Ingress | `false` | | ||
| `ingress.className` | Ingress class name | `""` | | ||
| `ingress.annotations` | Ingress annotations | `{}` | | ||
| `ingress.hosts` | Ingress hosts | `[]` | | ||
| `resources` | Resource requests and limits | `{}` | | ||
| `livenessProbe` | Liveness probe settings | `{}` | | ||
| `readinessProbe` | Readiness probe settings | `{}` | | ||
| `autoscaling.enabled` | Enable Horizontal Pod Autoscaler | `false` | | ||
| `autoscaling.minReplicas` | Minimum number of replicas for autoscaling | `1` | | ||
| `autoscaling.maxReplicas` | Maximum number of replicas for autoscaling | `100` | | ||
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage for autoscaling | `80` | | ||
| `volumes` | Additional volumes on the output Deployment definition | `[]` | | ||
| `volumeMounts` | Additional volumeMounts on the output Deployment definition | `[]` | | ||
| `nodeSelector` | Node selector for pods | `{}` | | ||
| `tolerations` | Tolerations for pods | `[]` | | ||
| `affinity` | Affinity settings for pods | `{}` | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Thank you for installing Memgraph! 🎉 | ||
|
||
Connect to Memgraph via Lab, mgconsole, or any other client to your Memgraph instance. By default Memgraph listens on port 7687 for a bolt connection inside the cluster. | ||
Make sure your are connecting to the correct ip address of your instance. For details check the configuration on your cloud provider(aws, gcp, azure, etc.) | ||
|
||
If you are connecting via mgconsole, you can use the following command: | ||
|
||
mgconsole --host <your-instance-ip> --port <your-instance-port> | ||
|
||
If you are connecting via Lab, specify your instance ip address and port in Memgraph Lab GUI. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "memgraph-platform.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "memgraph-platform.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "memgraph-platform.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "memgraph-platform.labels" -}} | ||
helm.sh/chart: {{ include "memgraph-platform.chart" . }} | ||
{{ include "memgraph-platform.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "memgraph-platform.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "memgraph-platform.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "memgraph-platform.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "memgraph-platform.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "memgraph-platform.fullname" . -}} | ||
{{- $svcPort := .Values.service.port -}} | ||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }} | ||
labels: | ||
{{- include "memgraph-platform.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ .host | quote }} | ||
http: | ||
paths: | ||
{{- range .paths }} | ||
- path: {{ .path }} | ||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} | ||
pathType: {{ .pathType }} | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: {{ $svcPort }} | ||
{{- else }} | ||
serviceName: {{ $fullName }} | ||
servicePort: {{ $svcPort }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
26 changes: 26 additions & 0 deletions
26
charts/memgraph-platform/templates/persistentvolumeclaim.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
{{ if .Values.persistentVolumeClaim.storagePVC }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ include "memgraph-platform.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-platform.fullname" . }}-log-storage | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistentVolumeClaim.logPVCSize }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "memgraph-platform.fullname" . }} | ||
labels: | ||
{{- include "memgraph-platform.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.portBolt }} | ||
targetPort: 7687 | ||
protocol: TCP | ||
name: bolt | ||
- port: {{ .Values.service.portLab }} | ||
targetPort: 3000 | ||
protocol: TCP | ||
name: lab | ||
- port: {{ .Values.service.portLog }} | ||
targetPort: 7444 | ||
protocol: TCP | ||
name: log | ||
selector: | ||
{{- include "memgraph-platform.selectorLabels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "memgraph-platform.serviceAccountName" . }} | ||
labels: | ||
{{- include "memgraph-platform.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }} | ||
{{- end }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodeSelector
,tolerations
andaffinity
doesn't seem to be used in the chart.