# Author: Panagiotis Karamolegkos (UPRC)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pdlc-rl
  namespace: he-codeco-pdlc  # The desired namespace
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pdlc-rl
  template:
    metadata:
      labels:
        app: pdlc-rl
    spec:
      serviceAccountName: default
      nodeName: sonem-worker #The node of the Deployment
      containers:
      - name: pdlc-rl
        image: docker.io/hecodeco/pdlcrl_inference:0.3.0-uprc
        imagePullPolicy: Always
        volumeMounts:
        - name: shared-volume
          mountPath: /data
        env:
        - name: NODE_NUMBER
          value: "3"
        - name: CRD_OUTPUT
          value: "/data/RL/CRDs"
        - name: CSV_DIR
          value: "/data/RL"
        - name: DP_CSV_NODES
          value: "test_nodes.csv"
        - name: DP_CSV_PODS
          value: "test_integracio.csv"
        - name: CA_CSV
          value: "metrics.csv"
      volumes:
      - name: shared-volume
        persistentVolumeClaim:
          claimName: shared-pvc-ro