This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdacat-deployment.yaml
97 lines (96 loc) · 2.6 KB
/
dacat-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: v1
kind: Service
metadata:
name: dacat-api
labels:
name: dacat-api
namespace: $LOCAL_ENV
spec:
type: NodePort
ports:
# the port that this service should serve on
- port: 80
targetPort: 3000
nodePort: $PORTOFFSET
selector:
name: dacat-api
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: dacat-api
namespace: $LOCAL_ENV
spec:
tls:
- hosts:
- "dacat$HOST_EXT.psi.ch"
secretName: dacat$HOST_EXT-certificate-secret
rules:
- host: dacat$HOST_EXT.psi.ch
http:
paths:
- path: /
backend:
serviceName: dacat-api
servicePort: 80
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: dacat-api
namespace: $LOCAL_ENV
spec:
replicas: 1
template:
metadata:
labels:
name: dacat-api
spec:
containers:
- name: dacat-api
image: registry.psi.ch:5000/egli/dacatapiserver:$DACAT_IMAGE_VERSION
command: [ "/bin/sh","-c","ls -al . ; ls -al server; cat server/config.json; echo 'Environment:'
$LOCAL_ENV; node ." ]
env:
- name: NODE_ENV
value: $LOCAL_ENV
ports:
- containerPort: 3000
imagePullPolicy: Always
volumeMounts:
- name: config-volume
mountPath: /usr/src/app/server/config.local.js
subPath: config.local.js
- name: config-volume
mountPath: /usr/src/app/server/component-config.$LOCAL_ENV.json
subPath: component-config.$LOCAL_ENV.json
- name: config-volume
mountPath: /usr/src/app/server/middleware.$LOCAL_ENV.json
subPath: middleware.$LOCAL_ENV.json
- name: secret-volume
mountPath: /usr/src/app/server/providers.local.json
subPath: providers.local.json
- name: secret-volume
mountPath: /usr/src/app/server/datasources.$LOCAL_ENV.json
subPath: datasources.$LOCAL_ENV.json
- name: secret-volume
mountPath: /usr/src/app/server/admin
subPath: admin
- name: secret-volume
mountPath: /usr/src/app/server/archiveManager
subPath: archiveManager
- name: secret-volume
mountPath: /usr/src/app/server/ingestor
subPath: ingestor
- name: secret-volume
mountPath: /usr/src/app/server/proposalIngestor
subPath: proposalIngestor
volumes:
- name: config-volume
configMap:
name: dacatapi-config
- name: secret-volume
secret:
secretName: dacat-secret
imagePullSecrets:
- name: registrypullsecret