-
Notifications
You must be signed in to change notification settings - Fork 0
/
ide-deployment.yml.erb
79 lines (79 loc) · 2.22 KB
/
ide-deployment.yml.erb
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
apiVersion: v1
kind: Namespace
metadata:
name: <%= ENV['PERSON'] %>
---
apiVersion: v1
kind: Service
metadata:
name: <%= ENV['PERSON'] %>-ide-svc
namespace: <%= ENV['PERSON'] %>
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-type: nlb
# service.beta.kubernetes.io/aws-load-balancer-name: cloud-dev-envs
# service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
# service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
# service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
# service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: <%= ENV['SSL_CERT_ARN'] %>
# external-dns.alpha.kubernetes.io/hostname: <%= ENV['PERSON'] %>.dev.klstr.io
labels:
for: <%= ENV['PERSON'] %>
spec:
type: ExternalName
externalName: <%= ENV['PERSON'] %>.dev.klstr.io
selector:
for: <%= ENV['PERSON'] %>
app_type: ide
ports:
- name: ssh
port: 22
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: <%= ENV['PERSON'] %>-ide-ss
namespace: <%= ENV['PERSON'] %>
labels:
for: <%= ENV['PERSON'] %>
app_type: ide
spec:
selector:
matchLabels:
for: <%= ENV['PERSON'] %>
app_type: ide
serviceName: <%= ENV['PERSON'] %>-cloud-dev
replicas: 1
template:
metadata:
labels:
for: <%= ENV['PERSON'] %>
app_type: ide
spec:
terminationGracePeriodSeconds: 10
volumes:
- name: hostpath-storage
hostPath:
path: /data
type: Directory
containers:
- name: ide
image: <%= ENV['IDE_IMAGE'] %>
ports:
- containerPort: 22
name: ssh-port
startupProbe:
tcpSocket:
port: ssh-port
failureThreshold: 12
periodSeconds: 5
livenessProbe:
tcpSocket:
port: ssh-port
failureThreshold: 2
periodSeconds: 5
volumeMounts:
- name: hostpath-storage
mountPath: /root/work
subPath: <%= ENV['PERSON'] %>