Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sftpgo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ require at least one port.
| initContainers | list | `[]` | Add [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to the pod. |
| nameOverride | string | `""` | A name in place of the chart name for `app:` labels. |
| nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) configuration. |
| pdb.enabled | bool | `false` | Enable Pod Disruption Budget to ensure availability during voluntary disruptions. |
| pdb.maxUnavailable | string | `nil` | Maximum number or percentage of pods that can be unavailable after the eviction. |
| pdb.minAvailable | string | `nil` | Minimum number or percentage of pods that must be available after the eviction. |
| 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":""}` | Create the pvc desired specificiation. |
| podAnnotations | object | `{}` | Annotations to be added to pods. |
| podLabels | object | `{}` | Labels to be added to pods. |
| podMonitor.enabled | bool | `false` | Enable PodMonitor resource for Prometheus Operator to scrape pod metrics. |
| 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. |
| replicaCount | int | `1` | Number of replicas (pods) to launch. |
| 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. |
Expand Down
18 changes: 18 additions & 0 deletions sftpgo/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "sftpgo.fullname" . }}
labels:
{{- include "sftpgo.labels" . | nindent 4 }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "sftpgo.selectorLabels" . | nindent 6 }}
{{- end }}
18 changes: 18 additions & 0 deletions sftpgo/templates/pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "sftpgo.fullname" . }}
labels:
{{- include "sftpgo.labels" . | nindent 4 }}
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
podMetricsEndpoints:
- path: /metrics
port: telemetry
selector:
matchLabels:
{{- include "sftpgo.selectorLabels" . | nindent 6 }}
{{- end }}
12 changes: 12 additions & 0 deletions sftpgo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@ topologySpreadConstraints:
# -- How to deal with a Pod if it doesn't satisfy the spread constraint.
whenUnsatisfiable: DoNotSchedule

pdb:
# -- Enable Pod Disruption Budget to ensure availability during voluntary disruptions.
enabled: false
# -- Minimum number or percentage of pods that must be available after the eviction.
minAvailable:
# -- Maximum number or percentage of pods that can be unavailable after the eviction.
maxUnavailable:

persistence:
# -- Enable persistent storage for the /var/lib/sftpgo directory, saving state of the default sqlite db.
enabled: false
Expand All @@ -364,3 +372,7 @@ persistence:
requests:
storage: 5Gi
storageClassName: ""

podMonitor:
# -- Enable PodMonitor resource for Prometheus Operator to scrape pod metrics.
enabled: false