NONRTRIC-979: ServiceManager - deployment and undeployment
[it/dep.git] / nonrtric / helm / servicemanager / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2024 OpenInfra Foundation Europe.                            #
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 kind: Deployment
17 apiVersion: apps/v1
18 metadata:
19   name: {{ include "common.name.servicemanager" . }}
20   namespace: {{ include "common.namespace.nonrtric" . }}
21   generation: 1
22   labels:
23     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
24     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25     release: {{ .Release.Name }}
26     heritage: {{ .Release.Service }}
27   annotations:
28     deployment.kubernetes.io/revision: '1'
29 spec:
30   replicas: 1
31   selector:
32     matchLabels:
33       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
34       release: {{ .Release.Name }}
35   template:
36     metadata:
37       labels:
38         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
39         release: {{ .Release.Name }}
40     spec:
41       hostname: {{ include "common.name.servicemanager" . }}
42       containers:
43       - name: {{ include "common.container.servicemanager" . }}
44         image: {{ .Values.servicemanager.image.registry }}/{{ .Values.servicemanager.image.name }}:{{ .Values.servicemanager.image.tag }}
45         imagePullPolicy: {{ .Values.servicemanager.imagePullPolicy }}
46         resources:
47           limits:
48             memory: 256Mi
49             cpu: "250m"
50           requests:
51             memory: 128Mi
52             cpu: "80m"
53         volumeMounts:
54         - name: servicemanager-config-volume
55           mountPath: /app/servicemanager/.env
56           subPath: .env
57       volumes:
58       - name: servicemanager-config-volume
59         configMap:
60           name:  servicemanager-configmap