diff --git a/charts/bbgo/templates/deployment.yaml b/charts/bbgo/templates/deployment.yaml index d630cb15e..5abe690c8 100644 --- a/charts/bbgo/templates/deployment.yaml +++ b/charts/bbgo/templates/deployment.yaml @@ -51,6 +51,8 @@ spec: {{- end }} {{- if .Values.grpc.enabled }} - "--enable-grpc" + - "--grpc-bind" + - {{ .Values.grpc.port | default 50051 | quote }} {{- end }} {{- if .Values.debug.enabled }} - "--debug" @@ -62,6 +64,11 @@ spec: containerPort: 8080 protocol: TCP {{- end }} + {{- if .Values.grpc.enabled }} + - name: grpc + containerPort: {{ .Values.grpc.port | default 50051 }} + protocol: TCP + {{- end }} {{- if .Values.metrics.enabled }} - name: metrics containerPort: 9090 diff --git a/charts/bbgo/templates/service.yaml b/charts/bbgo/templates/service.yaml index 154fc73c3..ce4243a7d 100644 --- a/charts/bbgo/templates/service.yaml +++ b/charts/bbgo/templates/service.yaml @@ -11,5 +11,11 @@ spec: targetPort: http protocol: TCP name: http + {{- if .Values.grpc.enabled }} + - port: {{ .Values.grpc.port | default 50051 }} + targetPort: grpc + protocol: TCP + name: grpc + {{- end }} selector: {{- include "bbgo.selectorLabels" . | nindent 4 }} diff --git a/charts/bbgo/values.yaml b/charts/bbgo/values.yaml index 87614196c..179c31777 100644 --- a/charts/bbgo/values.yaml +++ b/charts/bbgo/values.yaml @@ -76,6 +76,7 @@ metrics: grpc: enabled: false + port: 50051 debug: enabled: false