Add drone runner deployment

This commit is contained in:
Sambo Chea 2021-10-11 20:12:50 +07:00
parent 7b282c3168
commit 42b0589c29
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
3 changed files with 69 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
drone-runner/deployment.prod.yaml

View File

@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: drone
labels:
app.kubernetes.io/name: drone
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: drone
template:
metadata:
labels:
app.kubernetes.io/name: drone
spec:
containers:
- name: runner
image: drone/drone-runner-kube:latest
ports:
- containerPort: 3000
env:
- name: DRONE_RPC_HOST
value: dci.osa.cubetiqs.com
- name: DRONE_RPC_PROTO
value: https
- name: DRONE_RPC_SECRET
value: super-duper-secret

40
drone-runner/role.yaml Normal file
View File

@ -0,0 +1,40 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: drone
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
namespace: default
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: Role
name: drone
apiGroup: rbac.authorization.k8s.io