apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
spec:
  template:
    spec:
      tolerations:
        - key: "gpu"
          operator: "Equal"
          value: "true"
          effect: "NoSchedule"
      containers:
        - name: tabby
          image: tabbyml/tabby:0.25.2
          imagePullPolicy: IfNotPresent
          ports:
            - name: tabby
              containerPort: 8080
              protocol: TCP
          args:
            - serve
            - --port
            - "8080"
          volumeMounts:
            - mountPath: /data
              name: tabby-data # Changed to match volumeClaimTemplate
            - name: config-volume
              mountPath: /data/config.toml
              subPath: config.toml
          livenessProbe:
            httpGet:
              path: /
              port: tabby
          readinessProbe:
            httpGet:
              path: /
              port: tabby
      volumes:
        - name: config-volume
          configMap:
            name: tabby-config
        - name: tabby-data
          persistentVolumeClaim:
            claimName: tabby-pvc