Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

3.3 KB
Raw Blame
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "rag.fullname" $ }}
  labels:
    {{- include "rag.labels" . | nindent 4 }}
    rag-component: rag
spec:
  replicas: {{ .Values.rag.replicaCount }}
  selector:
    matchLabels:
      {{- include "rag.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      annotations:
        {{- with .Values.rag.podAnnotations }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
      labels:
        {{- include "rag.selectorLabels" . | nindent 8 }}
        {{- with .Values.rag.podLabels }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- if kindIs "bool" .Values.enableServiceLinks }}
      enableServiceLinks: {{ .Values.enableServiceLinks }}
      {{- end }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      containers:
        - name: {{ include "rag.fullname" $ }}-rag
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.service.port }}
              protocol: TCP
          livenessProbe:
            {{- toYaml .Values.livenessProbe | nindent 12 }}
          readinessProbe:
            {{- toYaml .Values.readinessProbe | nindent 12 }}
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
          envFrom:
          - configMapRef:
              name: {{ include "rag.fullname" $ }}-config
          {{- if .Values.rag.existingSecret }}
          - secretRef:
              name: {{ .Values.rag.existingSecret }}
          {{- end }}
          env:
          {{- if .Values.postgresql.auth.existingSecret }}
          - name: POSTGRES_PASSWORD
            valueFrom:
              secretKeyRef:
                name: {{ .Values.postgresql.auth.existingSecret }}
                key: {{ .Values.postgresql.auth.secretKeys.userPasswordKey }}
          {{- end }}
          {{- if .Values.global.librechat.existingSecretName }}
          - name: OPENAI_API_KEY
            valueFrom:
              secretKeyRef:
                name: {{ .Values.global.librechat.existingSecretName }}
                key: {{ .Values.global.librechat.existingSecretApiKey }}
                optional: true
          {{- end }}
          {{- with .Values.env }}
          {{- toYaml . | nindent 10 }}
          {{- end }}
          {{- with .Values.volumeMounts }}
          volumeMounts:
            {{- toYaml . | nindent 12 }}
          {{- end }}
        {{- with .Values.extraContainers }}
        {{ toYaml . | nindent 8 }}
        {{- end }}


      volumes:
      {{- with .Values.volumes }}
      {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}