|
| 1 | +# sftpgo |
| 2 | + |
| 3 | +Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server. |
| 4 | + |
| 5 | +**Homepage:** <https://sftpgo.com> |
| 6 | + |
| 7 | +## TL;DR; |
| 8 | + |
| 9 | +```bash |
| 10 | +helm install --generate-name --wait oci://ghcr.io/sftpgo/helm-charts/sftpgo |
| 11 | +``` |
| 12 | + |
| 13 | +## Configuration |
| 14 | + |
| 15 | +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. |
| 16 | + |
| 17 | +The following options are available to configure SFTPGo when installing it with this chart. |
| 18 | + |
| 19 | +**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. |
| 20 | + |
| 21 | +### values.yaml |
| 22 | + |
| 23 | +Setting the `config` key in the values file is the easiest way to configure SFTPGo: |
| 24 | + |
| 25 | +```yaml |
| 26 | +config: |
| 27 | + sftpd: |
| 28 | + max_auth_tries: 10 |
| 29 | +``` |
| 30 | +
|
| 31 | +### Custom volume mount |
| 32 | +
|
| 33 | +A custom configuration file can be mounted using the `volumes` and `volumeMounts` keys (see [Values](#values)). |
| 34 | + |
| 35 | +By default, SFTPGo looks at the following locations for configuration (in the order of precedence): |
| 36 | + |
| 37 | +- `/var/lib/.config/sftpgo` |
| 38 | +- `/etc/sftpgo` (already mounted by this chart) |
| 39 | + |
| 40 | +You can mount a config map or a secret to `/var/lib/.config/sftpgo`. |
| 41 | + |
| 42 | +**Note:** this method will override all configuration set in `values.yaml`. |
| 43 | + |
| 44 | +**Example:** |
| 45 | + |
| 46 | +```yaml |
| 47 | +# configmap.yaml |
| 48 | +
|
| 49 | +apiVersion: v1 |
| 50 | +kind: ConfigMap |
| 51 | +metadata: |
| 52 | + name: custom-sftpgo-config |
| 53 | +data: |
| 54 | + sftpgo.yaml: |- |
| 55 | + sftpd: |
| 56 | + max_auth_retries: 10 |
| 57 | +``` |
| 58 | + |
| 59 | +```yaml |
| 60 | +# values.yaml |
| 61 | +
|
| 62 | +volumes: |
| 63 | + - name: custom-config # config is already taken |
| 64 | + configMap: |
| 65 | + name: custom-sftpgo-config |
| 66 | +
|
| 67 | +volumeMounts: |
| 68 | + - name: custom-config # config is already taken |
| 69 | + mountPath: /var/lib/sftpgo/.config/sftpgo |
| 70 | +``` |
| 71 | + |
| 72 | +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)). |
| 73 | + |
| 74 | +### Custom services |
| 75 | + |
| 76 | +The primary service created by the chart includes every enabled server (including HTTP and telemetry). |
| 77 | +This can be a problem when you want to expose specific (but not all) servers to the internet using a `LoadBalancer` type service. |
| 78 | + |
| 79 | +The `services` option in the values file allows you to create custom services enabling specific server ports. |
| 80 | + |
| 81 | +The following example exposes the SFTP server (and **only** the SFTP server) using a `LoadBalancer` service: |
| 82 | + |
| 83 | +```yaml |
| 84 | +services: |
| 85 | + sftp-public: |
| 86 | + annotations: |
| 87 | + external-dns.alpha.kubernetes.io/hostname: sftp.mydomain.com. |
| 88 | + type: LoadBalancer |
| 89 | + ports: |
| 90 | + sftp: 22 |
| 91 | +``` |
| 92 | + |
| 93 | +Additional services accept the same options as the `service` option in the values file and |
| 94 | +require at least one port. |
| 95 | + |
| 96 | +## Values |
| 97 | + |
| 98 | +| Key | Type | Default | Description | |
| 99 | +|-----|------|---------|-------------| |
| 100 | +| affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) configuration. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | |
| 101 | +| api.ingress.annotations | object | `{}` | Annotations to be added to the ingress. | |
| 102 | +| api.ingress.className | string | `""` | Ingress [class name](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). | |
| 103 | +| api.ingress.enabled | bool | `false` | Enable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/). | |
| 104 | +| api.ingress.hosts | list | See [values.yaml](values.yaml). | Ingress host configuration. | |
| 105 | +| api.ingress.tls | list | See [values.yaml](values.yaml). | Ingress TLS configuration. | |
| 106 | +| autoscaling | object | Disabled by default. | Autoscaling configuration (see [values.yaml](values.yaml) for details). | |
| 107 | +| config | object | `{}` | Application configuration. See the [official documentation](https://docs.sftpgo.com/latest/config-file/). | |
| 108 | +| deploymentAnnotations | object | `{}` | Annotations to be added to deployment. | |
| 109 | +| deploymentLabels | object | `{}` | Labels to be added to deployment. | |
| 110 | +| deploymentStrategy | object | `{}` | Define the [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) to replace old Pods by new ones during updates. | |
| 111 | +| env | object | `{}` | Additional environment variables passed directly to containers using a simplified key-value syntax. | |
| 112 | +| envFrom | list | `[]` | Additional environment variables mounted from [secrets](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables) or [config maps](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | |
| 113 | +| envVars | list | `[]` | Additional environment variables passed directly to containers. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | |
| 114 | +| ftpd.enabled | bool | `false` | Enable FTP service. | |
| 115 | +| ftpd.port | int | `2021` | Container FTP port. Set to 0 to disable the service. The 'enabled' flag may be removed in the future in favor of this setting. | |
| 116 | +| fullnameOverride | string | `""` | A name to substitute for the full names of resources. | |
| 117 | +| hostNetwork | bool | `false` | Run pods in the host network of nodes. Warning: The use of host network is [discouraged](https://kubernetes.io/docs/concepts/configuration/overview/#services). Make sure to use it only when absolutely necessary. | |
| 118 | +| httpd.enabled | bool | `true` | Enable HTTP service. | |
| 119 | +| httpd.port | int | `8080` | Container HTTP port. Set to 0 to disable the service. The 'enabled' flag may be removed in the future in favor of this setting. | |
| 120 | +| image.pullPolicy | string | `"IfNotPresent"` | [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for updating already existing images on a node. | |
| 121 | +| image.repository | string | `"ghcr.io/drakkan/sftpgo"` | Name of the image repository to pull the container image from. | |
| 122 | +| image.tag | string | `""` | Image tag override for the default value (chart appVersion). | |
| 123 | +| imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when [pulling images](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) (from private registries). | |
| 124 | +| initContainers | list | `[]` | Add [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to the pod. | |
| 125 | +| nameOverride | string | `""` | A name in place of the chart name for `app:` labels. | |
| 126 | +| nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) configuration. | |
| 127 | +| persistence.enabled | bool | `false` | Enable persistent storage for the /var/lib/sftpgo directory, saving state of the default sqlite db. | |
| 128 | +| persistence.pvc | object | `{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"storageClassName":""}` | Create the pvc desired specificiation. | |
| 129 | +| podAnnotations | object | `{}` | Annotations to be added to pods. | |
| 130 | +| podLabels | object | `{}` | Labels to be added to pods. | |
| 131 | +| podSecurityContext | object | `{"fsGroup":1000}` | Pod [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) for details. | |
| 132 | +| replicaCount | int | `1` | Number of replicas (pods) to launch. | |
| 133 | +| resources | object | No requests or limits. | Container resource [requests and limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources) for details. | |
| 134 | +| securityContext | object | `{}` | Container [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) for details. | |
| 135 | +| service.annotations | object | `{}` | Annotations to be added to the service. | |
| 136 | +| service.externalTrafficPolicy | string | `nil` | Route external traffic to node-local or cluster-wide endoints. Useful for [preserving the client source IP](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip). | |
| 137 | +| service.labels | object | `{}` | labels to be added to the service. | |
| 138 | +| service.loadBalancerIP | string | `nil` | Only applies when the service type is LoadBalancer. Load balancer will get created with the IP specified in this field. | |
| 139 | +| service.loadBalancerSourceRanges | list | `[]` | If specified (and supported by the cloud provider), traffic through the load balancer will be restricted to the specified client IPs. Valid values are IP CIDR blocks. | |
| 140 | +| service.ports.ftp.nodePort | int | `nil` | FTP node port (when applicable). | |
| 141 | +| service.ports.ftp.passiveRange.end | int | `50020` | FTP passive range end port. | |
| 142 | +| service.ports.ftp.passiveRange.start | int | `50000` | FTP passive range start port. | |
| 143 | +| service.ports.ftp.port | int | `21` | FTP service port. | |
| 144 | +| service.ports.http.nodePort | int | `nil` | REST API node port (when applicable). | |
| 145 | +| service.ports.http.port | int | `80` | REST API service port. | |
| 146 | +| service.ports.sftp.nodePort | int | `nil` | SFTP node port (when applicable). | |
| 147 | +| service.ports.sftp.port | int | `22` | SFTP service port. | |
| 148 | +| service.ports.webdav.nodePort | int | `nil` | WebDAV node port (when applicable). | |
| 149 | +| service.ports.webdav.port | int | `81` | WebDAV service port. | |
| 150 | +| service.sessionAffinity | string | `nil` | Enable client IP based session affinity. [More info](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) | |
| 151 | +| service.type | string | `"ClusterIP"` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | |
| 152 | +| serviceAccount.annotations | object | `{}` | Annotations to be added to the service account. | |
| 153 | +| serviceAccount.create | bool | `true` | Enable service account creation. | |
| 154 | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | |
| 155 | +| services | object | `{}` | Additional services exposing servers (SFTP, FTP, WebDAV, HTTP) individually. The schema matches the one under the `service` key. Additional services need at least one port. | |
| 156 | +| sftpd.enabled | bool | `true` | Enable SFTP service. | |
| 157 | +| sftpd.port | int | `2022` | Container SFTP port. Set to 0 to disable the service. The 'enabled' flag may be removed in the future in favor of this setting. | |
| 158 | +| tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for node taints. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | |
| 159 | +| topologySpreadConstraints.enabled | bool | `false` | Enable pod [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). | |
| 160 | +| topologySpreadConstraints.maxSkew | int | `1` | Degree to which pods may be unevenly distributed. | |
| 161 | +| topologySpreadConstraints.topologyKey | string | `"topology.kubernetes.io/zone"` | The key of node labels. See https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/ | |
| 162 | +| topologySpreadConstraints.whenUnsatisfiable | string | `"DoNotSchedule"` | How to deal with a Pod if it doesn't satisfy the spread constraint. | |
| 163 | +| ui.ingress.annotations | object | `{}` | Annotations to be added to the ingress. | |
| 164 | +| ui.ingress.className | string | `""` | Ingress [class name](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). | |
| 165 | +| ui.ingress.enabled | bool | `false` | Enable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/). | |
| 166 | +| ui.ingress.hosts | list | See [values.yaml](values.yaml). | Ingress host configuration. | |
| 167 | +| ui.ingress.tls | list | See [values.yaml](values.yaml). | Ingress TLS configuration. | |
| 168 | +| volumeMounts | list | `[]` | Additional [volume mounts](https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | |
| 169 | +| volumes | list | `[]` | Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | |
| 170 | +| webdavd.enabled | bool | `false` | Enable WebDAV service. | |
| 171 | +| webdavd.port | int | `8081` | Container WebDAV port. Set to 0 to disable the service. The 'enabled' flag may be removed in the future in favor of this setting. | |
| 172 | + |
| 173 | +## Attributions |
| 174 | + |
| 175 | +This Helm chart was originally created by [@sagikazarmark](https://github.com/sagikazarmark/). |
0 commit comments