-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins-master-template.yaml
113 lines (113 loc) · 2.31 KB
/
jenkins-master-template.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenkins-master
namespace: default
annotations:
app: 'jenkins-master'
spec:
replicas: 1
selector:
matchLabels:
app: jenkins-master
template:
metadata:
labels:
app: jenkins-master
spec:
containers:
- name: jenkins-master
image: gcr.io/<project-id>/jenkins-master:v1
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
requests:
cpu: 4
memory: "1024Mi"
volumeMounts:
- name: jenkins-vol
mountPath: /var/jenkins_home
env:
- name: env
value: "dev"
volumes:
- name: jenkins-vol
persistentVolumeClaim:
claimName: jenkins-master-vc
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-master
annotations:
app: 'jenkins-master'
cloud.google.com/backend-config: '{"default": "jenkins-master-backendconfig"}'
spec:
selector:
app: jenkins-master
type: ClusterIP
ports:
- port: 8080
targetPort: 8080
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "jenkins-master-ingress"
namespace: default
annotations:
app: 'jenkins-master'
kubernetes.io/ingress.class: gce
spec:
rules:
- http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: jenkins-master
port:
number: 8080
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: jenkins-master-backendconfig
spec:
healthCheck:
checkIntervalSec: 30
timeoutSec: 30
healthyThreshold: 1
unhealthyThreshold: 5
port: 8080
type: HTTP
requestPath: /login
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: jenkins-master-storage
provisioner: kubernetes.io/gce-pd
volumeBindingMode: Immediate
allowVolumeExpansion: true
reclaimPolicy: Delete
parameters:
type: pd-standard
fstype: ext4
replication-type: none
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenkins-master-vc
spec:
storageClassName: jenkins-master-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi