From 6c91d1ab3323e373275575345610387c3041885d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=97=AA=D1=94=CE=BD=CE=B9=CE=B7=20=E1=97=B7=CF=85=D0=BD?= =?UTF-8?q?=CA=9F?= Date: Sat, 27 Mar 2021 16:24:25 -0400 Subject: [PATCH] [rtorrent-flood] add initcontainer example (#731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add initcontainer and pin latest * update docs * fix: rtorrent * fix: rtorrent * docs: update * fix: update umask Co-authored-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs --- charts/stable/rtorrent-flood/Chart.yaml | 2 +- charts/stable/rtorrent-flood/README.md | 2 +- charts/stable/rtorrent-flood/values.yaml | 122 ++++------------------- 3 files changed, 19 insertions(+), 107 deletions(-) diff --git a/charts/stable/rtorrent-flood/Chart.yaml b/charts/stable/rtorrent-flood/Chart.yaml index 9ed2e296..275cfd45 100644 --- a/charts/stable/rtorrent-flood/Chart.yaml +++ b/charts/stable/rtorrent-flood/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: latest description: rTorrent is a stable, high-performance and low resource consumption BitTorrent client. name: rtorrent-flood -version: 6.0.1 +version: 6.1.0 kubeVersion: ">=1.16.0-0" keywords: - rtorrent diff --git a/charts/stable/rtorrent-flood/README.md b/charts/stable/rtorrent-flood/README.md index 07368298..c6d9d5ab 100644 --- a/charts/stable/rtorrent-flood/README.md +++ b/charts/stable/rtorrent-flood/README.md @@ -1,6 +1,6 @@ # rtorrent-flood -![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square) ![AppVersion: v0.9.8-r8+v4.5.0](https://img.shields.io/badge/AppVersion-v0.9.8--r8+v4.5.0-informational?style=flat-square) +![Version: 6.1.0](https://img.shields.io/badge/Version-6.1.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) rTorrent is a stable, high-performance and low resource consumption BitTorrent client. diff --git a/charts/stable/rtorrent-flood/values.yaml b/charts/stable/rtorrent-flood/values.yaml index b70a4878..d7ce26e8 100644 --- a/charts/stable/rtorrent-flood/values.yaml +++ b/charts/stable/rtorrent-flood/values.yaml @@ -5,6 +5,16 @@ # https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml # +# # Use an initContainer to delete the rtorrent.lock file when the pod starts +# # this is only required if `session.use_lock.set = no` is NOT set +# initContainers: +# - name: remove-session-lock +# image: busybox +# command: ["sh", "-c", "rm -rf /config/.local/share/rtorrent/.session/rtorrent.lock"] +# volumeMounts: +# - name: config +# mountPath: /config + image: repository: jesec/rtorrent-flood pullPolicy: IfNotPresent @@ -63,69 +73,24 @@ persistence: # -- Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc # @default -- see URL to default config config: | - ############################################################################# - # A minimal rTorrent configuration that provides the basic features - ############################################################################# - - # Some default configs are commented out by #, you can override them to fit your needs - # Lines commented out by ## are merely examples (NOT default) - - # It is recommended to extend upon this default config file. For example: - # override only some configs via command line: -o network.port_range.set=6881-6881 - # or, on top of custom config: import = /etc/rtorrent/rtorrent.rc - - # rTorrent runtime directory (cfg.basedir) [default: "$HOME/.local/share/rtorrent"] + session.use_lock.set = no method.insert = cfg.basedir, private|const|string, (cat,(fs.homedir),"/.local/share/rtorrent/") - - # Default download directory (cfg.download) [default: "$(cfg.basedir)/download"] - method.insert = cfg.download, private|const|string, (cat,(cfg.basedir),"download/") - - # Log directory (cfg.logs) [default: "$(cfg.basedir)/log"] - method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/") + method.insert = cfg.download, private|const|string, (cat,"/downloads/","download/") + method.insert = cfg.logs, private|const|string, (cat,(cfg.download),"log/") method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log") - - # Torrent session directory (cfg.session) [default: "$(cfg.basedir)/.session"] method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/") - - # Watch (drop to add) directories (cfg.watch) [default: "$(cfg.basedir)/watch"] - method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/") - - # Create directories + method.insert = cfg.watch, private|const|string, (cat,(cfg.download),"watch/") fs.mkdir.recursive = (cat,(cfg.basedir)) - fs.mkdir = (cat,(cfg.download)) fs.mkdir = (cat,(cfg.logs)) fs.mkdir = (cat,(cfg.session)) - fs.mkdir = (cat,(cfg.watch)) fs.mkdir = (cat,(cfg.watch),"/load") fs.mkdir = (cat,(cfg.watch),"/start") - - # Drop to "$(cfg.watch)/load" to add torrent schedule2 = watch_load, 11, 10, ((load.verbose, (cat, (cfg.watch), "load/*.torrent"))) - - # Drop to "$(cfg.watch)/start" to add torrent and start downloading schedule2 = watch_start, 10, 10, ((load.start_verbose, (cat, (cfg.watch), "start/*.torrent"))) - - # Listening port for incoming peer traffic - #network.port_range.set = 6881-6999 - #network.port_random.set = yes - - # Distributed Hash Table and Peer EXchange - # Enable tracker-less torrents but vulnerable to passive sniffing - # DHT and PEX are always disabled for private torrents - #dht.mode.set = auto - #dht.port.set = 6881 - #protocol.pex.set = yes - - # DHT nodes for bootstrapping dht.add_bootstrap = dht.transmissionbt.com:6881 dht.add_bootstrap = dht.libtorrent.org:25401 - - # UDP tracker support - #trackers.use_udp.set = yes - - # Peer settings throttle.max_uploads.set = 100 throttle.max_uploads.global.set = 250 throttle.min_peers.normal.set = 20 @@ -133,73 +98,20 @@ config: | throttle.min_peers.seed.set = 30 throttle.max_peers.seed.set = 80 trackers.numwant.set = 80 - - #protocol.encryption.set = allow_incoming,try_outgoing,enable_retry - - # Limits for file handle resources, this is optimized for - # an `ulimit` of 1024 (a common default). You MUST leave - # a ceiling of handles reserved for rTorrent's internal needs! + network.port_range.set = 6881-6881 network.max_open_files.set = 600 network.max_open_sockets.set = 300 - - # Memory resource usage (increase if you have a large number of items loaded, - # and/or the available resources to spend) pieces.memory.max.set = 1800M - #network.xmlrpc.size_limit.set = 16M - - # Basic operational settings session.path.set = (cat, (cfg.session)) directory.default.set = (cat, (cfg.download)) log.execute = (cat, (cfg.logs), "execute.log") - ##log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log") - - # Other operational settings encoding.add = utf8 - system.umask.set = 0027 + system.daemon.set = true + system.umask.set = 0002 system.cwd.set = (directory.default) - #schedule2 = low_diskspace, 5, 60, ((close_low_diskspace, 500M)) - #pieces.hash.on_completion.set = no - ##view.sort_current = seeding, greater=d.ratio= - ##keys.layout.set = qwerty - - # HTTP and SSL network.http.max_open.set = 50 network.http.dns_cache_timeout.set = 25 - - # Path to the CA bundle. By default, rTorrent tries to detect from: - # $RTORRENT_CA_BUNDLE (highest priority) - # $CURL_CA_BUNDLE - # $SSL_CERT_FILE - # /etc/ssl/certs/ca-certificates.crt - # /etc/pki/tls/certs/ca-bundle.crt - # /usr/share/ssl/certs/ca-bundle.crt - # /usr/local/share/certs/ca-root-nss.crt - # /etc/ssl/cert.pem (lowest priority) - ##network.http.cacert.set = /etc/ssl/certs/ca-certificates.crt - - # Path to the certificate directory to verify the peer. The certificates - # must be in PEM format, and the directory must have been processed using - # the c_rehash utility supplied with openssl. - # - # For advanced users only, generally you should use network.http.cacert.set - # to specify path to the bundle of certificates. - ##network.http.capath.set = "/etc/ssl/certs" - - #network.http.ssl_verify_peer.set = 1 - #network.http.ssl_verify_host.set = 1 - - # Run the rTorrent process as a daemon in the background - #system.daemon.set = false - - # XML-RPC interface network.scgi.open_local = (cat,(cfg.basedir),rtorrent.sock) - - # Logging: - # Levels = critical error warn notice info debug - # Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_* print = (cat, "Logging to ", (cfg.logfile)) log.open_file = "log", (cfg.logfile) log.add_output = "info", "log" - ##log.add_output = "tracker_debug", "log" - - ### END of rtorrent.rc ###