Skip to content

Commit

Permalink
Merge pull request #105 from sagikazarmark/sftpgo
Browse files Browse the repository at this point in the history
Improve documentation
  • Loading branch information
sagikazarmark authored Jun 29, 2021
2 parents 1b24764 + e8d2065 commit 1f9fae7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions 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.8.0
version: 0.8.1
appVersion: 2.1.0
kubeVersion: ">=1.16.0-0"
description: Fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support.
Expand All @@ -19,8 +19,8 @@ maintainers:
url: https://sagikazarmark.hu
annotations:
artifacthub.io/changes: |
- kind: changed
description: Updated documentation
- kind: added
description: Support for topology spread constraints
artifacthub.io/images: |
- name: sftpgo
image: ghcr.io/drakkan/sftpgo:v2.1.0
Expand Down
11 changes: 5 additions & 6 deletions charts/sftpgo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sftpgo

![version: 0.8.0](https://img.shields.io/badge/version-0.8.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.1.0](https://img.shields.io/badge/app%20version-2.1.0-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.8.1](https://img.shields.io/badge/version-0.8.1-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.1.0](https://img.shields.io/badge/app%20version-2.1.0-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 @@ -142,8 +142,7 @@ require at least one port.
| 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. |
| 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. |
| 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. |
| topologySpreadConstraints | object | `{"enabled":false,"maxSkew":1,"topologyKey":"topology.kubernetes.io/zone","whenUnsatisfiable":"DoNotSchedule"}` | Configure Pod [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) Requires Kubernetes >= v1.16 |
| topologySpreadConstraints.enabled | bool | `false` | Enable Kubernetes [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). Note: Request Kubernetes v1.16+. |
| topologySpreadConstraints.maxSkew | int | `1` | Degree to which Pods may be unevenly distributed |
| topologySpreadConstraints.topologyKey | string | `"topology.kubernetes.io/zone"` | Topology key 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 |
| topologySpreadConstraints.enabled | bool | `false` | Enable pod [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). |
| 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. |
3 changes: 3 additions & 0 deletions charts/sftpgo/ci/topology-constraints-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
topologySpreadConstraints:
enabled: true
topologyKey: kubernetes.io/hostname
8 changes: 3 additions & 5 deletions charts/sftpgo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,12 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- if .Values.topologySpreadConstraints.enabled }}
topologySpreadConstraints:
- labelSelector:
matchLabels:
{{- include "sftpgo.selectorLabels" . | nindent 12 }}
{{- include "sftpgo.selectorLabels" . | nindent 14 }}
maxSkew: {{ .Values.topologySpreadConstraints.maxSkew }}
topologyKey: {{ .Values.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.topologySpreadConstraints.whenUnsatisfiable }}
{{- end }}
{{- end }}
{{- end }}
13 changes: 7 additions & 6 deletions charts/sftpgo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,16 @@ affinity: {}
# 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.
hostNetwork: false

# -- Configure Pod [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/)
# Requires Kubernetes >= v1.16
topologySpreadConstraints:
# -- Enable Kubernetes [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). Note: Request Kubernetes v1.16+.
# -- Enable pod [Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
enabled: false
# -- Degree to which Pods may be unevenly distributed

# -- Degree to which pods may be unevenly distributed.
maxSkew: 1
# -- Topology key

# -- The key of node labels.
# See https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/
topologyKey: topology.kubernetes.io/zone
# -- How to deal with a Pod if it doesn't satisfy the spread constraint

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

0 comments on commit 1f9fae7

Please sign in to comment.