Skip to content

Commit

Permalink
Merge pull request #20 from langchain-ai/infra/add-queue-sa
Browse files Browse the repository at this point in the history
Infra/add queue sa
  • Loading branch information
langchain-infra authored Dec 7, 2023
2 parents fedab98 + f061f7f commit f5b9c61
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/langsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
email: [email protected]
description: Helm chart to deploy the langsmith application and all services it depends on.
type: application
version: 0.1.6
version: 0.1.7
appVersion: "0.1.0"
7 changes: 7 additions & 0 deletions charts/langsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,10 @@ Template containing common environment variables that are used by several servic
key: api_key_salt
{{- end }}

{{- define "queue.serviceAccountName" -}}
{{- if .Values.queue.serviceAccount.create -}}
{{ default (printf "%s-%s" (include "langsmith.fullname" .) .Values.queue.name) .Values.queue.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.queue.serviceAccount.name }}
{{- end -}}
{{- end -}}
1 change: 1 addition & 0 deletions charts/langsmith/templates/queue/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.queue.deployment.podSecurityContext | nindent 8 }}
serviceAccountName: {{ include "queue.serviceAccountName" . }}
containers:
- name: {{ .Values.queue.name }}
command:
Expand Down
16 changes: 16 additions & 0 deletions charts/langsmith/templates/queue/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.queue.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "queue.serviceAccountName" . }}
labels:
{{- include "langsmith.labels" . | nindent 4 }}
{{- with.Values.playground.deployment.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "langsmith.annotations" . | nindent 4 }}
{{- with.Values.queue.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/langsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ queue:
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
serviceAccount:
create: true
name: ""
labels: {}
annotations: {}

redis:
name: "redis"
Expand Down

0 comments on commit f5b9c61

Please sign in to comment.