apiVersion: apps/v1
kind: Deployment
metadata:
  name: komodo-ferretdb-2
  labels:
    app.kubernetes.io/controller: ferretdb-2
    app.kubernetes.io/instance: komodo
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: komodo
    helm.sh/chart: komodo-5.0.1
  namespace: komodo
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: ferretdb-2
      app.kubernetes.io/name: komodo
      app.kubernetes.io/instance: komodo
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: ferretdb-2
        app.kubernetes.io/instance: komodo
        app.kubernetes.io/name: komodo
    spec:
      enableServiceLinks: false
      serviceAccountName: komodo
      automountServiceAccountToken: false
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: DB_USERNAME
              value: ferret
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: password
                  name: komodo-postgresql-17-fdb-cluster-ferret
            - name: FERRETDB_POSTGRESQL_URL
              value: postgresql://$(DB_USERNAME):$(DB_PASSWORD)@komodo-postgresql-17-fdb-cluster-rw.komodo.svc.cluster.local:5432/ferretDB
          image: ghcr.io/ferretdb/ferretdb:2.7.0@sha256:5706414241eb84f0515512c37b46db0f1b1eac9e5ceb7e4c2523211c184b1985
          name: main
          resources:
            requests:
              cpu: 1m
              memory: 20Mi
