You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.5 KiB

  1. # SEAWEEDFS - helm chart (2.x)
  2. ## Info:
  3. * master/filer/volume are stateful sets with anti-affinity on the hostname,
  4. so your deployment will be spread/HA.
  5. * chart is using memsql(mysql) as the filer backend to enable HA (multiple filer instances)
  6. and backup/HA memsql can provide.
  7. * mysql user/password are created in a k8s secret (secret-seaweedfs-db.yaml) and injected to the filer
  8. with ENV.
  9. * cert config exists and can be enabled, but not been tested.
  10. ## Prerequisites
  11. ### Database
  12. A running MySQL-compatible database is expected by default, as specified in the `values.yaml` at `filer.extraEnvironmentVars`.
  13. This database should be pre-configured and initialized by running:
  14. ```sql
  15. CREATE TABLE IF NOT EXISTS `filemeta` (
  16. `dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field',
  17. `name` VARCHAR(766) NOT NULL COMMENT 'directory or file name',
  18. `directory` TEXT NOT NULL COMMENT 'full path to parent directory',
  19. `meta` LONGBLOB,
  20. PRIMARY KEY (`dirhash`, `name`)
  21. ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
  22. ```
  23. Alternative database can also be configured (e.g. leveldb) following the instructions at `filer.extraEnvironmentVars`.
  24. ### Node Labels
  25. Kubernetes node have labels which help to define which node(Host) will run which pod:
  26. * s3/filer/master needs the label **sw-backend=true**
  27. * volume need the label **sw-volume=true**
  28. to label a node to be able to run all pod types in k8s:
  29. ```
  30. kubectl label node YOUR_NODE_NAME sw-volume=true,sw-backend=true
  31. ```
  32. on production k8s deployment you will want each pod to have a different host,
  33. especially the volume server & the masters, currently all pods (master/volume/filer)
  34. have anti-affinity rule to disallow running multiple pod type on the same host.
  35. if you still want to run multiple pods of the same type (master/volume/filer) on the same host
  36. please set/update the corresponding affinity rule in values.yaml to an empty one:
  37. ```affinity: ""```
  38. ## PVC - storage class ###
  39. on the volume stateful set added support for K8S PVC, currently example
  40. with the simple local-path-provisioner from Rancher (comes included with k3d / k3s)
  41. https://github.com/rancher/local-path-provisioner
  42. you can use ANY storage class you like, just update the correct storage-class
  43. for your deployment.
  44. ## current instances config (AIO):
  45. 1 instance for each type (master/filer+s3/volume)
  46. you can update the replicas count for each node type in values.yaml,
  47. need to add more nodes with the corresponding labels.
  48. most of the configuration are available through values.yaml