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

99 lines
2.0 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:
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-12-26 06:58:38 +00:00
cpu: 100m
memory: 100Mi
2021-08-26 16:42:44 +00:00
limits:
2021-12-26 06:58:38 +00:00
cpu: 100m
memory: 250Mi
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