apiVersion: apps/v1
kind: Deployment
metadata:
  name: ghss-store
spec:
  selector:
    matchLabels:
      app: ghss-store
  replicas: 1
  template:
    metadata:
      labels:
        app: ghss-store
    spec:
      containers:
        - name: website
          image: frigus02/ghss-store
          env:
            - name: DATABASE_DIRECTORY
              value: /var/lib/store
            - name: OTEL_AGENT_ENDPOINT
              value: ghss-otel-collector:6831
          ports:
            - containerPort: 50051
          readinessProbe:
            exec:
              command: ["/grpc_health_probe", "-addr=:50051"]
          resources:
            requests:
              cpu: 50m
              memory: 50Mi
            limits:
              cpu: 100m
              memory: 100Mi
          volumeMounts:
            - name: data
              mountPath: /var/lib/store
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: ghss-store-rwx-10g
