-
Notifications
You must be signed in to change notification settings - Fork 2
/
java-deploy.yml
75 lines (75 loc) · 1.78 KB
/
java-deploy.yml
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
apiVersion: v1
kind: Service
metadata:
name: java
labels:
app: java
group: certificate-example
spec:
type: ClusterIP
ports:
- port: 443
targetPort: 8443
name: https
selector:
app: java
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: java
labels:
app: java
group: certificate-example
spec:
replicas: 1
selector:
matchLabels:
app: java
template:
metadata:
labels:
app: java
spec:
containers:
- name: java
image: voor/java-service:latest
env:
- name: SERVER_SSL_KEYSTORETYPE
value: "PKCS12"
- name: SERVER_SSL_KEYSTORE
value: "/etc/keystore/keystore.p12"
- name: SERVER_SSL_KEYSTOREPASSWORD
valueFrom:
secretKeyRef:
name: java-keystore
key: password
- name: SERVER_SSL_KEYALIAS
valueFrom:
secretKeyRef:
name: java-keystore
key: alias
- name: SERVER_PORT
value: "8443"
- name: OTHER_SERVER_HOST
value: "nodejs.default.svc.cluster.local"
- name: OTHER_SERVER_PORT
value: "443"
ports:
- name: http
containerPort: 8443
protocol: TCP
volumeMounts:
- name: java-keystore
mountPath: "/etc/keystore"
readOnly: true
- name: java-truststore
mountPath: "/etc/ssl/certs/java"
readOnly: true
volumes:
- name: java-keystore
secret:
secretName: java-keystore
- name: java-truststore
secret:
secretName: java-truststore