Skip to content

Support specifying one registry for all images in helm #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/langsmith/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ For information on how to use this chart, up-to-date release notes, and other gu
| images.clickhouseImage.pullPolicy | string | `"Always"` | |
| images.clickhouseImage.repository | string | `"docker.io/clickhouse/clickhouse-server"` | |
| images.clickhouseImage.tag | string | `"24.8"` | |
| images.defaultRegistry | string | "" | If supplied, all children <image_name>.repository values will be prepended with this registry name + `/`
| images.frontendImage.pullPolicy | string | `"IfNotPresent"` | |
| images.frontendImage.repository | string | `"docker.io/langchain/langsmith-frontend"` | |
| images.frontendImage.tag | string | `"0.10.60"` | |
Expand Down
12 changes: 12 additions & 0 deletions charts/langsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -609,3 +609,15 @@ checksum/postgres: {{ include (print $.Template.BasePath "/postgres/secrets.yaml
checksum/clickhouse: {{ include (print $.Template.BasePath "/clickhouse/secrets.yaml") . | sha256sum }}
{{- end }}
{{- end }}

{{/*
Creates the image reference used for langsmith deployments. If defaultRegistry is specified, concatenate with a '/'.
*/}}
{{- define "langsmith.image" -}}
{{- $imageConfig := index .Values.images .component -}}
{{- if .Values.images.defaultRegistry -}}
{{ .Values.images.defaultRegistry }}/{{ $imageConfig.repository }}:{{ $imageConfig.tag | default .Chart.AppVersion }}
{{- else -}}
{{ $imageConfig.repository }}:{{ $imageConfig.tag | default .Chart.AppVersion }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/langsmith/templates/ace-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.aceBackendImage.repository }}:{{ .Values.images.aceBackendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "aceBackendImage") | quote }}
imagePullPolicy: {{ .Values.images.aceBackendImage.pullPolicy }}
ports:
- name: ace
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/backend/auth-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }}
resources:
{{- toYaml .Values.backend.authBootstrap.resources | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }}
resources:
{{- toYaml .Values.backend.clickhouseMigrations.resources | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }}
ports:
- name: backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }}
resources:
{{- toYaml .Values.backend.migrations.resources | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/clickhouse/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
serviceAccountName: {{ include "clickhouse.serviceAccountName" . }}
containers:
- name: {{ .Values.clickhouse.name }}
image: "{{ .Values.images.clickhouseImage.repository }}:{{ .Values.images.clickhouseImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "clickhouseImage") | quote }}
imagePullPolicy: {{ .Values.images.clickhouseImage.pullPolicy }}
{{- with.Values.clickhouse.statefulSet.command }}
command:
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.frontendImage.repository }}:{{ .Values.images.frontendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "frontendImage") | quote }}
imagePullPolicy: {{ .Values.images.frontendImage.pullPolicy }}
ports:
- name: frontend
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/host-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.hostBackendImage.repository }}:{{ .Values.images.hostBackendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "hostBackendImage") | quote }}
imagePullPolicy: {{ .Values.images.hostBackendImage.pullPolicy }}
ports:
- name: host-backend
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/listener/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.hostBackendImage.repository }}:{{ .Values.images.hostBackendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "hostBackendImage") | quote }}
imagePullPolicy: {{ .Values.images.hostBackendImage.pullPolicy }}
{{- with .Values.listener.deployment.startupProbe }}
startupProbe:
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/operator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
args:
- --leader-elect
- --health-probe-bind-address=:8081
image: "{{ .Values.images.operatorImage.repository }}:{{ .Values.images.operatorImage.tag | default "latest" }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "operatorImage") | quote }}
imagePullPolicy: {{ .Values.images.operatorImage.pullPolicy }}
name: {{ .Values.operator.name }}
{{- with .Values.operator.deployment.securityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.platformBackendImage.repository }}:{{ .Values.images.platformBackendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "platformBackendImage") | quote }}
imagePullPolicy: {{ .Values.images.platformBackendImage.pullPolicy }}
ports:
- name: platform
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/playground/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.playgroundImage.repository }}:{{ .Values.images.playgroundImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "playgroundImage") | quote }}
imagePullPolicy: {{ .Values.images.playgroundImage.pullPolicy }}
ports:
- name: playground
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/postgres/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
{{- with $envVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.images.postgresImage.repository }}:{{ .Values.images.postgresImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "postgresImage") | quote }}
imagePullPolicy: {{ .Values.images.postgresImage.pullPolicy }}
ports:
- name: postgres
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/queue/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "langsmith.fullname" . }}-config
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }}
{{- with .Values.queue.deployment.startupProbe }}
startupProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
- name: {{ .Values.quickwit.name }}
securityContext:
{{- toYaml .Values.quickwit.securityContext | nindent 12 }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ .Values.images.quickwitImage.pullPolicy }}
args: ["run", "--service", "control_plane"]
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- name: {{ .Values.quickwit.name }}
securityContext:
{{- toYaml .Values.quickwit.securityContext | nindent 12 }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ .Values.images.quickwitImage.pullPolicy }}
args: ["run", "--service", "indexer"]
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
- name: {{ .Values.quickwit.name }}
securityContext:
{{- toYaml .Values.quickwit.securityContext | nindent 12 }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ .Values.images.quickwitImage.pullPolicy }}
args: ["run", "--service", "janitor"]
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
- name: {{ .Values.quickwit.name }}
securityContext:
{{- toYaml .Values.quickwit.securityContext | nindent 12 }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ .Values.images.quickwitImage.pullPolicy }}
args: ["run", "--service", "metastore"]
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- name: {{ .Values.quickwit.name }}
securityContext:
{{- toYaml .Values.quickwit.securityContext | nindent 12 }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ .Values.images.quickwitImage.pullPolicy }}
args: ["run", "--service", "searcher"]
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
restartPolicy: Never
initContainers:
- name: backend
image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "backendImage") | quote }}
command: ["/bin/sh"]
args:
- "-c"
Expand All @@ -48,7 +48,7 @@ spec:
mountPath: /quickwit
containers:
- name: {{ .Values.quickwit.name }}
image: "{{ .Values.images.quickwitImage.repository }}:{{ .Values.images.quickwitImage.tag }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "quickwitImage") | quote }}
imagePullPolicy: {{ $.Values.images.quickwitImage.pullPolicy }}
command: ["/bin/bash"]

Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/redis/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
image: "{{ .Values.images.redisImage.repository }}:{{ .Values.images.redisImage.tag | default .Chart.AppVersion }}"
image: {{ include "langsmith.image" (dict "Values" .Values "Chart" .Chart "component" "redisImage") | quote }}
imagePullPolicy: {{ .Values.images.redisImage.pullPolicy }}
ports:
- name: redis
Expand Down
3 changes: 2 additions & 1 deletion charts/langsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ commonLabels: {}
commonEnv: []

images:
defaultRegistry: ""
# -- Secrets with credentials to pull images from a private registry. Specified as name: value.
imagePullSecrets: []
aceBackendImage:
Expand Down Expand Up @@ -55,7 +56,7 @@ images:
pullPolicy: Always
tag: "24.8"
quickwitImage:
repository: quickwit/quickwit
repository: "quickwit/quickwit"
pullPolicy: IfNotPresent
tag: edge

Expand Down