ICS tests with istio and JWTs
[nonrtric.git] / test / simulator-group / ics / app.yaml
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:
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: $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:
33         - mountPath: $ICS_CONFIG_MOUNT_PATH/$ICS_CONFIG_FILE
34           subPath: $ICS_CONFIG_FILE
35           name: ics-conf-name
36         - mountPath: $ICS_CONTAINER_MNT_DIR
37           name: ics-data-name
38 #ICS_JWT_START
39         - mountPath: $ICS_SIDECAR_MOUNT
40           name: token-cache-volume
41 #ICS_JWT_STOP
42 #ICS_JWT_START
43       - name: $AUTHSIDECAR_APP_NAME
44         image: $AUTHSIDECAR_IMAGE
45         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
46         env:
47         - name: CREDS_GRANT_TYPE
48           value: $ICS_CREDS_GRANT_TYPE
49         - name: CREDS_CLIENT_SECRET
50           value: $ICS_CREDS_CLIENT_SECRET
51         - name: CREDS_CLIENT_ID
52           value: $ICS_CREDS_CLIENT_ID
53         - name: OUTPUT_FILE
54           value: $ICS_SIDECAR_JWT_FILE
55         - name: AUTH_SERVICE_URL
56           value: $ICS_AUTH_SERVICE_URL
57         volumeMounts:
58         - mountPath: $ICS_SIDECAR_MOUNT
59           name: token-cache-volume
60 #ICS_JWT_STOP
61       volumes:
62       - configMap:
63           defaultMode: 420
64           name: $ICS_CONFIG_CONFIGMAP_NAME
65         name: ics-conf-name
66       - persistentVolumeClaim:
67           claimName: $ICS_DATA_PVC_NAME
68         name: ics-data-name
69 #ICS_JWT_START
70       - name: token-cache-volume
71         emptyDir: {}
72 #ICS_JWT_STOP
73
74 # Selector will be set when pod is started first time
75       nodeSelector:
76