apiVersion: v1 kind: Service metadata: name: transmission spec: ports: - port: 9091 protocol: TCP targetPort: 9091 name: webui selector: run: transmission --- apiVersion: apps/v1 kind: Deployment metadata: labels: run: transmission name: transmission spec: replicas: 1 selector: matchLabels: run: transmission template: metadata: labels: run: transmission spec: securityContext: # runAsUser: 1000 # runAsGroup: 1000 fsGroup: 1000 initContainers: - name: chown image: busybox command: ["sh", "-c", "chown -R 1000:1000 /config"] volumeMounts: - mountPath: /config name: htpc-home subPath: transmission - mountPath: /downloads name: htpc-home subPath: downloads - mountPath: /watch name: htpc-home subPath: watch # - name: setup-transmission # image: busybox # securityContext: # runAsUser: 1000 # runAsGroup: 1000 # command: # - sh # - -c # - | # echo Saving settings.json # echo '{"download-dir": "/downloads", "rpc-whitelist-enabled": false, "rpc-host-whitelist-enabled": false}' > /config/settings.json; # echo settings.json successfully saved # volumeMounts: # - mountPath: /config # name: htpc-home # subPath: transmission containers: - name: transmission image: linuxserver/transmission env: - name: TZ value: Pacific/Auckland - name: PUID value: "1000" - name: PGID value: "1000" - name: WHITELIST value: "" - name: HOST_WHITELIST value: "" ports: - containerPort: 9091 name: webui protocol: TCP - containerPort: 51413 name: torrent-tcp protocol: TCP - containerPort: 51413 name: torrent-udp protocol: UDP resources: {} volumeMounts: - mountPath: /config name: htpc-home subPath: transmission - mountPath: /downloads name: htpc-home subPath: downloads - mountPath: /watch name: htpc-home subPath: watch