Skip to content
Snippets Groups Projects
pdlc-dp-deployment.yaml 2.14 KiB
Newer Older
# Author: Panagiotis Karamolegkos (UPRC)

# The ConfigMap will probably be changed for the Integration with other components.
apiVersion: v1
kind: ConfigMap
metadata:
  name: pdlc-config-map
  namespace: he-codeco-pdlc  # The desired namespace for the Config Map
data:
  topology.json: |
    {
      "node_names": [
        "k8s-master",
        "k8s-worker"
      ],
      "connections": [
        [1, 1],
        [1, 1]
      ]
    }
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: pdlc-dp
  namespace: he-codeco-pdlc  # The desired namespace
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pdlc-dp
  template:
    metadata:
      labels:
        app: pdlc-dp
    spec:
      serviceAccountName: default
      nodeName: sonem-worker #The node of the Deployment
      containers:
      - name: pdlc-dp
Panagiotis Karamolegkos's avatar
Panagiotis Karamolegkos committed
        image: docker.io/hecodeco/pdlc-dp:v0.2.2
        volumeMounts:
        - name: shared-volume
          mountPath: /data
        - name: config-volume    # Volume Mount for the config-map
          mountPath: /data/topology/config.json
          subPath: topology.json
        env:
        - name: COPY_MODELS_PATH  # Will be removed when MLOOps are ready
          value: "/data/"
        - name: NODE_NAME
          value: "sonem-worker"   # Node to collect metrics from
        - name: ACM_NAMESPACE
          value: "he-codeco-acm"
        - name: MDM_NAMESPACE
          value: "he-codeco-mdm"
        - name: NETMA_NAMESPACE
          value: "he-codeco-netma"
        - name: CA_DIR
          value: "/data/CA/"
        - name: CA_FILE
          value: "data_CA.csv"
        - name: RL_DIR
          value: "/data/RL/"
        - name: RL_NODES_FILE
          value: "test_nodes.csv"
        - name: RL_PODS_FILE
          value: "test_integracio.csv"
        - name: GNN_DIR
          value: "/data/GNN/"
        - name: GNN_FILE
          value: "data_GNN.csv"
        - name: RECORDS_INTERVAL
          value: "60"  # These are seconds
      volumes:
      - name: shared-volume
        persistentVolumeClaim:
          claimName: shared-pvc-rw
      - name: config-volume  # Volume for the config-map
        configMap:
          name: pdlc-config-map