Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript
2.2 KB
Raw Blame
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: control-postgres-data
  namespace: control-plane
  labels:
    app: control-postgres
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: control-postgres
  namespace: control-plane
  labels:
    app: control-postgres
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: control-postgres
  template:
    metadata:
      labels:
        app: control-postgres
    spec:
      automountServiceAccountToken: false
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: postgres
        image: postgres:16-alpine
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 5432
          name: postgres
          protocol: TCP
        env:
        - name: PGDATA
          value: /var/lib/postgresql/data/pgdata
        envFrom:
        - secretRef:
            name: control-postgres
        livenessProbe:
          exec:
            command:
            - sh
            - -c
            - pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
          initialDelaySeconds: 15
          periodSeconds: 15
          failureThreshold: 3
          successThreshold: 1
          timeoutSeconds: 1
        readinessProbe:
          exec:
            command:
            - sh
            - -c
            - pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
          initialDelaySeconds: 8
          periodSeconds: 10
          failureThreshold: 3
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: 200m
            memory: 256Mi
          requests:
            cpu: 50m
            memory: 64Mi
        volumeMounts:
        - name: data
          mountPath: /var/lib/postgresql/data
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: control-postgres-data
---
apiVersion: v1
kind: Service
metadata:
  name: control-postgres
  namespace: control-plane
  labels:
    app: control-postgres
spec:
  type: ClusterIP
  selector:
    app: control-postgres
  ports:
  - name: postgres
    port: 5432
    targetPort: postgres
    protocol: TCP