Skip to content

Commit 4676731

Browse files
committed
chore(workflow): add common template
1 parent 3be8fa6 commit 4676731

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{/* Generate common affinity */}}
2+
{{- define "common.affinity" }}
3+
affinity:
4+
podAntiAffinity:
5+
preferredDuringSchedulingIgnoredDuringExecution:
6+
- weight: 100
7+
podAffinityTerm:
8+
labelSelector:
9+
matchExpressions:
10+
- key: {{ .key }}
11+
operator: In
12+
values:
13+
{{- range .values }}
14+
- {{ . | quote }}
15+
{{- end }}
16+
topologyKey: topology.kubernetes.io/zone
17+
- weight: 90
18+
podAffinityTerm:
19+
labelSelector:
20+
matchExpressions:
21+
- key: {{ .key }}
22+
operator: In
23+
values:
24+
{{- range .values }}
25+
- {{ . | quote }}
26+
{{- end }}
27+
topologyKey: kubernetes.io/hostname
28+
{{- end }}

charts/workflow/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
global:
44
# Admin email, used for each component to send email to administrator
55
email: "drycc@drycc.cc"
6+
# Whether to use the template defined by common
7+
common: true
68
# Set the storage backend
79
#
810
# Valid values are:

0 commit comments

Comments
 (0)