From 864723f400bbf985493031774004ad19288471c5 Mon Sep 17 00:00:00 2001 From: infra Date: Mon, 20 Nov 2023 21:38:55 -0500 Subject: [PATCH] Remove api servers from helm --- charts/langsmith/Chart.yaml | 2 +- .../templates/backend/api-deployment.yaml | 102 ------------------ .../templates/backend/api-service.yaml | 26 ----- .../templates/frontend/configmap.yaml | 34 +----- .../templates/hub-backend/api-deployment.yaml | 97 ----------------- .../templates/hub-backend/api-service.yaml | 26 ----- charts/langsmith/values.yaml | 8 +- 7 files changed, 7 insertions(+), 288 deletions(-) delete mode 100644 charts/langsmith/templates/backend/api-deployment.yaml delete mode 100644 charts/langsmith/templates/backend/api-service.yaml delete mode 100644 charts/langsmith/templates/hub-backend/api-deployment.yaml delete mode 100644 charts/langsmith/templates/hub-backend/api-service.yaml diff --git a/charts/langsmith/Chart.yaml b/charts/langsmith/Chart.yaml index 292ef3d..85dcb76 100644 --- a/charts/langsmith/Chart.yaml +++ b/charts/langsmith/Chart.yaml @@ -5,5 +5,5 @@ maintainers: email: ankush@langchain.dev description: Helm chart to deploy the langsmith application and all services it depends on. type: application -version: 0.1.3 +version: 0.1.4 appVersion: "0.1.0" diff --git a/charts/langsmith/templates/backend/api-deployment.yaml b/charts/langsmith/templates/backend/api-deployment.yaml deleted file mode 100644 index 108cb3d..0000000 --- a/charts/langsmith/templates/backend/api-deployment.yaml +++ /dev/null @@ -1,102 +0,0 @@ -{{- if .Values.config.oauth.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api - labels: - {{- include "langsmith.labels" . | nindent 4 }} - {{- with.Values.backend.deployment.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- include "langsmith.annotations" . | nindent 4 }} - {{- with.Values.backend.deployment.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if not .Values.backend.autoscaling.enabled }} - replicas: {{ .Values.backend.deployment.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "langsmith.selectorLabels" . | nindent 6 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api - template: - metadata: - {{- with .Values.backend.deployment.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- with.Values.backend.deployment.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "langsmith.labels" . | nindent 8 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api - spec: - {{- with .Values.images.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.backend.deployment.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Values.backend.name }} - env: - {{- include "langsmith.commonEnv" . | nindent 12 }} - - name: OPENAI_API_KEY - valueFrom: - secretKeyRef: - name: {{ include "langsmith.secretsName" . }} - key: openai_api_key - - name: PORT - value: {{ .Values.backend.containerPort | quote }} - - name: AUTH_TYPE - value: api_key - {{- with .Values.backend.deployment.extraEnv }} - {{- toYaml . | nindent 12 }} - {{- end }} - image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }} - ports: - - name: backend - containerPort: {{ .Values.backend.containerPort }} - protocol: TCP - startupProbe: - httpGet: - path: /ok - port: {{ .Values.backend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: /ok - port: {{ .Values.backend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - readinessProbe: - httpGet: - path: /ok - port: {{ .Values.backend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - resources: - {{- toYaml .Values.backend.deployment.resources | nindent 12 }} - securityContext: - {{- toYaml .Values.backend.deployment.securityContext | nindent 12 }} - {{- with .Values.backend.deployment.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.deployment.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.deployment.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} diff --git a/charts/langsmith/templates/backend/api-service.yaml b/charts/langsmith/templates/backend/api-service.yaml deleted file mode 100644 index f5d35b1..0000000 --- a/charts/langsmith/templates/backend/api-service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.config.oauth.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api - labels: - {{- include "langsmith.labels" . | nindent 4 }} - {{- with.Values.backend.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- include "langsmith.annotations" . | nindent 4 }} - {{- with.Values.backend.service.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.backend.service.type }} - ports: - - name: backend - port: {{ .Values.backend.service.port }} - targetPort: backend - protocol: TCP - selector: - {{- include "langsmith.selectorLabels" . | nindent 4 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api -{{- end }} diff --git a/charts/langsmith/templates/frontend/configmap.yaml b/charts/langsmith/templates/frontend/configmap.yaml index 2ac7d22..1911dbc 100644 --- a/charts/langsmith/templates/frontend/configmap.yaml +++ b/charts/langsmith/templates/frontend/configmap.yaml @@ -6,13 +6,6 @@ metadata: {{- include "langsmith.labels" . | nindent 4 }} data: nginx.conf: | - map $http_x_api_key $has_api_key { - default ""; - "" ""; - {{- if .Values.config.oauth.enabled }} - "~.*" "-api"; - {{- end }} - } server { listen {{ .Values.frontend.containerPort }}; server_name localhost; @@ -30,7 +23,6 @@ data: location ~ /api/playground/ { rewrite /api/playground/(.*) /$1 break; - chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; @@ -40,7 +32,6 @@ data: location = /api/playground { rewrite /api/playground / break; - chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; @@ -53,45 +44,24 @@ data: proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}:{{ .Values.hubBackend.service.port }}; } - {{- if .Values.config.oauth.enabled }} - # A dummy location. Resolve hub-backend api hostname - location = /api-hub-backend-dns { - proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api:{{ .Values.hubBackend.service.port }}; - } - {{- end }} - # Hub Backend Routes location ~ /api-hub { rewrite /api-hub/(.*) /$1 break; - chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; - proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}$has_api_key:{{ .Values.hubBackend.service.port }}; - } - - # A dummy location. Resolve backend hostname - location = /backend-dns { - proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}:{{ .Values.backend.service.port }}; - } - - {{- if .Values.config.oauth.enabled }} - # A dummy location. Resolve backend-api hostname - location = /api-backend-dns { - proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api:{{ .Values.backend.service.port }}; + proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}:{{ .Values.hubBackend.service.port }}; } - {{- end }} # Backend Routes location ~ /api { rewrite /api/(.*) /$1 break; - chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; - proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}$has_api_key:{{ .Values.backend.service.port }}; + proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}:{{ .Values.backend.service.port }}; } } diff --git a/charts/langsmith/templates/hub-backend/api-deployment.yaml b/charts/langsmith/templates/hub-backend/api-deployment.yaml deleted file mode 100644 index ada5af7..0000000 --- a/charts/langsmith/templates/hub-backend/api-deployment.yaml +++ /dev/null @@ -1,97 +0,0 @@ -{{- if .Values.config.oauth.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api - labels: - {{- include "langsmith.labels" . | nindent 4 }} - {{- with.Values.hubBackend.deployment.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- include "langsmith.annotations" . | nindent 4 }} - {{- with.Values.hubBackend.deployment.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if not .Values.hubBackend.autoscaling.enabled }} - replicas: {{ .Values.hubBackend.deployment.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "langsmith.selectorLabels" . | nindent 6 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api - template: - metadata: - {{- with .Values.hubBackend.deployment.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- with.Values.hubBackend.deployment.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "langsmith.labels" . | nindent 8 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api - spec: - {{- with .Values.images.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.hubBackend.deployment.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Values.hubBackend.name }} - env: - {{- include "langsmith.commonEnv" . | nindent 12 }} - - name: PORT - value: {{ .Values.hubBackend.containerPort | quote }} - - name: AUTH_TYPE - value: 'api_key' - {{- with .Values.hubBackend.deployment.extraEnv }} - {{- toYaml . | nindent 12 }} - {{- end }} - image: "{{ .Values.images.hubBackendImage.repository }}:{{ .Values.images.hubBackendImage.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.images.hubBackendImage.pullPolicy }} - ports: - - name: hub-backend - containerPort: {{ .Values.hubBackend.containerPort }} - protocol: TCP - startupProbe: - httpGet: - path: /ok - port: {{ .Values.hubBackend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: /ok - port: {{ .Values.hubBackend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - readinessProbe: - httpGet: - path: /ok - port: {{ .Values.hubBackend.containerPort }} - failureThreshold: 6 - periodSeconds: 10 - timeoutSeconds: 1 - resources: - {{- toYaml .Values.hubBackend.deployment.resources | nindent 12 }} - securityContext: - {{- toYaml .Values.hubBackend.deployment.securityContext | nindent 12 }} - {{- with .Values.hubBackend.deployment.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.hubBackend.deployment.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.hubBackend.deployment.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/langsmith/templates/hub-backend/api-service.yaml b/charts/langsmith/templates/hub-backend/api-service.yaml deleted file mode 100644 index 4ce3e21..0000000 --- a/charts/langsmith/templates/hub-backend/api-service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.config.oauth.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api - labels: - {{- include "langsmith.labels" . | nindent 4 }} - {{- with.Values.hubBackend.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- include "langsmith.annotations" . | nindent 4 }} - {{- with.Values.hubBackend.service.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.hubBackend.service.type }} - ports: - - name: hub-backend - port: {{ .Values.hubBackend.service.port }} - targetPort: hub-backend - protocol: TCP - selector: - {{- include "langsmith.selectorLabels" . | nindent 4 }} - app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api -{{- end }} diff --git a/charts/langsmith/values.yaml b/charts/langsmith/values.yaml index c888176..513fda6 100644 --- a/charts/langsmith/values.yaml +++ b/charts/langsmith/values.yaml @@ -15,19 +15,19 @@ images: backendImage: repository: "docker.io/langchain/langchainplus-backend" pullPolicy: IfNotPresent - tag: "99d8f59" + tag: "5543bee" frontendImage: repository: "docker.io/langchain/langchainplus-frontend-dynamic" pullPolicy: IfNotPresent - tag: "99d8f59" + tag: "5543bee" hubBackendImage: repository: "docker.io/langchain/langchainhub-backend" pullPolicy: IfNotPresent - tag: "99d8f59" + tag: "5543bee" playgroundImage: repository: "docker.io/langchain/langchainplus-playground" pullPolicy: IfNotPresent - tag: "99d8f59" + tag: "5543bee" postgresImage: repository: "docker.io/postgres" pullPolicy: IfNotPresent