NONRTRIC-946: Servicemanager - update README and fix stand-alone deployment
[nonrtric/plt/sme.git] / servicemanager / deploy / manifests / servicemanager.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
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 #  ============LICENSE_END=================================================
16 #
17
18 ---
19 apiVersion: apps/v1
20 kind: Deployment
21 metadata:
22   name: servicemanager
23   namespace: servicemanager
24   labels:
25     app: servicemanager
26 spec:
27   replicas: 1
28   selector:
29     matchLabels:
30       app: servicemanager
31   template:
32     metadata:
33       labels:
34         app: servicemanager
35         version: v1
36     spec:
37       containers:
38       - name: servicemanager
39         image: "nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-plt-servicemanager:0.1.1"
40         imagePullPolicy: IfNotPresent
41         env:
42             - name: SERVICE_MANAGER_ENV
43               value: ""
44         ports:
45         - containerPort: 8095
46         resources:
47           limits:
48             memory: 256Mi
49             cpu: "250m"
50           requests:
51             memory: 128Mi
52             cpu: "80m"
53         volumeMounts:
54         - name: config-volume
55           mountPath: /app/servicemanager/.env
56           subPath: .env
57       volumes:
58       - name: config-volume
59         configMap:
60           name: env-configmap
61 ---
62 apiVersion: v1
63 kind: Service
64 metadata:
65   name: servicemanager
66   namespace: servicemanager
67 spec:
68   selector:
69     app: servicemanager
70   ports:
71     - protocol: TCP
72       port: 80
73       targetPort: 8095
74       nodePort: 31575
75   type: NodePort