Bugfix
[nonrtric.git] / test / simulator-group / policy_agent / app.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: $POLICY_AGENT_APP_NAME
5   namespace: $KUBE_NONRTRIC_NAMESPACE
6   labels:
7     run: $POLICY_AGENT_APP_NAME
8     autotest: PA
9 spec:
10   replicas: 1
11   selector:
12     matchLabels:
13       run: $POLICY_AGENT_APP_NAME
14   template:
15     metadata:
16       labels:
17         run: $POLICY_AGENT_APP_NAME
18         autotest: PA
19     spec:
20       securityContext:
21         runAsUser: 0
22 # Need to run as root to be able to store files in dir mounted as a hostPath volume
23       containers:
24       - name: $POLICY_AGENT_APP_NAME
25         image: $POLICY_AGENT_IMAGE
26         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
27         ports:
28         - name: http
29           containerPort: $POLICY_AGENT_INTERNAL_PORT
30         - name: https
31           containerPort: $POLICY_AGENT_INTERNAL_SECURE_PORT
32         volumeMounts:
33         - mountPath: $POLICY_AGENT_CONFIG_MOUNT_PATH
34           name: pa-conf-name
35         - mountPath: $POLICY_AGENT_CONTAINER_MNT_DIR
36           name: pa-pv-data-name
37         - mountPath: $POLICY_AGENT_DATA_MOUNT_PATH
38           name: pa-data-name
39       volumes:
40       - configMap:
41           defaultMode: 420
42           name: $POLICY_AGENT_CONFIG_CONFIGMAP_NAME
43         name: pa-conf-name
44       - configMap:
45           defaultMode: 420
46           name: $POLICY_AGENT_DATA_CONFIGMAP_NAME
47         name: pa-data-name
48       - persistentVolumeClaim:
49           claimName: $POLICY_AGENT_DATA_PVC_NAME
50         name: pa-pv-data-name
51 # Selector will be set when pod is started first time
52       nodeSelector:
53