|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "nebula-studio.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "nebula-studio.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: {{ .Values.replicaCount }} |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "nebula-studio.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + {{- with .Values.podAnnotations }} |
| 15 | + annotations: |
| 16 | + {{- toYaml . | nindent 8 }} |
| 17 | + {{- end }} |
| 18 | + labels: |
| 19 | + {{- include "nebula-studio.selectorLabels" . | nindent 8 }} |
| 20 | + spec: |
| 21 | + {{- with .Values.imagePullSecrets }} |
| 22 | + imagePullSecrets: |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + containers: |
| 26 | + - name: http-gateway |
| 27 | + image: "{{ .Values.image.httpGateway.repository }}:{{ .Values.image.httpGateway.tag | default .Chart.AppVersion }}" |
| 28 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 29 | + env: |
| 30 | + - name: USER |
| 31 | + value: root |
| 32 | + ports: |
| 33 | + - containerPort: 8080 |
| 34 | + protocol: TCP |
| 35 | + livenessProbe: |
| 36 | + httpGet: |
| 37 | + path: / |
| 38 | + port: 8080 |
| 39 | + readinessProbe: |
| 40 | + httpGet: |
| 41 | + path: / |
| 42 | + port: 8080 |
| 43 | + resources: |
| 44 | + {{- toYaml .Values.resources.httpGateway | nindent 12 }} |
| 45 | + - name: nebula-importer |
| 46 | + image: "{{ .Values.image.nebulaImporter.repository }}:{{ .Values.image.nebulaImporter.tag | default .Chart.AppVersion }}" |
| 47 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 48 | + ports: |
| 49 | + - containerPort: 5699 |
| 50 | + protocol: TCP |
| 51 | + livenessProbe: |
| 52 | + httpGet: |
| 53 | + path: /tasks |
| 54 | + port: 5699 |
| 55 | + readinessProbe: |
| 56 | + httpGet: |
| 57 | + path: /tasks |
| 58 | + port: 5699 |
| 59 | + resources: |
| 60 | + {{- toYaml .Values.resources.nebulaImporter | nindent 12 }} |
| 61 | + command: |
| 62 | + - nebula-importer |
| 63 | + - "--port=5699" |
| 64 | + - "--callback=http://127.0.0.1:7000/api/import/finish" |
| 65 | + volumeMounts: |
| 66 | + - name: upload-data |
| 67 | + mountPath: /uploads |
| 68 | + - name: nebula-studio |
| 69 | + image: "{{ .Values.image.nebulaStudio.repository }}:{{ .Values.image.nebulaStudio.tag | default .Chart.AppVersion }}" |
| 70 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 71 | + env: |
| 72 | + - name: UPLOAD_DIR |
| 73 | + value: /uploads |
| 74 | + ports: |
| 75 | + - containerPort: 7001 |
| 76 | + protocol: TCP |
| 77 | + livenessProbe: |
| 78 | + httpGet: |
| 79 | + path: / |
| 80 | + port: 7001 |
| 81 | + readinessProbe: |
| 82 | + httpGet: |
| 83 | + path: / |
| 84 | + port: 7001 |
| 85 | + # Patch due to https://github.com/vesoft-inc/nebula-studio/issues/22 |
| 86 | + command: |
| 87 | + - sh |
| 88 | + - -c |
| 89 | + - | |
| 90 | + sed 's/\(.*docker-start.*studio\)",/\1 --workers=3",/' -i package.json |
| 91 | + npm run docker-start |
| 92 | + resources: |
| 93 | + {{- toYaml .Values.resources.nebulaStudio | nindent 12 }} |
| 94 | + volumeMounts: |
| 95 | + - name: upload-data |
| 96 | + mountPath: /uploads |
| 97 | + - name: nginx |
| 98 | + image: "{{ .Values.image.nginx.repository }}:{{ .Values.image.nginx.tag | default .Chart.AppVersion }}" |
| 99 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 100 | + ports: |
| 101 | + - containerPort: 7000 |
| 102 | + protocol: TCP |
| 103 | + livenessProbe: |
| 104 | + httpGet: |
| 105 | + path: / |
| 106 | + port: 7000 |
| 107 | + readinessProbe: |
| 108 | + httpGet: |
| 109 | + path: / |
| 110 | + port: 7000 |
| 111 | + resources: |
| 112 | + {{- toYaml .Values.resources.nginx | nindent 12 }} |
| 113 | + volumeMounts: |
| 114 | + - name: upload-data |
| 115 | + mountPath: /uploads |
| 116 | + - name: nginx-config |
| 117 | + mountPath: /etc/nginx/conf.d/nebula.conf |
| 118 | + subPath: nginx.conf |
| 119 | + volumes: |
| 120 | + - name: nginx-config |
| 121 | + configMap: |
| 122 | + name: {{ include "nebula-studio.fullname" . }}-nginx-config |
| 123 | + items: |
| 124 | + - key: nginx.conf |
| 125 | + path: nginx.conf |
| 126 | + - name: upload-data |
| 127 | + persistentVolumeClaim: |
| 128 | + claimName: {{ include "nebula-studio.fullname" . }}-upload-data |
| 129 | + {{- with .Values.nodeSelector }} |
| 130 | + nodeSelector: |
| 131 | + {{- toYaml . | nindent 8 }} |
| 132 | + {{- end }} |
| 133 | + {{- with .Values.affinity }} |
| 134 | + affinity: |
| 135 | + {{- toYaml . | nindent 8 }} |
| 136 | + {{- end }} |
| 137 | + {{- with .Values.tolerations }} |
| 138 | + tolerations: |
| 139 | + {{- toYaml . | nindent 8 }} |
| 140 | + {{- end }} |
0 commit comments