This is a public repository for storing charts related to quick deployment of Seafile using Helm.
Tip
If your K8S environment is planned to be deployed on NFS and you plan to use Nginx-Ingress in a Seafile 12.0 & 13.0 cluster, you can refer to the Forge repository provided by Aleridia.
-
Create namespace
kubectl create namespace seafile -
Create secret
# for pro/cluster kubectl create secret generic seafile-secret --namespace seafile \ --from-literal=JWT_PRIVATE_KEY='<required>' \ --from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \ --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \ --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \ --from-literal=REDIS_PASSWORD='' \ --from-literal=S3_SECRET_KEY='' \ --from-literal=S3_SSE_C_KEY='' # for ce kubectl create secret generic seafile-secret --namespace seafile \ --from-literal=JWT_PRIVATE_KEY='<required>' \ --from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \ --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \ --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \ --from-literal=REDIS_PASSWORD=''
where
JWT_PRIVATE_KEYcan get frompwgen -s 40 1
-
Copy and modify the
my-values.yamlaccording to your configurationswget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values/latest/cluster.yaml nano my-values.yaml
Tip
- Please go here to view the list of
chartVersion - It is not necessary to use the
my-values.yamlwe provided (i.e., you can create an emptymy-values.yamland add required field, as others have defined default values in our chart), because it destroys the flexibility of deploying with Helm, but it contains some formats of how Seafile Helm Chart reads these configurations, as well as all the environment variables and secret variables that can be read directly.
-
To install the chart use the following:
helm repo add seafile https://haiwen.github.io/seafile-helm-chart/repo helm upgrade --install seafile seafile/<ce, pro, cluster> --version <release version> --namespace seafile --create-namespace --values my-values.yaml
Tip
- The default service type of Seafile is ClusterIP. You need to use an appropriate ingress strategy to make Seafile accessible from the external network.
- After the first-time startup, you can remove all initial variables (i.e.,
INIT_*) and setinitModetofalse.
Note
- For
proedition, you should modify the hostname of Memcached and Elasticsearch after first-time startup according to here, then restart the instances bykubectl delete pod seafile -n seafile
- For
cluster, you should disableinitMode(i.e., set tofalse) after first-time startup, then upgrade the chart:helm upgrade seafile seafile/cluster --version <release version> --namespace seafile --values my-values.yaml
By default, it will follow the latest Chart and the latest Seafile. If you want to use a different version of Seafile, you can use the following command to control the version:
helm upgrade --install seafile seafile/ce --namespace seafile --create-namespace --values my-values.yaml --version 1.0and rollback to old version by:
helm rollback seafile -n seafile <revision>helm delete seafile --namespace seafile