Merge "HTK: Update kubernetes_pod_anti_affinity function"
This commit is contained in:
commit
28fb847ab1
|
@ -27,6 +27,8 @@ values: |
|
||||||
default: kubernetes.io/hostname
|
default: kubernetes.io/hostname
|
||||||
type:
|
type:
|
||||||
default: requiredDuringSchedulingIgnoredDuringExecution
|
default: requiredDuringSchedulingIgnoredDuringExecution
|
||||||
|
weight:
|
||||||
|
default: 10
|
||||||
usage: |
|
usage: |
|
||||||
{{ tuple . "appliction_x" "component_y" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" }}
|
{{ tuple . "appliction_x" "component_y" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" }}
|
||||||
return: |
|
return: |
|
||||||
|
@ -74,7 +76,11 @@ podAntiAffinity:
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
{{ $matchExpressions | indent 10 }}
|
{{ $matchExpressions | indent 10 }}
|
||||||
topologyKey: {{ $antiAffinityKey }}
|
topologyKey: {{ $antiAffinityKey }}
|
||||||
|
{{- if $envAll.Values.pod.affinity.anti.weight }}
|
||||||
|
weight: {{ index $envAll.Values.pod.affinity.anti.weight $component | default $envAll.Values.pod.affinity.anti.weight.default }}
|
||||||
|
{{- else }}
|
||||||
weight: 10
|
weight: 10
|
||||||
|
{{- end -}}
|
||||||
{{- else if eq $antiAffinityType "requiredDuringSchedulingIgnoredDuringExecution" }}
|
{{- else if eq $antiAffinityType "requiredDuringSchedulingIgnoredDuringExecution" }}
|
||||||
{{ $antiAffinityType }}:
|
{{ $antiAffinityType }}:
|
||||||
- labelSelector:
|
- labelSelector:
|
||||||
|
|
Loading…
Reference in New Issue