Skip to content

Commit

Permalink
Merge pull request #23 from langchain-ai/infra/cleanup-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
langchain-infra authored Dec 13, 2023
2 parents 6402d16 + d519290 commit c123e32
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 23 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.1.9
version: 0.1.10
appVersion: "0.1.0"
2 changes: 1 addition & 1 deletion charts/langsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Common labels
Common annotations
*/}}
{{- define "langsmith.annotations" -}}
{{- if .Values.commonAnnotations }}
Expand Down
7 changes: 5 additions & 2 deletions charts/langsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
template:
metadata:
{{- with .Values.backend.deployment.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -84,6 +84,9 @@ spec:
{{- toYaml .Values.backend.deployment.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.backend.deployment.securityContext | nindent 12 }}
{{- with .Values.backend.deployment.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/langsmith/templates/backend/run-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
spec:
restartPolicy: Never
{{- with .Values.images.imagePullSecrets }}
Expand All @@ -48,6 +48,9 @@ spec:
{{- toYaml .Values.backend.migrations.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.backend.migrations.securityContext | nindent 12 }}
{{- with .Values.backend.migrations.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.migrations.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/backend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
7 changes: 5 additions & 2 deletions charts/langsmith/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
template:
metadata:
annotations:
Expand All @@ -32,7 +32,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -101,6 +101,9 @@ spec:
- mountPath: /etc/nginx/conf.d/default.conf
name: nginx-conf
subPath: nginx.conf
{{- with .Values.frontend.deployment.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/frontend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
7 changes: 5 additions & 2 deletions charts/langsmith/templates/hub-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
template:
metadata:
{{- with .Values.hubBackend.deployment.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -79,6 +79,9 @@ spec:
{{- toYaml .Values.hubBackend.deployment.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.hubBackend.deployment.securityContext | nindent 12 }}
{{- with .Values.hubBackend.deployment.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hubBackend.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/hub-backend/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
28 changes: 26 additions & 2 deletions charts/langsmith/templates/playground/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
template:
metadata:
{{- with .Values.playground.deployment.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -51,10 +51,34 @@ spec:
- name: playground
containerPort: {{ .Values.playground.containerPort }}
protocol: TCP
startupProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /ok
port: {{ .Values.playground.containerPort }}
failureThreshold: 6
periodSeconds: 10
timeoutSeconds: 1
resources:
{{- toYaml .Values.playground.deployment.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.playground.deployment.securityContext | nindent 12 }}
{{- with .Values.playground.deployment.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.playground.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/playground/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
2 changes: 1 addition & 1 deletion charts/langsmith/templates/postgres/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/langsmith/templates/postgres/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
template:
metadata:
{{- with .Values.postgres.statefulSet.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -100,6 +100,9 @@ spec:
- mountPath: /var/lib/postgresql/data
name: data
subPath: postgres
{{- with .Values.postgres.statefulSet.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.postgres.statefulSet.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 5 additions & 2 deletions charts/langsmith/templates/queue/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }}
template:
metadata:
{{- with .Values.queue.deployment.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -65,6 +65,9 @@ spec:
{{- toYaml .Values.queue.deployment.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.queue.deployment.securityContext | nindent 12 }}
{{- with .Values.queue.deployment.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.queue.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/langsmith/templates/redis/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ spec:
protocol: TCP
selector:
{{- include "langsmith.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/langsmith/templates/redis/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
selector:
matchLabels:
{{- include "langsmith.selectorLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
template:
metadata:
{{- with .Values.redis.statefulSet.annotations }}
Expand All @@ -31,7 +31,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "langsmith.labels" . | nindent 8 }}
app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
app.kubernetes.io/component: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }}
spec:
{{- with .Values.images.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -87,6 +87,9 @@ spec:
- mountPath: /data
name: data
{{- end }}
{{- with .Values.redis.statefulSet.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.redis.statefulSet.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/langsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ backend:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand All @@ -89,6 +90,7 @@ backend:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -120,6 +122,7 @@ frontend:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -152,6 +155,7 @@ hubBackend:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -183,6 +187,7 @@ playground:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -226,6 +231,7 @@ postgres:
# cpu: 1000m
# memory: 4Gi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -255,6 +261,7 @@ queue:
# cpu: 200m
# memory: 500Mi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down Expand Up @@ -291,6 +298,7 @@ redis:
# cpu: 1000m
# memory: 2Gi
extraEnv: []
sidecars: []
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down

0 comments on commit c123e32

Please sign in to comment.