diff --git a/index.yaml b/index.yaml index 0561333..34d0338 100644 --- a/index.yaml +++ b/index.yaml @@ -3,7 +3,31 @@ entries: renterd: - apiVersion: v2 appVersion: 1.0.0 - created: "2024-01-19T12:36:10.531255932Z" + created: "2024-02-06T14:29:19.769138379Z" + dependencies: + - condition: mysql.enabled + name: mysql + repository: https://charts.bitnami.com/bitnami + version: 9.19.1 + description: Sia renterd helm chart + digest: f6c26b4e78e998898baa93a94736a4b9d12ae6f23be15588676514ffa5c53820 + icon: https://i.imgur.com/pWg0PRK.png + keywords: + - storage + - distributed + - blockchain + - sia + - renter + - s3 + - webui + name: renterd + type: application + urls: + - https://charts.motyka.pro/renterd-1.0.3.tgz + version: 1.0.3 + - apiVersion: v2 + appVersion: 1.0.0 + created: "2024-02-06T14:29:19.764492708Z" dependencies: - condition: mysql.enabled name: mysql @@ -27,7 +51,7 @@ entries: version: 1.0.2 - apiVersion: v2 appVersion: 1.0.0 - created: "2024-01-19T12:36:10.526421531Z" + created: "2024-02-06T14:29:19.75359192Z" dependencies: - condition: mysql.enabled name: mysql @@ -51,7 +75,7 @@ entries: version: 1.0.1 - apiVersion: v2 appVersion: 1.0.0 - created: "2024-01-19T12:36:10.516465275Z" + created: "2024-02-06T14:29:19.710655739Z" dependencies: - condition: mysql.enabled name: mysql @@ -65,4 +89,4 @@ entries: urls: - https://charts.motyka.pro/renterd-1.0.0.tgz version: 1.0.0 -generated: "2024-01-19T12:36:10.509394918Z" +generated: "2024-02-06T14:29:19.697287946Z" diff --git a/renterd-1.0.3.tgz b/renterd-1.0.3.tgz new file mode 100644 index 0000000..2b82a0e Binary files /dev/null and b/renterd-1.0.3.tgz differ diff --git a/renterd/Chart.lock b/renterd/Chart.lock index d65b1fb..c701b96 100644 --- a/renterd/Chart.lock +++ b/renterd/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: mysql repository: https://charts.bitnami.com/bitnami - version: 9.16.0 -digest: sha256:24bd9e37f8c20326196847f3c5f20e30804ac688e02c38aae1adb86b343ea7d3 -generated: "2023-12-28T17:58:36.221619748Z" + version: 9.19.1 +digest: sha256:77114d81404187c5a71fb46579aebc23b1b469699ec57f5a4105eb5e512361cf +generated: "2024-02-05T17:11:14.267841086Z" diff --git a/renterd/Chart.yaml b/renterd/Chart.yaml index df5ec58..cb71b24 100644 --- a/renterd/Chart.yaml +++ b/renterd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: renterd description: Sia renterd helm chart type: application -version: 1.0.2 +version: 1.0.3 appVersion: "1.0.0" icon: https://i.imgur.com/pWg0PRK.png keywords: @@ -15,6 +15,6 @@ keywords: - webui dependencies: - name: mysql - version: 9.16.0 + version: 9.19.1 repository: https://charts.bitnami.com/bitnami condition: mysql.enabled \ No newline at end of file diff --git a/renterd/README.md b/renterd/README.md index ad2a743..a0167ce 100644 --- a/renterd/README.md +++ b/renterd/README.md @@ -1,20 +1,20 @@ -# Basic Sia renterd helm chart +# Unofficial Sia renterd helm chart [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/artur9010)](https://artifacthub.io/packages/search?repo=artur9010) -Simple helm chart containing [Sia renterd software](https://sia.tech/software/renterd). +Helm chart for [Sia renterd software](https://sia.tech/software/renterd). ## Helm repository ``` helm repo add artur9010 https://charts.motyka.pro -helm install renterd artur9010/renterd --version 1.0.2 +helm install renterd artur9010/renterd --version 1.0.3 ``` ## Requirements -- Kubernetes 1.28+ cluster, nodes should have at least 8GB of ram. -- Some kind of persistent storage solution (longhorn, ceph, aws-ebs etc.). It's only required by `renterd-bus` pod which contains consensus (blockchain) copy and partial slabs. There is no support for hostPath for now. +- Kubernetes 1.28+ cluster, nodes should have at least 16GB of ram as renterd is memory hungry. It should work with older versions of k8s but I haven't tested it. +- Some kind of persistent storage solution (longhorn, ceph, aws-ebs etc.) and 50GB of available storage (mostly for blockchain copy). It's only required by `renterd-bus` pod which contains consensus (blockchain) copy and partial slabs. There is no support for hostPath, but [rancher local path provisioner](https://github.com/rancher/local-path-provisioner) should work fine - (Optional) VerticalPodAutoscaler, [there is a nice chart for it](https://artifacthub.io/packages/helm/cowboysysop/vertical-pod-autoscaler) renterd can run with sqlite or mysql database, due to performance issues on sqlite one I decided to not include an option to use sqlite. This chart includes bitnami mysql chart that you can enable by setting `mysql.enabled` to `true`. If you already have a mysql databse - create two databases (eq. `renterd` and `renterd_metrics`) and grant all privileges on them to renterd user. Provide credentials to external database in section `mysqlExternal` in values @@ -28,13 +28,40 @@ mysqlExternal: databaseMetrics: "renterd_metrics" ``` +Additional requirements for external mysql database: +- `max_connections` a bit higher than default 151, 1024 works fine +- `log_bin_trust_function_creators` set to 1 (as long as your db user dosen't have SUPER privilage, see https://github.com/SiaFoundation/renterd/issues/910) + +And while it's not a requirement, please increase innodb_buffer_pool_size from default 128MB, 4G should be ok for 16GB node. I've tested it with those params and it works fine for me, those are also a defaults if you enable built-in mysql chart (Values.mysql.primary.configuration) +``` +[mysqld] +innodb_buffer_pool_size=4G +``` +## Changes + +### 1.0.3 +- Removed renterd.s3.keys from values as keypairs can now be managed inside webUI. +- mysql: changed default authentication plugin from `mysql_native_password` to `caching_sha2_password` due to massive spam in container logs, see https://github.com/bitnami/charts/issues/18606 + +## CPU and memory requirements +Tested on Ryzen zen1 platform (Ryzen 5 2200G, 2400G), while uploading files to s3 api via rclone, max 4 uploads at once. As database gets bigger it will probably require more memory, renterd holds uploaded data in memory. +``` +NAME CPU(cores) MEMORY(bytes) +mysql-0 52m 875Mi +renterd-autopilot-0 8m 10Mi +renterd-bus-0 538m 112Mi +renterd-worker-0 215m 3314Mi +renterd-worker-1 196m 3415Mi +renterd-worker-2 1447m 1867Mi +``` + ## Looking for perfect server to run renterd? Check netcup -[![netcup](https://i.imgur.com/2Sjxas5.png)](https://www.netcup.eu/?ref=IHREKUNDENNUMMER) +[![netcup](https://i.imgur.com/2Sjxas5.png)](https://www.netcup.eu/?ref=200705) -ARM servers are available from 7 eur per month. [Check netcup for more info.](https://www.netcup.eu/?ref=IHREKUNDENNUMMER) +ARM servers are available from 7 eur per month. [Check netcup for more info.](https://www.netcup.eu/?ref=200705) -Use code `36nc16697741959` to get [5 EUR off](https://www.netcup.eu/bestellen/gutschein_einloesen.php?gutschein=36nc16697741959&ref=IHREKUNDENNUMMER). +Use code `36nc16697741959` to get [5 EUR off](https://www.netcup.eu/bestellen/gutschein_einloesen.php?gutschein=36nc16697741959&ref=200705). ## [Experimental] VerticalPodAutoscaler support @@ -83,21 +110,21 @@ ingress: - path: / pathType: ImplementationSpecific svcName: renterd-bus - svcPort: 9880 + svcPort: 9980 - path: /api/worker pathType: ImplementationSpecific svcName: renterd-worker - svcPort: 9880 + svcPort: 9980 - path: /api/autopilot pathType: ImplementationSpecific svcName: renterd-autopilot - svcPort: 9880 + svcPort: 9980 - host: s3.example.com paths: - path: / pathType: ImplementationSpecific svcName: renterd-worker - svcPort: 7070 + svcPort: 8080 tls: - secretName: ingress-tls hosts: @@ -105,12 +132,6 @@ ingress: - s3.example.com ``` -## Cloudflared tunnel - -It also should work fine with cloudflared tunnel, just make sure to point /api/worker and /api/autopilot to renterd-worker and renterd-autopilot services, all other traffic should go to renterd-bus. - -All traffic from s3 domain should go to `renterd-worker:7070` - ## Values See values.yaml file. \ No newline at end of file diff --git a/renterd/charts/mysql-9.16.0.tgz b/renterd/charts/mysql-9.16.0.tgz deleted file mode 100644 index eea202c..0000000 Binary files a/renterd/charts/mysql-9.16.0.tgz and /dev/null differ diff --git a/renterd/charts/mysql-9.19.1.tgz b/renterd/charts/mysql-9.19.1.tgz new file mode 100644 index 0000000..164835e Binary files /dev/null and b/renterd/charts/mysql-9.19.1.tgz differ diff --git a/renterd/templates/configmap.yaml b/renterd/templates/configmap.yaml index 1a39c0c..20a0358 100644 --- a/renterd/templates/configmap.yaml +++ b/renterd/templates/configmap.yaml @@ -8,10 +8,6 @@ data: gatewayAddr: "0.0.0.0:{{ .Values.service.bus.port }}" s3: enabled: {{ .Values.renterd.s3.enabled }} - keypairsV4: - {{- range $v := .Values.renterd.s3.keys }} - {{ $v.accessKey }}: "{{ $v.secretKey }}" - {{- end }} entrypoint.sh: | #!/bin/sh exec renterd -http=':{{ .Values.service.http.port }}' -s3.address=':{{ .Values.service.s3.port }}' "$@" \ No newline at end of file diff --git a/renterd/templates/statefulset-renterd-autopilot.yaml b/renterd/templates/statefulset-renterd-autopilot.yaml index 1492c02..5b9e1a8 100644 --- a/renterd/templates/statefulset-renterd-autopilot.yaml +++ b/renterd/templates/statefulset-renterd-autopilot.yaml @@ -30,9 +30,9 @@ spec: # Wait for bus before starting autopilot - --host="renterd-bus:{{$.Values.service.http.port}}" # Make sure all workers are online before starting autopilot - {{range $i, $e := until (int .Values.renterd.workers.replicas) }} + {{ range $i, $e := until (int .Values.renterd.workers.replicas) }} - --host="renterd-worker-{{$i}}.renterd-worker:{{$.Values.service.http.port}}" - {{end}} + {{ end }} containers: - name: renterd image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -92,4 +92,4 @@ spec: - name: renterd-config configMap: name: renterd - defaultMode: 0755 \ No newline at end of file + defaultMode: 0755 diff --git a/renterd/templates/statefulset-renterd-worker.yaml b/renterd/templates/statefulset-renterd-worker.yaml index b9fcd61..b40065f 100644 --- a/renterd/templates/statefulset-renterd-worker.yaml +++ b/renterd/templates/statefulset-renterd-worker.yaml @@ -28,7 +28,7 @@ spec: image: ghcr.io/patrickdappollonio/wait-for:v1.0.0 args: - --verbose - # Wait for bus before starting autopilot + # Wait for bus before starting workers - --host="renterd-bus:{{$.Values.service.http.port}}" containers: - name: renterd @@ -90,4 +90,4 @@ spec: - name: renterd-config configMap: name: renterd - defaultMode: 0755 \ No newline at end of file + defaultMode: 0755 diff --git a/renterd/templates/vpa.yaml b/renterd/templates/vpa.yaml index 1d0a375..e9b18cb 100644 --- a/renterd/templates/vpa.yaml +++ b/renterd/templates/vpa.yaml @@ -1,4 +1,4 @@ -{{- if .Values.renterd.bus.vpa.enabled -}} +{{ if .Values.renterd.bus.vpa.enabled -}} apiVersion: "autoscaling.k8s.io/v1" kind: VerticalPodAutoscaler metadata: @@ -8,9 +8,9 @@ spec: apiVersion: "apps/v1" kind: StatefulSet name: renterd-bus -{{- end }} +{{ end }} --- -{{- if .Values.renterd.autopilot.vpa.enabled -}} +{{ if .Values.renterd.autopilot.vpa.enabled }} apiVersion: "autoscaling.k8s.io/v1" kind: VerticalPodAutoscaler metadata: @@ -20,9 +20,9 @@ spec: apiVersion: "apps/v1" kind: StatefulSet name: renterd-autopilot -{{- end }} +{{ end }} --- -{{- if .Values.renterd.workers.vpa.enabled -}} +{{ if .Values.renterd.workers.vpa.enabled }} apiVersion: "autoscaling.k8s.io/v1" kind: VerticalPodAutoscaler metadata: @@ -32,4 +32,4 @@ spec: apiVersion: "apps/v1" kind: StatefulSet name: renterd-worker -{{- end }} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/renterd/values.yaml b/renterd/values.yaml index 106073d..f10165e 100644 --- a/renterd/values.yaml +++ b/renterd/values.yaml @@ -1,7 +1,7 @@ image: repository: ghcr.io/siafoundation/renterd pullPolicy: IfNotPresent - tag: "1.0.2-zen" + tag: "1.0.3-zen" service: bus: @@ -22,9 +22,6 @@ renterd: password: "renterdApiPassowrd2" s3: enabled: true - keys: - - accessKey: "key_must_be_at_least_40_chars_CHANGE_ME_NOW" - secretKey: "key_must_be_at_least_40_chars_CHANGE_ME_NOW" bus: vpa: enabled: false @@ -119,8 +116,46 @@ mysql: databaseMetrics: "renterd_metrics" username: "renterd" password: "renterd" + rootPassword: "renterd" primary: + resources: + requests: + cpu: 250m + memory: 3072Mi extraFlags: "--max_connections=1024 --log_bin_trust_function_creators=1" + configuration: |- + [mysqld] + default_authentication_plugin=caching_sha2_password + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mysql + plugin_dir=/opt/bitnami/mysql/lib/plugin + port=3306 + socket=/opt/bitnami/mysql/tmp/mysql.sock + datadir=/bitnami/mysql/data + tmpdir=/opt/bitnami/mysql/tmp + max_allowed_packet=16M + bind-address=* + pid-file=/opt/bitnami/mysql/tmp/mysqld.pid + log-error=/opt/bitnami/mysql/logs/mysqld.log + character-set-server=UTF8 + slow_query_log=0 + long_query_time=10.0 + + # renterd chart + innodb_buffer_pool_size=4G + + [client] + port=3306 + socket=/opt/bitnami/mysql/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mysql/lib/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mysql/tmp/mysql.sock + pid-file=/opt/bitnami/mysql/tmp/mysqld.pid + # Only used if mysql.enabled==false mysqlExternal: