apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: exporter
    app.kubernetes.io/name: plex_exporter
    app.kubernetes.io/part-of: plex
    app.kubernetes.io/version: 0.2.2
  name: plex-exporter
  namespace: multimedia
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: exporter
      app.kubernetes.io/name: plex_exporter
      app.kubernetes.io/part-of: plex
  template:
    metadata:
      labels:
        app.kubernetes.io/component: exporter
        app.kubernetes.io/name: plex_exporter
        app.kubernetes.io/part-of: plex
        app.kubernetes.io/version: 0.2.2
    spec:
      containers:
      - args:
        - --token=$(TOKEN)
        - --plex-server=http://192.168.2.98:32400
        envFrom:
        - secretRef:
            name: plex-token
        image: quay.io/paulfantom/plex_exporter:0.2.2
        imagePullPolicy: IfNotPresent
        name: plex-metrics
        ports:
        - containerPort: 9594
          name: metrics
        resources:
          limits:
            memory: 20Mi
          requests:
            memory: 11Mi
      nodeSelector:
        kubernetes.io/arch: amd64
      restartPolicy: Always
