-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrone.yml
196 lines (189 loc) · 4.15 KB
/
drone.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
kind: ConfigMap
apiVersion: v1
metadata:
name: drone-server-configuration
data:
io.drone.github.client: ##GITHUB-CLIENT-ID##
---
apiVersion: v1
kind: Secret
metadata:
name: drone-server-secret
data:
io.drone.github.secret: ##BASE64-ENCONDED-VALUE##
io.drone.secret: ##BASE64-ENCONDED-VALUE##
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: drone-server-volume
labels:
service: drone-server
spec:
storageClassName: manual
capacity:
storage: 3Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
awsElasticBlockStore:
volumeID: aws://us-east-1a/vol-##AWS-VOLUME-ID##
fsType: ext4
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: drone-server-claim0
name: drone-server-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storageClassName: manual
selector:
matchLabels:
service: drone-server
status: {}
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: drone-server
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: drone-server
spec:
containers:
- image: drone/drone:0.7
imagePullPolicy: Always
name: drone-server
env:
- name: DOCKER_API_VERSION
value: "1.24"
- name: DRONE_HOST
value: ##DRONE-SITE-URL-LIKE-https://drone.mybusiness.com##
- name: DRONE_GITHUB
value: "true"
- name: DRONE_OPEN
value: "true"
- name: DRONE_ORGS
value: mybusiness
- name: DRONE_GITHUB_CLIENT
valueFrom:
configMapKeyRef:
name: drone-server-configuration
key: io.drone.github.client
- name: DRONE_GITHUB_SECRET
valueFrom:
secretKeyRef:
name: drone-server-secret
key: io.drone.github.secret
- name: DRONE_SECRET
valueFrom:
secretKeyRef:
name: drone-server-secret
key: io.drone.secret
- name: DRONE_ADMIN
value: droneadmin
ports:
- containerPort: 8000
resources: {}
volumeMounts:
- mountPath: /var/lib/drone/
name: drone-server-claim0
restartPolicy: Always
volumes:
- name: drone-server-claim0
persistentVolumeClaim:
claimName: drone-server-claim0
status: {}
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: drone-agent
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: drone-agent
spec:
containers:
- image: drone/drone:0.7
imagePullPolicy: Always
name: drone-agent
args:
- agent
env:
- name: DRONE_DEBUG
value: "true"
- name: DOCKER_API_VERSION
value: "1.24"
- name: DRONE_SERVER
value: ws://drone-server/ws/broker
- name: DRONE_SECRET
valueFrom:
secretKeyRef:
name: drone-server-secret
key: io.drone.secret
volumeMounts:
- name: drone-socket
mountPath: /var/run/docker.sock
- name: drone-lib
mountPath: /var/lib/docker
restartPolicy: Always
volumes:
- name: drone-socket
hostPath:
path: /var/run/docker.sock
- name: drone-lib
hostPath:
path: /var/lib/docker
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: drone-server
name: drone-server
spec:
type: LoadBalancer
ports:
- name: http
port: 80
targetPort: 8000
selector:
io.kompose.service: drone-server
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: drone-agent
name: drone-agent
spec:
ports:
- port: 55555
targetPort: 0
selector:
io.kompose.service: drone-agent