mirror of
https://github.com/michaelthomson0797/fleet-infra.git
synced 2026-02-04 13:09:53 +00:00
custom transmission deployment v1
This commit is contained in:
18
bootstrap/kustomizations/kustomization-transmission.yaml
Normal file
18
bootstrap/kustomizations/kustomization-transmission.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: transmission
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 15m
|
||||||
|
path: ./transmission
|
||||||
|
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: transmission
|
||||||
|
namespace: transmission
|
||||||
4
bootstrap/namespaces/namespace-transmission.yaml
Normal file
4
bootstrap/namespaces/namespace-transmission.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: transmission
|
||||||
13
transmission/config.yaml
Normal file
13
transmission/config.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: transmission-config
|
||||||
|
namespace: transmission
|
||||||
|
data:
|
||||||
|
OPENVPN_PROVIDER: PROTONVPN
|
||||||
|
OPENVPN_CONFIG: us.protonvpn.net.udp
|
||||||
|
OPENVPN_USERNAME: wSNJV3UTu7K8fxBV+pmp
|
||||||
|
OPENVPN_PASSWORD: fh7dwMzYzJGmHgTo5nTlirjaO0LANcUa
|
||||||
|
LOCAL_NETWORK: 10.0.0.0/8
|
||||||
|
OPENVPN_OPTS: --inactive 3600 --ping 10 --ping-exit 60
|
||||||
|
DISABLE_PORT_FORWARDER: false
|
||||||
60
transmission/deployment.yaml
Normal file
60
transmission/deployment.yaml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: transmission
|
||||||
|
namespace: transmission
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: transmission
|
||||||
|
strategy: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: transmission
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: haugene/transmission-openvpn
|
||||||
|
name: transmission
|
||||||
|
imagePullPolicy: Always
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: transmission-config
|
||||||
|
optional: false
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
tcpSocket:
|
||||||
|
port: 9091
|
||||||
|
timeoutSeconds: 2
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 2
|
||||||
|
successThreshold: 2
|
||||||
|
tcpSocket:
|
||||||
|
port: 9091
|
||||||
|
timeoutSeconds: 2
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: true
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /data
|
||||||
|
name: data
|
||||||
|
- mountPath: /config
|
||||||
|
name: config
|
||||||
|
restartPolicy: Always
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: transmission-data
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: transmission-config
|
||||||
12
transmission/dns-endpoint.yaml
Normal file
12
transmission/dns-endpoint.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: externaldns.k8s.io/v1alpha1
|
||||||
|
kind: DNSEndpoint
|
||||||
|
metadata:
|
||||||
|
name: transmission-test.michaelthomson.dev
|
||||||
|
namespace: jellyfin
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- dnsName: transmission-test.michaelthomson.dev
|
||||||
|
recordTTL: 180
|
||||||
|
recordType: CNAME
|
||||||
|
targets:
|
||||||
|
- server.michaelthomson.dev
|
||||||
26
transmission/ingress.yaml
Normal file
26
transmission/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: transmission
|
||||||
|
namespace: transmission
|
||||||
|
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:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: transmission-test.michaelthomson.dev
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: transmission
|
||||||
|
port:
|
||||||
|
number: 9091
|
||||||
|
path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- transmission-test.michaelthomson.dev
|
||||||
|
secretName: letsencrypt-wildcard-cert-michaelthomson.dev
|
||||||
12
transmission/pvc-config.yaml
Normal file
12
transmission/pvc-config.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: transmission-config
|
||||||
|
namespace: transmission
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
12
transmission/pvc-data.yaml
Normal file
12
transmission/pvc-data.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: transmission-data
|
||||||
|
namespace: transmission
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 150Gi
|
||||||
14
transmission/service.yaml
Normal file
14
transmission/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: transmission
|
||||||
|
namespace: transmission
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: transmission
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 9091
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
Reference in New Issue
Block a user