Skip to content

Commit 54234be

Browse files
committed
modifying sftpgo helm chart
Signed-off-by: Sanskar Bhushan <sanskar@obmondo.com>
1 parent 93925b7 commit 54234be

21 files changed

Lines changed: 1261 additions & 18 deletions

argocd-helm-charts/puppetserver/values.yaml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ puppetserver:
55
PUPPET_REPORTS: puppetdb,prometheus
66
PUPPETSERVER_ENVIRONMENT_TIMEOUT: 0
77
PUPPETSERVER_ENC_PATH: /etc/puppetlabs/code/environments/master/puppet_enc.rb
8-
puppetdb:
9-
persistence:
10-
size: 1Gi
11-
extraEnv:
12-
PUPPETDB_JAVA_ARGS: "-Xms512m -Xmx2500m -XX:+HeapDumpOnOutOfMemoryError"
8+
postgresql:
9+
auth:
10+
existingSecret: puppetserver-pgsql-app
11+
secretKeys:
12+
usernameKey: username
13+
userPasswordKey: password
1314

1415
puppetserver:
1516
name: puppetserver
@@ -20,6 +21,8 @@ puppetserver:
2021
extraEnv:
2122
PUPPETSERVER_JAVA_ARGS: "-Xms512m -Xmx2500m -XX:+HeapDumpOnOutOfMemoryError"
2223
PUPPETSERVER_MAX_ACTIVE_INSTANCES: 4
24+
PUPPETDB_JAVA_ARGS: "-Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError"
25+
PUPPETSERVER_MAX_REQUESTS_PER_INSTANCE: 10000
2326
resources:
2427
requests:
2528
memory: 3096Mi
@@ -28,10 +31,6 @@ puppetserver:
2831
memory: 3096Mi
2932
ingress:
3033
enabled: false
31-
extraEnv:
32-
PUPPETDB_JAVA_ARGS: "-Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError"
33-
PUPPETSERVER_MAX_ACTIVE_INSTANCES: 3
34-
PUPPETSERVER_MAX_REQUESTS_PER_INSTANCE: 10000
3534
customentrypoints:
3635
enabled: true
3736
configmaps:
@@ -89,6 +88,8 @@ puppetserver:
8988
name: puppetdb
9089
image: ghcr.io/voxpupuli/container-puppetdb
9190
tag: 7.18.0-v1.5.0
91+
persistence:
92+
size: 1Gi
9293
resources:
9394
requests:
9495
memory: 1024Mi
@@ -97,7 +98,7 @@ puppetserver:
9798
memory: 1024Mi
9899
extraEnv:
99100
PUPPETDB_POSTGRES_HOSTNAME: puppetserver-pgsql-rw
100-
PUPPETDB_JAVA_ARGS: "-Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError"
101+
PUPPETDB_JAVA_ARGS: "-Xms512m -Xmx2500m -XX:+HeapDumpOnOutOfMemoryError"
101102

102103
puppetboard:
103104
enabled: true
@@ -115,14 +116,6 @@ puppetserver:
115116
jmx:
116117
enabled: false
117118

118-
global:
119-
postgresql:
120-
auth:
121-
existingSecret: puppetserver-pgsql-app
122-
secretKeys:
123-
usernameKey: username
124-
userPasswordKey: password
125-
126119
postgresql:
127120
instance: 1
128121
size: 2Gi
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: sftpgo
3+
repository: oci://ghcr.io/sftpgo/helm-charts
4+
version: 0.40.0
5+
digest: sha256:f6f178508ebb8a816f5632674a4e87b297831c22ac83a03eef096c892326900b
6+
generated: "2025-08-19T11:58:30.624391294+05:30"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v2
2+
name: sftpgo
3+
version: 1.0.0
4+
dependencies:
5+
- name: sftpgo
6+
version: 0.40.0
7+
repository: oci://ghcr.io/sftpgo/helm-charts
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
24+
25+
README.md.gotmpl
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
annotations:
2+
artifacthub.io/changes: ""
3+
artifacthub.io/images: |
4+
- name: sftpgo
5+
image: ghcr.io/drakkan/sftpgo:v2.6.6
6+
- name: sftpgo-alpine
7+
image: ghcr.io/drakkan/sftpgo:v2.6.6-alpine
8+
- name: sftpgo-distroless-slim
9+
image: ghcr.io/drakkan/sftpgo:v2.6.6-distroless-slim
10+
apiVersion: v2
11+
appVersion: 2.6.6
12+
description: Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV
13+
server.
14+
home: https://sftpgo.com
15+
icon: https://cdn.statically.io/gh/drakkan/sftpgo/v2.6.6/static/img/logo.png
16+
keywords:
17+
- sftp
18+
- ftp
19+
- webdav
20+
kubeVersion: '>=1.23.0-0'
21+
maintainers:
22+
- email: mark@sagikazarmark.com
23+
name: sagikazarmark
24+
url: https://sagikazarmark.com
25+
- email: nicola.murino@gmail.com
26+
name: Nicola Murino
27+
url: https://sftpgo.com
28+
name: sftpgo
29+
sources:
30+
- https://github.com/drakkan/sftpgo
31+
- https://github.com/sftpgo/helm-chart
32+
- https://github.com/sagikazarmark/helm-charts/tree/06ebf671519118f1ddabf1ba7dd7f4e2f85ea816/charts/sftpgo
33+
type: application
34+
version: 0.40.0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Márk Sági-Kazár <mark.sagikazar@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is furnished
10+
to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
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/).
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1. Get the application URL by running these commands:
2+
{{- if contains "NodePort" .Values.service.type }}
3+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "sftpgo.fullname" . }})
4+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
5+
echo http://$NODE_IP:$NODE_PORT
6+
{{- else if contains "LoadBalancer" .Values.service.type }}
7+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
8+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "sftpgo.fullname" . }}'
9+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "sftpgo.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
10+
echo http://$SERVICE_IP:{{ .Values.service.ports.http }}
11+
{{- else if contains "ClusterIP" .Values.service.type }}
12+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "sftpgo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
13+
export HTTP_CONTAINER_PORT=8080
14+
export SFTP_CONTAINER_PORT=2022
15+
echo "Visit http://127.0.0.1:8080/web/admin to create an admin account if you installed SFTPGo for the first time. Use localhost:2022 for SFTP."
16+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$HTTP_CONTAINER_PORT 2022:$SFTP_CONTAINER_PORT
17+
{{- end }}

0 commit comments

Comments
 (0)