mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 17:00:30 +00:00
[Charts] Add option to pass in topology pod constraints (#262)
This commit is contained in:
parent
c304996250
commit
5d6b8f4b12
3 changed files with 20 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
apiVersion: v2
|
||||
name: woodpecker-agent
|
||||
description: A Helm chart for Woodpecker a fork of the Drone CI system
|
||||
description: A Helm chart for Woodpecker, a fork of the Drone CI system
|
||||
type: application
|
||||
version: 0.1.0
|
||||
version: 0.1.1
|
||||
appVersion: "v0.13.0-rc.3"
|
||||
keywords:
|
||||
- continuous-delivery
|
||||
|
|
|
@ -18,6 +18,12 @@ spec:
|
|||
labels:
|
||||
{{- include "woodpecker-agent.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- if and (semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion) (.Values.topologySpreadConstraints) }}
|
||||
{{- with .Values.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -56,3 +56,15 @@ nodeSelector: {}
|
|||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
## Using topology spread constraints, you can ensure that there is at least one agent
|
||||
## pod for each topology zone, e.g. one per arch for for multi-architecture clusters
|
||||
## or one for each region for geographically distributed cloud-hosted clusters.
|
||||
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
|
||||
topologySpreadConstraints: []
|
||||
# - maxSkew: 1
|
||||
# topologyKey: "beta.kubernetes.io/arch"
|
||||
# whenUnsatisfiable: "DoNotSchedule"
|
||||
# labelSelector:
|
||||
# matchLabels:
|
||||
# "app.kubernetes.io/name": woodpecker-agent
|
||||
|
|
Loading…
Reference in a new issue