apiVersion: apps/v1
kind: Deployment
metadata:
  name: mastodon-streaming
  labels:
    app: mastodon-streaming
spec:
  selector:
    matchLabels:
      app: mastodon-streaming
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  template:
    metadata:
      labels:
        app: mastodon-streaming
    spec:
      containers:
      - name: mastodon
        image: tootsuite/mastodon:v3.4.1
        command: ["yarn", "start"]
        ports:
        - containerPort: 4000
        livenessProbe:
          httpGet:
            port: 4000
            path: /api/v1/streaming/health
          initialDelaySeconds: 60
          periodSeconds: 30
        readinessProbe:
          httpGet:
            port: 4000
            path: /api/v1/streaming/health
          initialDelaySeconds: 60
          periodSeconds: 30
