---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: jackett
  labels:
    app: jackett
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jackett
  template:
    metadata:
      labels:
        app: jackett
    spec:
      containers:
      - name: jackett
        image: lscr.io/linuxserver/jackett:latest
        env:
        - name: AUTO_UPDATE
          value: "true"
        - name: TZ
          value: America/New_York
        - name: OVERRIDE_DNS
          value: "8.8.8.8"
        ports:
        - name: web
          containerPort: 9117
        volumeMounts:
        - name: jackett-data-volume
          mountPath: "/config"
        - name: media-volume
          mountPath: "/downloads"
      volumes:
      - name: jackett-data-volume
        persistentVolumeClaim:
          claimName: jackett-data-pvc
      - name: media-volume
        persistentVolumeClaim:
          claimName: media-pvc
---
apiVersion: v1
kind: Service
metadata:
  name: jackett
spec:
  type: ClusterIP
  ports:
    - name: web
      port: 9117
      targetPort: 9117

  selector:
    app: jackett
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: jackett-ingress-route
  namespace: default
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`jackett.dezendorf.net`)
    kind: Rule
    middlewares:
    - name: redirecthttps
    services:
    - name: jackett
      port: 9117
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: jackett-websecure-route
  namespace: default
spec:
  entryPoints:
    - websecure
  routes:
  - match: Host(`jackett.dezendorf.net`)
    kind: Rule
    services:
    - name: jackett
      port: 9117
  tls:
    certResolver: myresolver
