diff --git a/bootstrap/kustomizations/kustomization-prowlarr.yaml b/bootstrap/kustomizations/kustomization-prowlarr.yaml new file mode 100644 index 0000000..b97550e --- /dev/null +++ b/bootstrap/kustomizations/kustomization-prowlarr.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: prowlarr + namespace: flux-system +spec: + interval: 15m + path: ./prowlarr + prune: true # remove any elements later removed from the above path + timeout: 2m # if not set, this defaults to interval duration, which is 1h + sourceRef: + kind: GitRepository + name: flux-system + healthChecks: + - apiVersion: apps/v1 + kind: Deployment + name: prowlarr + namespace: prowlarr diff --git a/bootstrap/namespaces/namespace-prowlarr.yaml b/bootstrap/namespaces/namespace-prowlarr.yaml new file mode 100644 index 0000000..eabaca0 --- /dev/null +++ b/bootstrap/namespaces/namespace-prowlarr.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: prowlarr diff --git a/prowlarr/deployment.yaml b/prowlarr/deployment.yaml new file mode 100644 index 0000000..5980f44 --- /dev/null +++ b/prowlarr/deployment.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prowlarr + namespace: prowlarr +spec: + selector: + matchLabels: + app: prowlarr + template: + metadata: + labels: + app: prowlarr + spec: + containers: + - name: prowlarr + image: lscr.io/linuxserver/prowlarr:latest + ports: + - containerPort: 9696 + name: http + protocol: TCP + volumeMounts: + - name: config + mountPath: /config + volumes: + - name: config + persistentVolumeClaim: + claimName: prowlarr-config + + diff --git a/prowlarr/dns-endpoint.yaml b/prowlarr/dns-endpoint.yaml new file mode 100644 index 0000000..0c1e514 --- /dev/null +++ b/prowlarr/dns-endpoint.yaml @@ -0,0 +1,12 @@ +apiVersion: externaldns.k8s.io/v1alpha1 +kind: DNSEndpoint +metadata: + name: prowlarr.michaelthomson.dev + namespace: prowlarr +spec: + endpoints: + - dnsName: prowlarr.michaelthomson.dev + recordTTL: 180 + recordType: CNAME + targets: + - server.michaelthomson.dev diff --git a/prowlarr/ingress.yaml b/prowlarr/ingress.yaml new file mode 100644 index 0000000..c99e02d --- /dev/null +++ b/prowlarr/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: prowlarr + namespace: prowlarr + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd + traefik.ingress.kubernetes.io/router.tls: "true" +spec: + rules: + - host: prowlarr.michaelthomson.dev + http: + paths: + - pathType: ImplementationSpecific + path: / + backend: + service: + name: prowlarr + port: + name: http + tls: + - hosts: + - prowlarr.michaelthomson.dev + secretName: letsencrypt-wildcard-cert-michaelthomson.dev diff --git a/prowlarr/pvc-config.yaml b/prowlarr/pvc-config.yaml new file mode 100644 index 0000000..c384a17 --- /dev/null +++ b/prowlarr/pvc-config.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: prowlarr-config + namespace: prowlarr +spec: + resources: + requests: + storage: 1Gi + storageClassName: longhorn + accessModes: + - ReadWriteOnce diff --git a/prowlarr/service.yaml b/prowlarr/service.yaml new file mode 100644 index 0000000..0d04540 --- /dev/null +++ b/prowlarr/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: prowlarr + namespace: prowlarr +spec: + selector: + app: prowlarr + ports: + - port: 80 + targetPort: http + name: http