nebula-operator

Nebula port configurable

We provide the fields config in CRD to define the port settings for each component in NebulaGraph. Here is the configuration file for NebulaCluster which have a custom port and http port:

apiVersion: apps.nebula-graph.io/v1alpha1
kind: NebulaCluster
metadata:
  name: nebula
  namespace: default
spec:
  graphd:
    config:
      port: "3669"
      ws_http_port: "8080"
      logtostderr: "true"
      redirect_stdout: "false"
      stderrthreshold: "0"
    resources:
      requests:
        cpu: "200m"
        memory: "500Mi"
      limits:
        cpu: "1"
        memory: "1Gi"
    replicas: 1
    image: vesoft/nebula-graphd
    version: v3.6.0
  metad:
    config:
      ws_http_port: 8081
      redirect_stdout: "false"
      stderrthreshold: "0"
      logtostder: "true"
    resources:
      requests:
        cpu: "300m"
        memory: "500Mi"
      limits:
        cpu: "1"
        memory: "1Gi"
    replicas: 1
    image: vesoft/nebula-metad
    version: v3.6.0
    dataVolumeClaim:
      resources:
        requests:
          storage: 2Gi
      storageClassName: local-path
  storaged:
    config:
      ws_http_port: 8082
      redirect_stdout: "false"
      stderrthreshold: "0"
      logtostder: "true"
    resources:
      requests:
        cpu: "300m"
        memory: "500Mi"
      limits:
        cpu: "1"
        memory: "1Gi"
    replicas: 1
    image: vesoft/nebula-storaged
    version: v3.6.0
    dataVolumeClaims:
    - resources:
        requests:
          storage: 2Gi
      storageClassName: local-path
    enableAutoBalance: true
  reference:
    name: statefulsets.apps
    version: v1
  schedulerName: default-scheduler
  imagePullPolicy: IfNotPresent
  imagePullSecrets:
  - name: nebula-image
  enablePVReclaim: true
  topologySpreadConstraints:
  - topologyKey: kubernetes.io/hostname
    whenUnsatisfiable: "ScheduleAnyway"

Verify the configuration:

$ kubectl get svc
NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
nebula-graphd-headless      ClusterIP   None             <none>        3669/TCP,8080/TCP            10m
nebula-graphd-svc           ClusterIP   10.102.13.115    <none>        3669/TCP,8080/TCP            10m
nebula-metad-headless       ClusterIP   None             <none>        9559/TCP,8081/TCP            11m
nebula-storaged-headless    ClusterIP   None             <none>        9779/TCP,8082/TCP,9778/TCP   11m
$ curl 10.102.13.115:8080/status
{"git_info_sha":"537f942","status":"running"}