apiVersion: apps/v1
kind: Deployment
metadata:
  name: organizr
  labels:
    app.kubernetes.io/name: organizr
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: organizr
  template:
    metadata:
      labels:
        app.kubernetes.io/name: organizr
    spec:
      containers:
        - name: organizr
          image: organizr/organizr:latest
          imagePullPolicy: Always
          ports:
            - name: "http"
              containerPort: 80
              protocol: TCP
          volumeMounts:
            - name: organizr-config
              mountPath: /config
          env:
            - name: fpm
              value: "false"
            - name: branch
              value: "v2-master"
          envFrom:
            - configMapRef:
                name: mediaserver-permissions
          resources:
            requests:
              cpu: "100m"
              memory: "250Mi"
            limits:
              cpu: "500m"
              memory: "500Mi"
          readinessProbe:
            httpGet:
              path: /
              port: http
              scheme: HTTP
            periodSeconds: 10
            failureThreshold: 3
          livenessProbe:
            httpGet:
              path: /
              port: http
              scheme: HTTP
            initialDelaySeconds: 600
            periodSeconds: 10
            failureThreshold: 5
      volumes:
        - name: organizr-config
          persistentVolumeClaim:
            claimName: organizr-config
