Update license references
[nonrtric.git] / test / simulator-group / ics / app.yaml
1 #  ============LICENSE_START=======================================================
2 #  Copyright (C) 2020-2022 Nordix Foundation
3 #  ================================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #
16 #  SPDX-License-Identifier: Apache-2.0
17 #  ============LICENSE_END=========================================================
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: $ICS_APP_NAME
22   namespace: $KUBE_NONRTRIC_NAMESPACE
23   labels:
24     run: $ICS_APP_NAME
25     autotest: ICS
26 spec:
27   replicas: 1
28   selector:
29     matchLabels:
30       run: $ICS_APP_NAME
31   template:
32     metadata:
33       labels:
34         run: $ICS_APP_NAME
35         autotest: ICS
36     spec:
37       securityContext:
38         runAsUser: 0
39 # Need to run as root to be able to store files in dir mounted as a hostPath volume
40       containers:
41       - name: $ICS_APP_NAME
42         image: $ICS_IMAGE
43         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
44         ports:
45         - name: http
46           containerPort: $ICS_INTERNAL_PORT
47         - name: https
48           containerPort: $ICS_INTERNAL_SECURE_PORT
49         volumeMounts:
50         - mountPath: $ICS_CONFIG_MOUNT_PATH/$ICS_CONFIG_FILE
51           subPath: $ICS_CONFIG_FILE
52           name: ics-conf-name
53         - mountPath: $ICS_CONTAINER_MNT_DIR
54           name: ics-data-name
55 #ICS_JWT_START
56         - mountPath: $ICS_SIDECAR_MOUNT
57           name: token-cache-volume
58 #ICS_JWT_STOP
59 #ICS_JWT_START
60       - name: $AUTHSIDECAR_APP_NAME
61         image: $AUTHSIDECAR_IMAGE
62         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
63         env:
64         - name: CREDS_GRANT_TYPE
65           value: $ICS_CREDS_GRANT_TYPE
66         - name: CREDS_CLIENT_SECRET
67           value: $ICS_CREDS_CLIENT_SECRET
68         - name: CREDS_CLIENT_ID
69           value: $ICS_CREDS_CLIENT_ID
70         - name: OUTPUT_FILE
71           value: $ICS_SIDECAR_JWT_FILE
72         - name: AUTH_SERVICE_URL
73           value: $ICS_AUTH_SERVICE_URL
74         volumeMounts:
75         - mountPath: $ICS_SIDECAR_MOUNT
76           name: token-cache-volume
77 #ICS_JWT_STOP
78       volumes:
79       - configMap:
80           defaultMode: 420
81           name: $ICS_CONFIG_CONFIGMAP_NAME
82         name: ics-conf-name
83       - persistentVolumeClaim:
84           claimName: $ICS_DATA_PVC_NAME
85         name: ics-data-name
86 #ICS_JWT_START
87       - name: token-cache-volume
88         emptyDir: {}
89 #ICS_JWT_STOP
90
91 # Selector will be set when pod is started first time
92       nodeSelector:
93