Skip to content

Commit

Permalink
Merge pull request #121 from langchain-ai/infra/common-env-change
Browse files Browse the repository at this point in the history
fix: only show env vars if necessary
  • Loading branch information
langchain-infra authored Jul 6, 2024
2 parents 84fe9c4 + 6b9de5f commit 7d4946a
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 10 deletions.
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.6.12
version: 0.6.13
appVersion: "0.6.23"
5 changes: 2 additions & 3 deletions charts/langsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,17 @@ Template containing common environment variables that are used by several servic
key: openai_api_key
- name: GO_ENDPOINT
value: http://{{- include "langsmith.fullname" . }}-{{.Values.platformBackend.name}}:{{ .Values.platformBackend.service.port }}
{{- if .Values.config.ttl.enabled }}
- name: FF_TRACE_TIERS_ENABLED
value: {{ .Values.config.ttl.enabled | quote }}
{{- if .Values.config.ttl.enabled }}
- name: FF_UPGRADE_TRACE_TIER_ENABLED
value: "true"
- name: TRACE_TIER_TTL_DURATION_SEC_MAP
value: "{ \"longlived\": {{ .Values.config.ttl.ttl_period_seconds.longlived }}, \"shortlived\": {{ .Values.config.ttl.ttl_period_seconds.shortlived }} }"
{{- end }}
{{- if .Values.config.orgCreationDisabled }}
- name: FF_ORG_CREATION_DISABLED
value: {{ .Values.config.orgCreationDisabled | quote }}
{{- if .Values.commonEnv }}
{{ toYaml .Values.commonEnv }}
{{- end }}
{{- end }}

Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- with .Values.backend.deployment.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv }}
{{ toYaml . | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/clickhouse/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ spec:
{{- with .Values.clickhouse.statefulSet.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv }}
{{ toYaml . | nindent 12 }}
{{- end }}
ports:
- name: ch
containerPort: {{ .Values.clickhouse.containerHttpPort }}
Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ spec:
- name: VITE_SUBDOMAIN
value: {{ .Values.ingress.subdomain }}
{{- end }}
{{- with .Values.commonEnv }}
{{ toYaml . | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/platform-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- with .Values.platformBackend.deployment.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv }}
{{ toYaml . | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
Expand Down
11 changes: 8 additions & 3 deletions charts/langsmith/templates/playground/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ spec:
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.playground.deployment.extraEnv }}
{{- if or .Values.playground.deployment.extraEnv .Values.commonEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.playground.deployment.extraEnv}}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv}}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
image: "{{ .Values.images.playgroundImage.repository }}:{{ .Values.images.playgroundImage.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.playgroundImage.pullPolicy }}
ports:
Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/postgres/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ spec:
{{- with .Values.postgres.statefulSet.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.images.postgresImage.repository }}:{{ .Values.images.postgresImage.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.postgresImage.pullPolicy }}
ports:
Expand Down
3 changes: 3 additions & 0 deletions charts/langsmith/templates/queue/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ spec:
{{- with .Values.queue.deployment.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
Expand Down
11 changes: 8 additions & 3 deletions charts/langsmith/templates/redis/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ spec:
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.redis.statefulSet.extraEnv }}
{{- if or .Values.redis.statefulSet.extraEnv .Values.commonEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.redis.statefulSet.extraEnv}}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.commonEnv}}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
image: "{{ .Values.images.redisImage.repository }}:{{ .Values.images.redisImage.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.images.redisImage.pullPolicy }}
ports:
Expand Down

0 comments on commit 7d4946a

Please sign in to comment.