---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: drone
  name: drone
  namespace: drone
spec:
  replicas: 1
  selector:
    matchLabels:
      app: drone
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: drone
    spec:
      containers:
      - env:
        - name: DRONE_KUBERNETES_ENABLED
          value: "true"
        - name: DRONE_KUBERNETES_NAMESPACE
          value: drone
        - name: DRONE_SERVER_HOST
          value: drone.tbrnt.ch
        - name: DRONE_SERVER_PROTO
          value: https
        envFrom:
        - secretRef:
            name: drone
        image: docker.io/drone/drone:1.10.1
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: http
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: drone
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /data
          name: data
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: data
