Update license references
[nonrtric.git] / test / simulator-group / a1pms / 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: $A1PMS_APP_NAME
22   namespace: $KUBE_NONRTRIC_NAMESPACE
23   labels:
24     run: $A1PMS_APP_NAME
25     autotest: A1PMS
26 spec:
27   replicas: 1
28   selector:
29     matchLabels:
30       run: $A1PMS_APP_NAME
31   template:
32     metadata:
33       labels:
34         run: $A1PMS_APP_NAME
35         autotest: A1PMS
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: $A1PMS_APP_NAME
42         image: $A1PMS_IMAGE
43         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
44         ports:
45         - name: http
46           containerPort: $A1PMS_INTERNAL_PORT
47         - name: https
48           containerPort: $A1PMS_INTERNAL_SECURE_PORT
49         volumeMounts:
50         - mountPath: $A1PMS_CONFIG_MOUNT_PATH
51           name: a1pms-conf-name
52         - mountPath: $A1PMS_CONTAINER_MNT_DIR
53           name: a1pms-pv-data-name
54         - mountPath: $A1PMS_DATA_MOUNT_PATH
55           name: a1pms-data-name
56 #A1PMS_JWT_START
57         - mountPath: $A1PMS_SIDECAR_MOUNT
58           name: token-cache-volume
59 #A1PMS_JWT_STOP
60 #A1PMS_JWT_START
61       - name: $AUTHSIDECAR_APP_NAME
62         image: $AUTHSIDECAR_IMAGE
63         imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
64         env:
65         - name: CREDS_GRANT_TYPE
66           value: $A1PMS_CREDS_GRANT_TYPE
67         - name: CREDS_CLIENT_SECRET
68           value: $A1PMS_CREDS_CLIENT_SECRET
69         - name: CREDS_CLIENT_ID
70           value: $A1PMS_CREDS_CLIENT_ID
71         - name: OUTPUT_FILE
72           value: $A1PMS_SIDECAR_JWT_FILE
73         - name: AUTH_SERVICE_URL
74           value: $A1PMS_AUTH_SERVICE_URL
75         volumeMounts:
76         - mountPath: $A1PMS_SIDECAR_MOUNT
77           name: token-cache-volume
78 #A1PMS_JWT_STOP
79       volumes:
80       - configMap:
81           defaultMode: 420
82           name: $A1PMS_CONFIG_CONFIGMAP_NAME
83         name: a1pms-conf-name
84       - configMap:
85           defaultMode: 420
86           name: $A1PMS_DATA_CONFIGMAP_NAME
87         name: a1pms-data-name
88       - persistentVolumeClaim:
89           claimName: $A1PMS_DATA_PVC_NAME
90         name: a1pms-pv-data-name
91 #A1PMS_JWT_START
92       - name: token-cache-volume
93         emptyDir: {}
94 #A1PMS_JWT_STOP
95 # Selector will be set when pod is started first time
96       nodeSelector:
97