-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
678 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 | ||
*~ | ||
# 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,18 @@ | ||
apiVersion: v1 | ||
name: nebula | ||
description: A distributed, fast open-source graph database | ||
featuring horizontal scalability and high availability | ||
https://nebula-graph.io | ||
type: application | ||
version: 0.1 | ||
appVersion: 1.0.0-rc2 | ||
keywords: | ||
- graph-database | ||
- distributed | ||
- database | ||
- graphdb | ||
home: https://nebula-graph.io | ||
maintainers: | ||
- name: flyingcat | ||
email: [email protected] | ||
engine: gotpl |
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,21 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nebula.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nebula.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nebula.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nebula.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 | ||
{{- 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,63 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "nebula.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 "nebula.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 "nebula.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "nebula.labels" -}} | ||
helm.sh/chart: {{ include "nebula.chart" . }} | ||
{{ include "nebula.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "nebula.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "nebula.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "nebula.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (include "nebula.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,165 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nebula-graphd | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
nebula-graphd.conf: | | ||
########## basics ########## | ||
# Whether to run as a daemon process | ||
--daemonize=false | ||
# The file to host the process id | ||
--pid_file=pids/nebula-graphd.pid | ||
########## logging ########## | ||
# The directory to host logging files, which must already exists | ||
--log_dir=logs | ||
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively | ||
--minloglevel=0 | ||
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging | ||
--v=0 | ||
# Maximum seconds to buffer the log messages | ||
--logbufsecs=0 | ||
# Whether to redirect stdout and stderr to separate output files | ||
--redirect_stdout=true | ||
# Destination filename of stdout and stderr, which will also reside in log_dir. | ||
--stdout_log_file=stdout.log | ||
--stderr_log_file=stderr.log | ||
# Copy log messages at or above this level to stderr in addition to logfiles. The numbers of severity levels INFO, WARNING, ERROR, and FATAL are 0, 1, 2, and 3, respectively. | ||
--stderrthreshold=2 | ||
########## networking ########## | ||
# Meta Server Address | ||
--meta_server_addrs=nebula-metad:{{ .Value.port.metad.thriftPort }} | ||
# Local ip | ||
--local_ip=0.0.0.0 | ||
# Network device to listen on | ||
--listen_netdev=any | ||
# Port to listen on | ||
--port={{ .Value.port.graphd.thriftPort }} | ||
# To turn on SO_REUSEPORT or not | ||
--reuse_port=false | ||
# Backlog of the listen socket, adjust this together with net.core.somaxconn | ||
--listen_backlog=1024 | ||
# Seconds before the idle connections are closed, 0 for never closed | ||
--client_idle_timeout_secs=0 | ||
# Seconds before the idle sessions are expired, 0 for no expiration | ||
--session_idle_timeout_secs=60000 | ||
# The number of threads to accept incoming connections | ||
--num_accept_threads=1 | ||
# The number of networking IO threads, 0 for # of CPU cores | ||
--num_netio_threads=0 | ||
# The number of threads to execute user queries, 0 for # of CPU cores | ||
--num_worker_threads=0 | ||
# HTTP service ip | ||
--ws_ip=0.0.0.0 | ||
# HTTP service port | ||
--ws_http_port={{ .Value.port.graphd.httpPort }} | ||
# HTTP2 service port | ||
--ws_h2_port={{ .Value.port.graphd.http2Port }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nebula-metad | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
nebula-metad.conf: | | ||
########## basics ########## | ||
# Whether to run as a daemon process | ||
--daemonize=false | ||
# The file to host the process id | ||
--pid_file=pids/nebula-metad.pid | ||
########## logging ########## | ||
# The directory to host logging files, which must already exists | ||
--log_dir=logs | ||
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively | ||
--minloglevel=0 | ||
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging | ||
--v=0 | ||
# Maximum seconds to buffer the log messages | ||
--logbufsecs=0 | ||
########## networking ########## | ||
# Meta Server Address | ||
--meta_server_addrs=0.0.0.0:{{ .Value.port.metad.thriftPort }} | ||
# Local ip | ||
--local_ip=0.0.0.0 | ||
# Meta daemon listening port | ||
--port={{ .Value.port.metad.thriftPort }} | ||
# HTTP service ip | ||
--ws_ip=0.0.0.0 | ||
# HTTP service port | ||
--ws_http_port={{ .Value.port.metad.httpPort }} | ||
# HTTP2 service port | ||
--ws_h2_port={{ .Value.port.metad.http2Port }} | ||
########## storage ########## | ||
# Root data path, here should be only single path for metad | ||
--data_path=data/meta | ||
########## Misc ######### | ||
# The default number of parts when a space is created | ||
--default_parts_num=100 | ||
# The default replica factor when a space is created | ||
--default_replica_factor=1 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nebula-storaged | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
nebula-storaged.conf: | | ||
########## basics ########## | ||
# Whether to run as a daemon process | ||
--daemonize=false | ||
# The file to host the process id | ||
--pid_file=pids/nebula-storaged.pid | ||
########## logging ########## | ||
# The directory to host logging files, which must already exists | ||
--log_dir=logs | ||
# Log level, 0, 1, 2, 3 for INFO, WARNING, ERROR, FATAL respectively | ||
--minloglevel=0 | ||
# Verbose log level, 1, 2, 3, 4, the higher of the level, the more verbose of the logging | ||
--v=0 | ||
# Maximum seconds to buffer the log messages | ||
--logbufsecs=0 | ||
########## networking ########## | ||
# Meta server address | ||
--meta_server_addrs=nebula-metad:{{ .Value.port.metad.thriftPort }} | ||
# Local ip | ||
--local_ip=0.0.0.0 | ||
# Storage daemon listening port | ||
--port={{ .Value.port.storaged.thriftPort }} | ||
# HTTP service ip | ||
--ws_ip=0.0.0.0 | ||
# HTTP service port | ||
--ws_http_port={{ .Value.port.storaged.httpPort }} | ||
# HTTP2 service port | ||
--ws_h2_port={{ .Value.port.storaged.http2Port }} | ||
########## storage ########## | ||
# Root data path, multiple paths should be splitted by comma. | ||
# One path per instance, if --engine_type is `rocksdb' | ||
--data_path=data/storage | ||
# The default reserved bytes for one batch operation | ||
--rocksdb_batch_size=4096 | ||
# The default block cache size used in BlockBasedTable. | ||
# The unit is MB. | ||
--rocksdb_block_cache=4 | ||
# The type of storage engine, `rocksdb', `memory', etc. | ||
--engine_type=rocksdb | ||
############## rocksdb Options ############## | ||
--rocksdb_disable_wal=true | ||
# rocksdb DBOptions in json, each name and value of option is a string, given as "option_name":"option_value" separated by comma | ||
--rocksdb_db_options={} | ||
# rocksdb ColumnFamilyOptions in json, each name and value of option is string, given as "option_name":"option_value" separated by comma | ||
--rocksdb_column_family_options={"write_buffer_size":"67108864","max_write_buffer_number":"4","max_bytes_for_level_base":"268435456"} | ||
# rocksdb BlockBasedTableOptions in json, each name and value of option is string, given as "option_name":"option_value" separated by comma | ||
--rocksdb_block_based_table_options={"block_size":"8192"} |
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,59 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: nebula-graphd | ||
name: nebula-graphd | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nebula-graphd | ||
replicas: {{ .Value.replication.graphd.replicas }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 1 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: nebula-graphd | ||
spec: | ||
containers: | ||
- name: nebula-graphd | ||
image: "{{ .Values.image.graphd.repository }}:{{ .Values.image.graphd.tag }}" | ||
imagePullPolicy: {{ .Values.image.graphd.pullPolicy }} | ||
restartPolicy: always | ||
ports: | ||
- name: thrift | ||
containerPort: {{ .Value.port.graphd.thriftPort }} | ||
- name: http | ||
containerPort: {{ .Value.port.graphd.httpPort }} | ||
- name: http2 | ||
containerPort: {{ .Value.port.graphd.http2Port } | ||
command: ["/usr/local/nebula/bin/nebula-graphd", "--flagfile=/usr/local/nebula/etc/nebula-graphd.conf"] | ||
{{- if .Values.livenessProbe.graphd.Enable }} | ||
livenessProbe: | ||
httpGet: | ||
path: /status | ||
port: {{ .Value.port.graphd.httpPort }} | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 5 | ||
{{- end }} | ||
resources: | ||
#TODO: Change these to appropriate values for the hardware that you're running. | ||
requests: | ||
cpu: "{{ .Values.resources.graphd.requests.cpu }}" | ||
memory: "{{ .Values.resources.graphd.requests.memory }}" | ||
limits: | ||
cpu: "{{ .Values.resources.graphd.limits.cpu }}" | ||
memory: "{{ .Values.resources.graphd.limits.memory }}" | ||
volumeMounts: | ||
- name: config | ||
mountPath: /usr/local/nebula/etc/ | ||
volume: | ||
- name: config | ||
configmap: nebula-graphd | ||
|
||
|
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,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: graphd-services | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
3699: "{{ .Values.namespace}}/nebula-graphd:3699" | ||
13000: "{{ .Values.namespace}}/nebula-graphd:13000" | ||
13002: "{{ .Values.namespace}}/nebula-graphd:13002" |
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 @@ | ||
apiVersion: policy/v1beta1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: nebula-budget | ||
labels: | ||
app: nebula-budget | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nebula-storaged | ||
app: nebula-metad | ||
maxUnavailable: 1 |
Oops, something went wrong.