Skip to content

Commit

Permalink
Merge pull request #1058 from YangLu1031/master
Browse files Browse the repository at this point in the history
Using nodeSelector & Tolerations to schedule windows test pods
  • Loading branch information
k8s-ci-robot authored Feb 18, 2020
2 parents 0d0e52f + fe9496b commit dbf97e7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions clusterloader2/testing/node-throughput/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{$CONTAINER_IMAGE := DefaultParam .CONTAINER_IMAGE "k8s.gcr.io/pause:3.1"}}
{{$POD_STARTUP_LATENCY_THRESHOLD := DefaultParam .POD_STARTUP_LATENCY_THRESHOLD "5s"}}
{{$OPERATION_TIMEOUT := DefaultParam .OPERATION_TIMEOUT "15m"}}
{{$WINDOWS_NODE_TEST := DefaultParam .WINDOWS_NODE_TEST false}}

name: node-throughput
automanagedNamespaces: {{$POD_COUNT}}
Expand Down Expand Up @@ -48,6 +49,7 @@ steps:
Replicas: 1
Group: latency
Image: {{$CONTAINER_IMAGE}}
WindowsNodeTest: {{$WINDOWS_NODE_TEST}}
- measurements:
- Identifier: WaitForRunningLatencyRCs
Method: WaitForControlledPodsRunning
Expand Down
9 changes: 9 additions & 0 deletions clusterloader2/testing/node-throughput/rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
spec:
# Do not automount default service account, to eliminate its impact.
automountServiceAccountToken: false
{{if .WindowsNodeTest}}
nodeSelector:
kubernetes.io/os: windows
{{end}}
containers:
- image: {{.Image}}
imagePullPolicy: IfNotPresent
Expand All @@ -24,6 +28,11 @@ spec:
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
{{if .WindowsNodeTest}}
- key: "node.kubernetes.io/os"
operator: "Exists"
effect: "NoSchedule"
{{end}}
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
Expand Down
3 changes: 2 additions & 1 deletion clusterloader2/testing/node-throughput/windows_override.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
WINDOWS_NODE_TEST: true
POD_COUNT: 80
POD_THROUGHPUT: 0.03
CONTAINER_IMAGE: gcr.io/gke-release/pause-win:1.0.0
CONTAINER_IMAGE: gcr.io/gke-release/pause-win:1.1.0
OPERATION_TIMEOUT: 90m
POD_STARTUP_LATENCY_THRESHOLD: 60m

0 comments on commit dbf97e7

Please sign in to comment.