2020-05-01 22:08:35 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2020-05-18 20:18:39 +00:00
|
|
|
name: drone-runner
|
2020-05-01 22:08:35 +00:00
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: runner
|
2020-05-01 22:08:35 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: runner
|
2020-05-01 22:08:35 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: runner
|
2020-05-01 22:08:35 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: drone
|
2021-08-26 16:42:21 +00:00
|
|
|
image: drone/drone-runner-kube
|
2020-05-01 22:08:35 +00:00
|
|
|
env:
|
2021-08-29 05:15:00 +00:00
|
|
|
- name: DRONE_NAMESPACE_DEFAULT
|
2021-08-27 19:57:29 +00:00
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2020-05-01 22:08:35 +00:00
|
|
|
- name: DRONE_RPC_HOST
|
2021-08-29 05:15:00 +00:00
|
|
|
value: drone-server.$(DRONE_NAMESPACE_DEFAULT).svc.cluster.local
|
2020-05-01 22:08:35 +00:00
|
|
|
- name: DRONE_RPC_PROTO
|
|
|
|
value: http
|
|
|
|
- name: DRONE_RPC_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: drone-secret
|
|
|
|
key: rpc_secret
|
|
|
|
ports:
|
|
|
|
- name: http
|
2021-08-26 16:42:32 +00:00
|
|
|
containerPort: 3000
|
2021-08-26 16:42:28 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
2021-09-02 04:00:42 +00:00
|
|
|
cpu: 250m
|
|
|
|
memory: 250Mi
|
2021-08-26 16:42:44 +00:00
|
|
|
limits:
|
2021-09-02 04:00:42 +00:00
|
|
|
cpu: 500m
|
|
|
|
memory: 500Mi
|
2020-05-01 22:08:35 +00:00
|
|
|
---
|
|
|
|
kind: Role
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: drone-runner-role
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- secrets
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- pods/log
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
---
|
|
|
|
kind: RoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: drone-runner-rolebinding
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: default
|
|
|
|
roleRef:
|
|
|
|
kind: Role
|
|
|
|
name: drone-runner-role
|
2021-08-26 16:42:32 +00:00
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: drone-runner
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: runner
|
|
|
|
# monitor: prometheus
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: runner
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 3000
|
|
|
|
targetPort: http
|