기본적으로 LangSmith는 라이선스 키, salt, 기타 구성 매개변수와 같은 민감한 정보를 저장하기 위해 여러 Kubernetes secret을 프로비저닝합니다. 그러나 Kubernetes 클러스터에 이미 생성한 기존 secret(또는 일부 secret operator를 통해 프로비저닝한 secret)을 사용하고 싶을 수 있습니다. 이는 민감한 정보를 중앙 집중식으로 관리하거나 특정 보안 요구 사항이 있는 경우 유용할 수 있습니다. 기본적으로 LangSmith의 다양한 구성 요소에 해당하는 다음 secret들을 프로비저닝합니다:
  • langsmith-secrets: 이 secret에는 라이선스 키와 기타 기본 구성 매개변수가 포함됩니다. 이 secret의 템플릿은 여기에서 확인할 수 있습니다
  • langsmith-redis: 이 secret에는 Redis 연결 문자열과 비밀번호가 포함됩니다. 이 secret의 템플릿은 여기에서 확인할 수 있습니다
  • langsmith-postgres: 이 secret에는 Postgres 연결 문자열과 비밀번호가 포함됩니다. 이 secret의 템플릿은 여기에서 확인할 수 있습니다
  • langsmith-clickhouse: 이 secret에는 ClickHouse 연결 문자열과 비밀번호가 포함됩니다. 이 secret의 템플릿은 여기에서 확인할 수 있습니다

Requirements

  • 기존 Kubernetes 클러스터
  • 클러스터에서 Kubernetes secret을 생성할 수 있는 방법. 이는 kubectl, Helm chart 또는 Sealed Secrets와 같은 secret operator를 사용하여 수행할 수 있습니다

Parameters

LangSmith Helm Chart에서 프로비저닝하는 secret의 구조를 준수하는 자체 Kubernetes secret을 생성해야 합니다.
secret은 LangSmith Helm Chart에서 프로비저닝하는 것과 동일한 구조를 가져야 합니다(특정 secret을 확인하려면 위의 링크를 참조하세요). 필수 키 중 하나라도 누락되면 LangSmith 인스턴스가 올바르게 작동하지 않을 수 있습니다.
예시 secret은 다음과 같을 수 있습니다:
apiVersion: v1
kind: Secret
metadata:
  name: langsmith-existing-secrets
  namespace: langsmith
stringData:
  oauth_client_id: foo
  oauth_client_secret: foo
  oauth_issuer_url: foo
  langsmith_license_key: foo
  langgraph_cloud_license_key: foo
  api_key_salt: foo
  jwt_secret: foo
  initial_org_admin_password: foo
  blob_storage_access_key: foo
  blob_storage_access_key_secret: foo
  azure_storage_account_key: foo
  azure_storage_connection_string: foo

Configuration

이러한 secret이 프로비저닝되면 평문으로 secret 값을 전달하지 않고 secret을 직접 사용하도록 LangSmith 인스턴스를 구성할 수 있습니다. LangSmith Helm Chart 설치를 위한 langsmith_config.yaml 파일을 수정하여 이를 수행할 수 있습니다.
config:
  existingSecretName: "langsmith-secrets" # The name of the secret that contains the license key and other basic configuration parameters
redis:
  external:
    enabled: true # Set to true to use an external Redis instance. This secret is only needed if you are using an external Redis instance
    existingSecretName: "langsmith-redis" # The name of the secret that contains the Redis connection string and password
postgres:
  external:
    enabled: true # Set to true to use an external Postgres instance. This secret is only needed if you are using an external Postgres instance
    existingSecretName: "langsmith-postgres" # The name of the secret that contains the Postgres connection string and password
clickhouse:
  external:
    enabled: true # Set to true to use an external ClickHouse instance. This secret is only needed if you are using an external ClickHouse instance
    existingSecretName: "langsmith-clickhouse" # The name of the secret that contains the ClickHouse connection string and password
구성이 완료되면 LangSmith 설치를 업데이트해야 합니다. 업그레이드 가이드는 여기에서 확인할 수 있습니다. 모든 것이 올바르게 구성되었다면 이제 Ingress를 통해 LangSmith 인스턴스에 액세스할 수 있어야 합니다. 다음을 실행하여 secret이 올바르게 사용되고 있는지 확인할 수 있습니다:
kubectl describe deployment langsmith-backend | grep -i <secret-name>
출력에서 다음과 같은 내용을 확인할 수 있어야 합니다:
POSTGRES_DATABASE_URI:                    <set to the key 'connection_url' in secret <your-secret-name>  Optional: false
CLICKHOUSE_DB:                            <set to the key 'clickhouse_db' in secret <your-secret-name>   Optional: false

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I