-
Notifications
You must be signed in to change notification settings - Fork 2
/
deployment-stunnel.yaml
90 lines (90 loc) · 1.78 KB
/
deployment-stunnel.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
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: csp-stunnel-pvc
labels:
app: csp-stunnel
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 16Mi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: csp-stunnel-config
labels:
app: csp-stunnel
data:
stunnel.conf: |
pid = /tmp/stunnel.pid
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 0
foreground = yes
[https]
client = yes
accept = 8080
connect = target-host:443
verify = 2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: csp-stunnel-deployment
labels:
app: csp-stunnel
spec:
replicas: 1
selector:
matchLabels:
app: csp-stunnel
template:
metadata:
labels:
app: csp-stunnel
spec:
containers:
- name: stunnel
image: registry.91.team/cryptopro/csp:latest
command: ["stunnel_thread"]
args: ["/stunnel.conf"]
ports:
- containerPort: 8080
volumeMounts:
- name: keys
mountPath: /var/opt/cprocsp/keys/root
- name: config
mountPath: /stunnel.conf
subPath: stunnel.conf
envFrom:
- secretRef:
name: csp-stunnel-secret
# name: csp-rest-secret
volumes:
- name: keys
persistentVolumeClaim:
claimName: csp-stunnel-pvc
# claimName: csp-rest-pvc
- name: config
configMap:
name: csp-stunnel-config
---
apiVersion: v1
kind: Service
metadata:
name: csp-stunnel
labels:
app: csp-stunnel
spec:
ports:
- protocol: TCP
port: 8080
name: proxy
clusterIP: None
selector:
app: csp-stunnel