Skip to content

Commit

Permalink
Change user-service to Statefulset for sharded controllers (hobbyfarm…
Browse files Browse the repository at this point in the history
…#411)

* Change user-service to Statefulset for sharded controllers

* Set workerThreadCount
  • Loading branch information
jggoebel authored Feb 13, 2024
1 parent 1e54583 commit 5d44146
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: user-service
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ $.Values.user.replicas }}
serviceName: "user-service"
selector:
matchLabels:
component: user-service
Expand Down Expand Up @@ -32,6 +33,10 @@ spec:
value: {{ .Values.user.apiPort | quote }}
- name: GRPC_PORT
value: "8080"
- name: STATEFULSET_NAME
value: "user-service"
- name: CONTROLLER_THREAD_COUNT
value: {{ .Values.user.controllerWorkerThreadCount | quote }}
ports:
- containerPort: {{ .Values.user.apiPort }}
- containerPort: 8080
Expand Down
2 changes: 2 additions & 0 deletions charts/hobbyfarm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ setting:
user:
image: hobbyfarm/user-service:v3.1.0
replicas: 1
controllerWorkerThreadCount: 1
logLevel: "0"
apiPort: 80
serviceAccountName: "hobbyfarm-user"

gargantua:
image: hobbyfarm/gargantua:v3.1.0
logLevel: "0"
Expand Down

0 comments on commit 5d44146

Please sign in to comment.