BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 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: |
BjornMagnussonXA | a69cd90 | 2021-04-22 23:46:10 +0200 | [diff] [blame] | 20 | securityContext: |
| 21 | runAsUser: 0 |
| 22 | # Need to run as root to be able to store files in dir mounted as a hostPath volume |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 23 | containers: |
| 24 | - name: $POLICY_AGENT_APP_NAME |
| 25 | image: $POLICY_AGENT_IMAGE |
BjornMagnussonXA | 483ee33 | 2021-04-08 01:35:24 +0200 | [diff] [blame] | 26 | imagePullPolicy: $KUBE_IMAGE_PULL_POLICY |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 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 |
BjornMagnussonXA | a69cd90 | 2021-04-22 23:46:10 +0200 | [diff] [blame] | 35 | # volumeMounts: |
| 36 | - mountPath: $POLICY_AGENT_CONTAINER_MNT_DIR |
| 37 | name: pa-pv-data-name |
| 38 | # volumeMounts: |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 39 | - 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 |
BjornMagnussonXA | a69cd90 | 2021-04-22 23:46:10 +0200 | [diff] [blame] | 49 | 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 | |