Skip to content

Instantly share code, notes, and snippets.

@vaijab
Created August 31, 2017 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaijab/2ad2b592d0241286182f84930963c7f7 to your computer and use it in GitHub Desktop.
Save vaijab/2ad2b592d0241286182f84930963c7f7 to your computer and use it in GitHub Desktop.
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: drone-agent-github
spec:
replicas: 5
template:
metadata:
labels:
name: drone-agent-github
service: drone
role: agent
spec:
containers:
- name: docker
image: "docker:17.07.0-dind"
securityContext:
privileged: true
capabilities:
drop:
- SYS_TIME
- SYS_RAWIO
- SYS_BOOT
- NET_RAW
- SYS_MODULE
- AUDIT_CONTROL
- AUDIT_WRITE
resources:
limits:
cpu: '1000m'
memory: '1000Mi'
requests:
cpu: '500m'
memory: '500Mi'
command:
- "dockerd"
args:
- "-s"
- "overlay"
- "--host"
- "tcp://0.0.0.0:2375"
- "--userns-remap"
- "default"
- name: drone
image: "drone/agent:0.8"
securityContext:
runAsUser: 1000
resources:
limits:
cpu: 500m
memory: '500Mi'
requests:
cpu: 200m
memory: '100Mi'
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: DOCKER_HOST
value: "tcp://127.0.0.1:2375"
- name: DRONE_SERVER
value: "drone-server-github:9000"
- name: DRONE_PASSWORD
valueFrom:
secretKeyRef:
# TODO pull this from agent specific secret once moved to CI
name: drone-server-github
key: agent-secret
- name: DRONE_MAX_PROCS
value: "10"
args:
- "--hostname=$(POD_IP)"
- "--debug"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment