-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathREADME.md.gotmpl
86 lines (59 loc) · 2.53 KB
/
README.md.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{{ template "chart.baseHead" . }}
## Configuration
SFTPGo has an extensive set of [configuration](https://docs.sftpgo.com/latest/config-file/) options allowing you to control the large set of features it provides.
The following options are available to configure SFTPGo when installing it with this chart.
**Note:** environmental configurations (like port bindings, certain directories, etc) are configured by the chart or the container image using flags and environment variables and they cannot be configured using a config file.
### values.yaml
Setting the `config` key in the values file is the easiest way to configure SFTPGo:
```yaml
config:
sftpd:
max_auth_retries: 10
```
### Custom volume mount
A custom configuration file can be mounted using the `volumes` and `volumeMounts` keys (see [Values](#values)).
By default, SFTPGo looks at the following locations for configuration (in the order of precedence):
- `/var/lib/.config/sftpgo`
- `/etc/sftpgo` (already mounted by this chart)
You can mount a config map or a secret to `/var/lib/.config/sftpgo`.
**Note:** this method will override all configuration set in `values.yaml`.
**Example:**
```yaml
# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: custom-sftpgo-config
data:
sftpgo.yaml: |-
sftpd:
max_auth_retries: 10
```
```yaml
# values.yaml
volumes:
- name: custom-config # config is already taken
configMap:
name: custom-sftpgo-config
volumeMounts:
- name: custom-config # config is already taken
mountPath: /var/lib/sftpgo/.config/sftpgo
```
Alternatively, you can mount the config file to any arbitrary location (except `/etc/sftpgo`) and set the `SFTPGO_CONFIG_FILE` environment variable (using `env` or `envFrom`, see [Values](#values)).
### Custom services
The primary service created by the chart includes every enabled server (including HTTP and telemetry).
This can be a problem when you want to expose specific (but not all) servers to the internet using a `LoadBalancer` type service.
The `services` option in the values file allows you to create custom services enabling specific server ports.
The following example exposes the SFTP server (and **only** the SFTP server) using a `LoadBalancer` service:
```yaml
services:
sftp-public:
annotations:
external-dns.alpha.kubernetes.io/hostname: sftp.mydomain.com.
type: LoadBalancer
ports:
sftp: 22
```
Additional services accept the same options as the `service` option in the values file and
require at least one port.
{{ template "chart.valuesSection" . }}