postgres yaml files modified
[ealt-edge.git] / mecm / mepm / applcm / resources / deployment / postgres-k8s.yaml
1 # Copyright 2020 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15
16 # postgres database
17 ---
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: postgres-db
22   namespace: default
23   labels:
24     app: postgres-db
25 spec:
26   replicas: 1
27   selector:
28     matchLabels:
29       app: postgres-db
30   template:
31     metadata:
32       labels:
33         app: postgres-db
34     spec:
35       containers:
36         - name: postgres
37           image: postgres:13
38           imagePullPolicy: "Always"
39           envFrom:
40             - configMapRef:
41                 name: postgres-config
42           volumeMounts:
43             - mountPath: /var/lib/postgresql/data
44               name: postgredb
45           ports:
46             - containerPort: 5432
47       volumes:
48         - name: postgredb
49           persistentVolumeClaim:
50             claimName: postgres-pv-claim