Skip to content

Commit

Permalink
support hostnetwokr
Browse files Browse the repository at this point in the history
  • Loading branch information
knightXun committed Feb 16, 2020
2 parents c3e7329 + 102d01a commit a9a9f3f
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 27 deletions.
2 changes: 1 addition & 1 deletion kubernetes/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Create the name of the service account to use
{{ $uname }}-{{ .value }}:{{ $thriftPort }},
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
14 changes: 7 additions & 7 deletions kubernetes/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data:
# 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
--minloglevel=2
# 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
Expand All @@ -29,7 +29,7 @@ data:
########## networking ##########
# Meta Server Address
--meta_server_addrs={{ template "metad.endpoints" . }}
--meta_server_addrs=192.168.8.21:{{ .Values.port.metad.thriftPort }},192.168.8.22:{{ .Values.port.metad.thriftPort }},192.168.8.23:{{ .Values.port.metad.thriftPort }}
# Local ip
--local_ip=0.0.0.0
# Network device to listen on
Expand Down Expand Up @@ -75,17 +75,17 @@ data:
# 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
--minloglevel=2
# 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={{ template "metad.endpoints" . }}
--meta_server_addrs={{ .metad.endpoints }}
# Local ip
--local_ip=0.0.0.0
--local_ip=0.0.·0.0
# Meta daemon listening port
--port={{ .Values.port.metad.thriftPort }}
# HTTP service ip
Expand Down Expand Up @@ -123,14 +123,14 @@ data:
# 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
--minloglevel=2
# 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={{ template "metad.endpoints" . }}
--meta_server_addrs={{ .metad.endpoints }}
# Local ip
--local_ip=0.0.0.0
# Storage daemon listening port
Expand Down
7 changes: 6 additions & 1 deletion kubernetes/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ spec:
volumeMounts:
- name: config
mountPath: /usr/local/nebula/etc/
- name: timezone
mountPath: /etc/localtime
volumes:
- name: timezone
hostPath:
path: /etc/localtime
- name: config
configMap:
name: nebula-graphd



28 changes: 25 additions & 3 deletions kubernetes/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
hostNetwork: true
containers:
- name: nebula-metad
image: "{{ .Values.image.metad.repository }}:{{ .Values.image.metad.tag }}"
Expand Down Expand Up @@ -59,14 +60,24 @@ spec:
- name: config
mountPath: /usr/local/nebula/etc/
- name: data
mountPath: /usr/local/nebula/data/
mountPath: /usr/local/nebula/data
- name: timezone
mountPath: /etc/localtime
- name: log
mountPath: /usr/local/nebula/logs
volumes:
- name: config
configMap:
name: nebula-metad
- name: timezone
hostPath:
path: /etc/localtime
- name: data
persistentVolumeClaim:
claimName: data
- name: log
hostPath:
path: /var/log
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
Expand Down Expand Up @@ -104,6 +115,7 @@ spec:
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
hostNetwork: true
containers:
- name: nebula-storaged
image: "{{ .Values.image.storaged.repository }}:{{ .Values.image.storaged.tag }}"
Expand Down Expand Up @@ -140,14 +152,24 @@ spec:
- name: config
mountPath: /usr/local/nebula/etc/
- name: data
mountPath: /usr/local/nebula/data/
mountPath: /usr/local/nebula/data
- name: timezone
mountPath: /etc/localtime
- name: log
mountPath: /usr/local/nebula/logs
volumes:
- name: config
configMap:
name: nebula-storaged
- name: timezone
hostPath:
path: /etc/localtime
- name: data
persistentVolumeClaim:
claimName: data
- name: log
hostPath:
path: /var/log
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
Expand All @@ -159,4 +181,4 @@ spec:
storageClassName: {{ .Values.storage.storageClass }}
resources:
requests:
storage: {{ .Values.storage.storaged.size }}
storage: {{ .Values.storage.storaged.size }}
30 changes: 15 additions & 15 deletions kubernetes/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ image:
# the nebula-graphd images,change tag to use a different version.
graphd:
repository: vesoft/nebula-graphd
tag: nightly
tag: v1.0.0-rc3
pullPolicy: Always
# the nebula-metad images,change tag to use a different version.
metad:
repository: vesoft/nebula-metad
tag: nightly
tag: v1.0.0-rc3
pullPolicy: Always
# the nebula storaged images,change tag to use a different version.
storaged:
repository: vesoft/nebula-storaged
tag: nightly
tag: v1.0.0-rc3
pullPolicy: Always

# set livenessProbe, kubelet will check nebula pod alive
Expand All @@ -37,27 +37,27 @@ hosts:
resources:
graphd:
limits:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 8192Mi
requests:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 8192Mi

metad:
limits:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 8192Mi
requests:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 8192Mi

storaged:
limits:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 32768Mi
requests:
cpu: 1000m
memory: 1024Mi
cpu: 4000m
memory: 32768Mi

replication:
## Number of nebula-storaged replicas
Expand Down

0 comments on commit a9a9f3f

Please sign in to comment.