Skip to content
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

added the k8s config. #952

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions kubernetes/nebula-graphd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
kind: Deployment
metadata:
labels:
app: nebula
name: nebula-graphd
spec:
selector:
matchLabels:
app: nebula
replicas: 3
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: nebula
spec:
containers:
- name: nebula-graphd
image: vesoft/nebula-graphd:nightly
ports:
- name: thrift
containerPort: 3699
- name: http
containerPort: 13000
- name: http2
containerPort: 13002
command: ["/usr/local/nebula/bin/nebula-graphd", "--flagfile=/usr/local/nebula/etc/nebula-graphd.conf", "--daemonize=false", "--meta_server_addrs=10.1.0.204:45500" , "--ws_ip=0.0.0.0"]
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
livenessProbe:
httpGet:
path: /
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
port: 13000
initialDelaySeconds: 30
timeoutSeconds: 5
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
resources:
limits:
memory: "1Gi"
cpu: "1"
93 changes: 93 additions & 0 deletions kubernetes/nebula-meta-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: nebula
name: neubla-metad
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
publishNotReadyAddresses: true
clusterIP: None
ports:
- name: thrift
port: 44500
- name: raft
port: 44501
- name: http
port: 11000
- name: http2
port: 11002
selector:
app: nebula
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: nebula-budget
labels:
app: nebula
spec:
selector:
matchLabels:
app: nebula-metad
maxUnavailable: 1
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nebula-metad
labels:
app: nebula
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nebula-metad label

spec:
serviceName: nebula-metad
replicas: 3
selector:
matchLabels:
app: nebula
template:
metadata:
labels:
app: nebula
spec:
terminationGracePeriodSeconds: 60
hostname: meta.nebula.services
containers:
- name: nebula-metad
image: vesoft/nebula-metad:nightly
imagePullPolicy: IfNotPresent
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
ports:
- containerPort: 45500
name: thrift
- containerPort: 45501
name: raft
- containerPort: 11000
name: http
- containerPort: 11002
name: http2
command:
- "/bin/bash"
- "-ecx"
- "exec /usr/local/nebula/bin/nebula-metad --flagfile=/usr/local/nebula/etc/nebula-metad.conf --daemonize=false --local_ip=$(hostname -i) --ws_ip=0.0.0.0"
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
volumeMounts:
- name: data
mountPath: /root/nebula-graph/data/meta
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
env:
- name: meta_services
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
valueFrom:
fieldRef:
fieldPath: status.podIP
volumes:
- name: data
persistentVolumeClaim:
claimName: data
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
85 changes: 85 additions & 0 deletions kubernetes/nebula-storaged-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: nebula
name: neubla-storaged
spec:
clusterIP: None
ports:
- name: thrift
port: 45500
- name: raft
port: 45501
- name: http
port: 12000
- name: http2
port: 12002
selector:
app: nebula
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: nebula-budget
labels:
app: nebula
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nebula-budget label

spec:
selector:
matchLabels:
app: nebula-storaged
app: nebula-metad
maxUnavailable: 1
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nebula-storaged
labels:
app: nebula
spec:
serviceName: nebula-storaged
replicas: 3
selector:
matchLabels:
app: nebula
template:
metadata:
labels:
app: nebula
spec:
terminationGracePeriodSeconds: 60
containers:
- name: nebula-storaged
image: vesoft/nebula-storaged:nightly
imagePullPolicy: IfNotPresent
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
ports:
- containerPort: 44500
name: thrift
- containerPort: 44501
name: raft
- containerPort: 12000
name: http
- containerPort: 12002
name: http2
command:
- "/bin/bash"
- "-ecx"
- "exec /usr/local/nebula/bin/nebula-storaged --flagfile=/usr/local/nebula/etc/nebula-storaged.conf --daemonize=false --local_ip=$(hostname -i) --meta_server_addrs=10.1.0.204:45500 --ws_ip=0.0.0.0"
volumeMounts:
- name: data
mountPath: /root/nebula-graph/data/storage
monadbobo marked this conversation as resolved.
Show resolved Hide resolved
volumes:
- name: data
persistentVolumeClaim:
claimName: data
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100Gi