-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Wishart
committed
Mar 5, 2018
1 parent
16873e9
commit 29e49d5
Showing
6 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v1 | ||
description: A Swift sample application. | ||
name: ibm-swift-sample | ||
version: 1.0.0 | ||
version: 1.1.0 | ||
icon: https://raw.githubusercontent.com/IBM-Swift/kitura.io/master/assets/appIcon%402x.png | ||
tillerVersion: ">=2.6.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{/* affinity - https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ */}} | ||
|
||
{{- define "nodeaffinity" }} | ||
#https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
{{- include "nodeAffinityRequiredDuringScheduling" . }} | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
{{- include "nodeAffinityPreferredDuringScheduling" . }} | ||
{{- end }} | ||
|
||
{{- define "nodeAffinityRequiredDuringScheduling" }} | ||
#If you specify multiple nodeSelectorTerms associated with nodeAffinity types, | ||
#then the pod can be scheduled onto a node if one of the nodeSelectorTerms is satisfied. | ||
# | ||
#If you specify multiple matchExpressions associated with nodeSelectorTerms, | ||
#then the pod can be scheduled onto a node only if all matchExpressions can be satisfied. | ||
# | ||
#valid operators: In, NotIn, Exists, DoesNotExist, Gt, Lt | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: beta.kubernetes.io/arch | ||
operator: In | ||
values: | ||
{{- range $key, $val := .Values.arch }} | ||
{{- if gt ($val | trunc 1 | int) 0 }} | ||
- {{ $key }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "nodeAffinityPreferredDuringScheduling" }} | ||
{{- range $key, $val := .Values.arch }} | ||
{{- if gt ($val | trunc 1 | int) 0 }} | ||
- weight: {{ $val | trunc 1 | int }} | ||
preference: | ||
matchExpressions: | ||
- key: beta.kubernetes.io/arch | ||
operator: In | ||
values: | ||
- {{ $key }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,6 @@ hpa: | |
metrics: | ||
cpu: | ||
targetAverageUtilization: 100m | ||
arch: | ||
amd64: "3 - Most preferred" | ||
s390x: "2 - No preference" |