1
0
Fork 0
home-stack-kustomize/kustomize/bases/drone/drone-runner-deployment.yaml

96 lines
1.9 KiB
YAML
Raw Normal View History

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:
- name: DRONE_RPC_HOST
value: drone.gitea.svc
- 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:
cpu: 2000m
2021-08-26 16:42:44 +00:00
memory: 2Gi
limits:
cpu: 4000m
2021-08-26 16:42:28 +00:00
memory: 4Gi
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
protocol: TCP
port: 3000
targetPort: http