apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: flipop
  name: flipop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: flipop
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: flipop
    spec:
      containers:
      - env:
        - name: DIGITALOCEAN_ACCESS_TOKEN
          valueFrom:
            secretKeyRef:
              key: DIGITALOCEAN_ACCESS_TOKEN
              name: flipop
        image: digitaloceanapps/flipop:latest
        imagePullPolicy: Always
        name: flipop
        ports:
        - containerPort: 8080
          name: prometheus
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      serviceAccount: flipop
      serviceAccountName: flipop
      terminationGracePeriodSeconds: 30
