blob: 269d9ca47b654d04d9ba4bd70bd060bd09da99f9 [file] [log] [blame]
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +01001apiVersion: apps/v1
2kind: Deployment
3metadata:
4 name: $POLICY_AGENT_APP_NAME
5 namespace: $KUBE_NONRTRIC_NAMESPACE
6 labels:
7 run: $POLICY_AGENT_APP_NAME
8 autotest: PA
9spec:
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:
BjornMagnussonXAa69cd902021-04-22 23:46:10 +020020 securityContext:
21 runAsUser: 0
22# Need to run as root to be able to store files in dir mounted as a hostPath volume
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010023 containers:
24 - name: $POLICY_AGENT_APP_NAME
25 image: $POLICY_AGENT_IMAGE
BjornMagnussonXA483ee332021-04-08 01:35:24 +020026 imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010027 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
BjornMagnussonXAa69cd902021-04-22 23:46:10 +020035# volumeMounts:
36 - mountPath: $POLICY_AGENT_CONTAINER_MNT_DIR
37 name: pa-pv-data-name
38# volumeMounts:
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010039 - mountPath: $POLICY_AGENT_DATA_MOUNT_PATH
40 name: pa-data-name
41 volumes:
42 - configMap:
43 defaultMode: 420
44 name: $POLICY_AGENT_CONFIG_CONFIGMAP_NAME
45 name: pa-conf-name
46 - configMap:
47 defaultMode: 420
48 name: $POLICY_AGENT_DATA_CONFIGMAP_NAME
BjornMagnussonXAa69cd902021-04-22 23:46:10 +020049 name: pa-data-name
50 - persistentVolumeClaim:
51 claimName: $POLICY_AGENT_DATA_PVC_NAME
52 name: pa-pv-data-name
53# Selector will be set when pod is started first time
54 nodeSelector:
55