BjornMagnussonXA | 007b645 | 2021-11-29 08:03:38 +0100 | [diff] [blame] | 1 | apiVersion: apps/v1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: $ICS_APP_NAME |
| 5 | namespace: $KUBE_NONRTRIC_NAMESPACE |
| 6 | labels: |
| 7 | run: $ICS_APP_NAME |
| 8 | autotest: ICS |
| 9 | spec: |
| 10 | replicas: 1 |
| 11 | selector: |
| 12 | matchLabels: |
| 13 | run: $ICS_APP_NAME |
| 14 | template: |
| 15 | metadata: |
| 16 | labels: |
| 17 | run: $ICS_APP_NAME |
| 18 | autotest: ICS |
| 19 | spec: |
BjornMagnussonXA | c8f92e9 | 2022-02-28 15:16:37 +0100 | [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 | 007b645 | 2021-11-29 08:03:38 +0100 | [diff] [blame] | 23 | containers: |
| 24 | - name: $ICS_APP_NAME |
| 25 | image: $ICS_IMAGE |
| 26 | imagePullPolicy: $KUBE_IMAGE_PULL_POLICY |
| 27 | ports: |
| 28 | - name: http |
| 29 | containerPort: $ICS_INTERNAL_PORT |
| 30 | - name: https |
| 31 | containerPort: $ICS_INTERNAL_SECURE_PORT |
| 32 | volumeMounts: |
BjornMagnussonXA | 05bfe48 | 2021-12-02 08:47:41 +0100 | [diff] [blame] | 33 | - mountPath: $ICS_CONFIG_MOUNT_PATH/$ICS_CONFIG_FILE |
| 34 | subPath: $ICS_CONFIG_FILE |
BjornMagnussonXA | 007b645 | 2021-11-29 08:03:38 +0100 | [diff] [blame] | 35 | name: ics-conf-name |
BjornMagnussonXA | 007b645 | 2021-11-29 08:03:38 +0100 | [diff] [blame] | 36 | - mountPath: $ICS_CONTAINER_MNT_DIR |
| 37 | name: ics-data-name |
| 38 | volumes: |
| 39 | - configMap: |
| 40 | defaultMode: 420 |
| 41 | name: $ICS_CONFIG_CONFIGMAP_NAME |
| 42 | name: ics-conf-name |
| 43 | - persistentVolumeClaim: |
| 44 | claimName: $ICS_DATA_PVC_NAME |
| 45 | name: ics-data-name |
| 46 | # Selector will be set when pod is started first time |
| 47 | nodeSelector: |
| 48 | |