apiVersion: apps/v1
kind: Deployment
metadata:
  name: drone-runner
  namespace: drone
  labels:
    app.kubernetes.io/name: drone-runner
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: drone-runner
  template:
    metadata:
      labels:
        app.kubernetes.io/name: drone-runner
    spec:
      serviceAccountName: drone
      dnsPolicy: None
      dnsConfig:
        nameservers:
        - 10.10.0.1
      containers:
      - name: runner
        image: drone/drone-runner-kube:1.0.0-rc.1
#        securityContext:
#          readOnlyRootFilesystem: true
        ports:
        - containerPort: 3000
        env:
        - name: "DRONE_SERVICE_ACCOUNT_DEFAULT"
          value: "drone"
        - name: "DRONE_RPC_HOST"
          value: "drone.k8s.array21.dev"
        - name: "DRONE_RPC_PROTO"
          value: "https"
        - name: "DRONE_NAMESPACE_DEFAULT"
          value: "drone"
        - name: "DRONE_RPC_SECRET"
          valueFrom:
            secretKeyRef:
              name: drone
              key: rpc-secret
