Skip to content

Commit

Permalink
Merge pull request #217 from mccrackend/feature/add-pv-support
Browse files Browse the repository at this point in the history
chart/sftpgo: Feature/add pv support for sqlite default db
  • Loading branch information
sagikazarmark authored Aug 26, 2024
2 parents 574b955 + e006153 commit 918ec8e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/sftpgo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
type: application
name: sftpgo
version: 0.19.0
version: 0.20.0
appVersion: 2.5.4
kubeVersion: ">=1.16.0-0"
description: Fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support.
Expand Down
6 changes: 4 additions & 2 deletions charts/sftpgo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sftpgo

![version: 0.19.0](https://img.shields.io/badge/version-0.19.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.5.4](https://img.shields.io/badge/app%20version-2.5.4-informational?style=flat-square) ![kube version: >=1.16.0-0](https://img.shields.io/badge/kube%20version->=1.16.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-sftpgo-informational?style=flat-square)](https://artifacthub.io/packages/helm/sagikazarmark/sftpgo)
![version: 0.20.0](https://img.shields.io/badge/version-0.20.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.5.4](https://img.shields.io/badge/app%20version-2.5.4-informational?style=flat-square) ![kube version: >=1.16.0-0](https://img.shields.io/badge/kube%20version->=1.16.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-sftpgo-informational?style=flat-square)](https://artifacthub.io/packages/helm/sagikazarmark/sftpgo)

Fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support.

Expand Down Expand Up @@ -122,7 +122,7 @@ require at least one port.
| serviceAccount.annotations | object | `{}` | Annotations to be added to the service account. |
| 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. |
| podAnnotations | object | `{}` | Annotations to be added to pods. |
| podSecurityContext | object | `{}` | 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. |
| 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. |
| 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. |
| initContainers | list | `[]` | Add [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to the pod. |
| service.annotations | object | `{}` | Annotations to be added to the service. |
Expand Down Expand Up @@ -160,3 +160,5 @@ require at least one port.
| topologySpreadConstraints.maxSkew | int | `1` | Degree to which pods may be unevenly distributed. |
| topologySpreadConstraints.topologyKey | string | `"topology.kubernetes.io/zone"` | The key of node labels. See https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/ |
| topologySpreadConstraints.whenUnsatisfiable | string | `"DoNotSchedule"` | How to deal with a Pod if it doesn't satisfy the spread constraint. |
| persistence.enabled | bool | `false` | Enable persistent storage for the /var/lib/sftpgo directory, saving state of the default sqlite db. |
| persistence.pvc | object | `{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"storageClassName":"premium-rwo"}` | Create the pvc desired specificiation. |
9 changes: 9 additions & 0 deletions charts/sftpgo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,22 @@ spec:
mountPath: /etc/sftpgo/sftpgo.json
subPath: sftpgo.json
readOnly: true
{{- if .Values.persistence.enabled }}
- mountPath: /var/lib/sftpgo
name: sftpgo-volume
{{- end }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "sftpgo.fullname" . }}
{{- if .Values.persistence.enabled }}
- name: sftpgo-volume
persistentVolumeClaim:
claimName: {{ include "sftpgo.fullname" . }}-pvc
{{- end }}
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
12 changes: 12 additions & 0 deletions charts/sftpgo/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
finalizers:
- kubernetes.io/pvc-protection
name: {{ include "sftpgo.fullname" . }}
labels:
{{- include "sftpgo.labels" . | nindent 4 }}
spec:
{{- toYaml .Values.persistence.pvc | nindent 2 }}
{{- end }}
18 changes: 15 additions & 3 deletions charts/sftpgo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ podAnnotations: {}

# -- 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.
podSecurityContext: {}
# fsGroup: 2000
podSecurityContext:
fsGroup: 1000

# -- 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.
Expand All @@ -107,7 +107,6 @@ securityContext: {}
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

# -- Add [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to the pod.
initContainers: []
Expand Down Expand Up @@ -289,3 +288,16 @@ topologySpreadConstraints:

# -- How to deal with a Pod if it doesn't satisfy the spread constraint.
whenUnsatisfiable: DoNotSchedule

persistence:
# -- Enable persistent storage for the /var/lib/sftpgo directory, saving state of the default sqlite db.
enabled: false

# -- Create the pvc desired specificiation.
pvc:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: premium-rwo

0 comments on commit 918ec8e

Please sign in to comment.