Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy plex #51

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kubernetes/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resources:
# Flux-Kustomizations
# - ./downloads-backup/ks.yaml
# - ./overseerr/ks.yaml
# - ./plex/ks.yaml
- ./plex/ks.yaml
- ./prowlarr/ks.yaml
# - ./radarr/ks.yaml
# - ./sonarr/ks.yaml
Expand Down
128 changes: 128 additions & 0 deletions kubernetes/apps/media/plex/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: plex
namespace: ${NAMESPACE}
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 2.5.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
dependsOn:
- name: intel-device-plugin-gpu
namespace: tools
- name: rook-ceph-cluster
namespace: rook-ceph
- name: volsync
namespace: storage
- name: minio
namespace: storage
values:
controllers:
main:
annotations:
reloader.stakater.com/auto: "true"
containers:
main:
image:
repository: ghcr.io/onedr0p/plex-beta
tag: 1.40.0.7775-456fbaf97@sha256:cd6bafd8cf9f75c2d5b6517de312a82a986049f89f089da74b6bdb23928b8b37
env:
TZ: America/Denver
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: false
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
gpu.intel.com/i915: 1
memory: 16Gi
pod:
nodeSelector:
intel.feature.node.kubernetes.io/gpu: "true"
securityContext:
runAsUser: 568
runAsGroup: 568
runAsNonRoot: true
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
supplementalGroups: [44, 109, 100]
service:
main:
type: LoadBalancer
annotations:
io.cilium/lb-ipam-ips: 192.168.1.210
ports:
http:
port: 32400
ingress:
main:
enabled: true
ClassName: internal
annotations:
# external-dns.alpha.kubernetes.io/target: external.${SECRET_DOMAIN}
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
hosts:
- host: &host "plex.${SECRET_DOMAIN}"
paths:
- path: /
service:
name: main
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: plex
plex-cache:
existingClaim: plex-cache
globalMounts:
- path: /config/Library/Application Support/Plex Media Server/Cache
tmp:
type: emptyDir
media:
enabled: true
type: nfs
server:
nfs: "192.168.1.33"
path: /volume2/Media/
globalMounts:
- path: /media
readOnly: true
transcode:
type: emptyDir
8 changes: 8 additions & 0 deletions kubernetes/apps/media/plex/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./pvcs.yaml
- ./helmrelease.yaml
- ../../../../templates/volsync
13 changes: 13 additions & 0 deletions kubernetes/apps/media/plex/app/pvcs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: plex-cache
labels:
app.kubernetes.io/name: "plex"
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
storageClassName: ceph-block
36 changes: 36 additions & 0 deletions kubernetes/apps/media/plex/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app plex
namespace: flux-system
spec:
targetNamespace: &namespace media
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/media/plex/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 5m30s
timeout: 5m
decryption:
provider: sops
secretRef:
name: sops-age
postBuild:
substitute:
APP: *app
NAMESPACE: *namespace
VOLSYNC_CAPACITY: 100Gi
VOLSYNC_CACHE_CAPCITY: 20Gi
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets
2 changes: 1 addition & 1 deletion kubernetes/apps/media/prowlarr/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
- helmrelease.yaml
- ../../../../templates/volsync
- replicationsource.yaml
Loading