Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a disruptive taint to list of default tolerations #878

Merged
merged 1 commit into from
Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/sonobuoy/app/testdata/pluginDef-default-podspec.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ podSpec:
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- key: kubernetes.io/e2e-evict-taint-key
operator: Exists
sonobuoy-config:
driver: ""
plugin-name: "n"
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/default-plugins-via-nil-selection.golden
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
5 changes: 5 additions & 0 deletions pkg/client/testdata/default-pod-spec.golden
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ data:
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- key: kubernetes.io/e2e-evict-taint-key
operator: Exists
sonobuoy-config:
driver: Job
plugin-name: e2e
Expand Down Expand Up @@ -134,6 +136,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/default.golden
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/e2e-default.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/envoverrides.golden
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/imagePullSecrets.golden
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ spec:
- name: foo
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/manual-custom-plugin-plus-e2e.golden
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/manual-custom-plugin-plus-systemd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/manual-custom-plugin.golden
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/manual-e2e.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/no-plugins-via-selection.golden
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/plugins-and-pluginSelection.golden
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/ssh.golden
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/systemd-logs-default.golden
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
3 changes: 3 additions & 0 deletions pkg/client/testdata/use-existing-pod-spec.golden
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
name: output-volume
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down
4 changes: 4 additions & 0 deletions pkg/plugin/driver/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ func defaultJobPodSpec() v1.PodSpec {
Key: "CriticalAddonsOnly",
Operator: v1.TolerationOpExists,
},
{
Key: "kubernetes.io/e2e-evict-taint-key",
Operator: v1.TolerationOpExists,
},
},
Volumes: []v1.Volume{},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/driver/job/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestCreatePodDefinitionUsesDefaultPodSpec(t *testing.T) {
}

// Check something specific to the job default pod spec
expectedNumTolerations := 2
expectedNumTolerations := 3
actualNumTolerations := len(pod.Spec.Tolerations)
if actualNumTolerations != expectedNumTolerations {
t.Errorf("expected pod spec to %v tolerations, got %v", expectedNumTolerations, actualNumTolerations)
Expand Down
3 changes: 3 additions & 0 deletions pkg/templates/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ spec:
{{- end }}
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- key: "kubernetes.io/e2e-evict-taint-key"
operator: "Exists"
volumes:
- configMap:
name: sonobuoy-config-cm
Expand Down