forked from BigKAA/youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-deployment.yaml
142 lines (139 loc) · 2.97 KB
/
02-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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
apiVersion: v1
kind: Service
metadata:
name: jenkins
namespace: jenkins
labels:
app: jenkins
section: tools
spec:
ports:
- name: http-port
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: jenkins
section: tools
clusterIP: None
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-0
namespace: jenkins
labels:
app: jenkins
section: tools
spec:
ports:
- name: http-port
port: 8080
protocol: TCP
targetPort: 8080
- name: jnlp-port
port: 50000
protocol: TCP
targetPort: 50000
selector:
app: jenkins
section: tools
statefulset.kubernetes.io/pod-name: jenkins-0
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: jenkins
namespace: jenkins
labels:
app: jenkins
section: tools
spec:
replicas: 1
serviceName: jenkins
selector:
matchLabels:
app: jenkins
template:
metadata:
labels:
app: jenkins
section: tools
spec:
serviceAccountName: jenkins-account
imagePullSecrets:
- name: kryukov-local
containers:
- name: jenkins
image: n.kryukov.local/bigkaa/jenkins:v0.1
imagePullPolicy: IfNotPresent
env:
- name: JAVA_OPTS
# value: "-Xms2g -Xmx2g -Djenkins.install.runSetupWizard=false"
value: "-Xms2g -Xmx2g"
- name: JENKINS_SLAVE_AGENT_PORT
value: "50000"
# - name: JENKINS_OPTS
# value: "--prefix=/jenkins"
livenessProbe:
httpGet:
path: "/prometheus/"
port: 8080
initialDelaySeconds: 90
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
readinessProbe:
httpGet:
path: "/prometheus/"
port: 8080
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
ports:
- name: http-port
containerPort: 8080
- name: jnlp-port
containerPort: 50000
resources:
requests:
memory: "256Mi"
cpu: "50m"
limits:
memory: "2Gi"
cpu: "2"
volumeMounts:
- name: jenkins-home
mountPath: /var/jenkins_home
volumeClaimTemplates:
- metadata:
name: jenkins-home
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "managed-nfs-storage"
resources:
requests:
storage: 8Gi
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
name: jenkins
namespace: jenkins
labels:
app: jenkins
section: tools
spec:
rules:
- host: j.kryukov.local
http:
paths:
- backend:
serviceName: jenkins-0
servicePort: 8080
path: /