This is a public repository for storing charts related to quick deployment of Seafile using Helm.
-
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=INIT_S3_SECRET_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>'
where
JWT_PRIVATE_KEY
can get frompwgen -s 40 1
-
Copy and modify the
my-values.yaml
according to your configurationswget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values/latest/cluster.yaml nano my-values.yaml
The placeholder
<type of deployment>
can bepro
,ce
andcluster
Tip
It is not necessary to use the my-values.yaml
we provided (i.e., you can create an empty my-values.yaml
and 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/<type of deployment> --namespace seafile --create-namespace --values my-values.yaml
Tip
- The default service type of Seafile is
LoadBalancer
, andNginx-ingress
is not integrated because it is outdated in the new Kubernetes version, and new features are being added to the Gateway API. So you should specify K8S load balancer for Seafile or specify at least one external ip, that can be accessed from external networks. - After the first-time startup, you can remove all initial variables (i.e.,
INIT_*
) and setinitMode
tofalse
.
Note
- For
pro
edition, 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 --namespace seafile --values my-values.yaml
The version of Seafile Helm Chart is same as the major version of Seafile, i.e.:
- latest Seafile: 12.0.9
- latest Seafile Helm Chart: 12.0
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/<type of deployment> --namespace seafile --create-namespace --values my-values.yaml --version 12.0
and rollback to old version by:
helm rollback seafile -n seafile <revision>
helm delete seafile --namespace seafile