---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: dendrite
    k8s-app: dendrite
  name: dendrite-federationapi
  namespace: default
spec:
  selector:
    matchLabels:
      k8s-app: dendrite
  strategy:
    rollingUpdate:
      maxUnavailable: 0
  template:
    metadata:
      labels:
        k8s-app: dendrite
    spec:
      containers:
      - image: matrixdotorg/dendrite-polylith
        name: dendrite-polylith
        resources:
          requests:
            cpu: 100m
            memory: 300Mi
          limits:
            cpu: 500m
            memory: 600Mi
        ports:
        - name: federation-api
          containerPort: 7775
          protocol: TCP
        readinessProbe:
          tcpSocket:
            port: 7775
          initialDelaySeconds: 5
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /health
            port: http
            scheme: HTTP
          periodSeconds: 10
          failureThreshold: 3
        args: ["federationapi"]
