forked from kubernetes-sigs/node-feature-discovery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nfd E2E tests for tainting feature
Extend current E2E tests to check tainting feature of nfd implemented in kubernetes-sigs#910 Signed-off-by: Feruzjon Muyassarov <[email protected]>
- Loading branch information
1 parent
c250a8b
commit fb5039a
Showing
5 changed files
with
269 additions
and
7 deletions.
There are no files selected for viewing
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,32 @@ | ||
apiVersion: nfd.k8s-sigs.io/v1alpha1 | ||
kind: NodeFeatureRule | ||
metadata: | ||
name: e2e-test-3 | ||
spec: | ||
rules: | ||
# Positive test expected to set the taints | ||
- name: "e2e-taint-test-1" | ||
taints: | ||
- effect: PreferNoSchedule | ||
key: "nfd.node.kubernetes.io/fake-special-node" | ||
value: "exists" | ||
- effect: NoExecute | ||
key: "nfd.node.kubernetes.io/foo" | ||
value: "true" | ||
matchFeatures: | ||
- feature: "fake.attribute" | ||
matchExpressions: | ||
"attr_1": {op: IsTrue} | ||
"attr_2": {op: IsFalse} | ||
|
||
# Negative test not supposed to set the taints | ||
- name: "e2e-taint-test-2" | ||
taints: | ||
- effect: PreferNoSchedule | ||
key: "nfd.node.kubernetes.io/fake-cpu" | ||
value: "true" | ||
matchFeatures: | ||
- feature: "fake.attribute" | ||
matchExpressions: | ||
"attr_1": {op: IsTrue} | ||
"attr_2": {op: IsTrue} |
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,35 @@ | ||
apiVersion: nfd.k8s-sigs.io/v1alpha1 | ||
kind: NodeFeatureRule | ||
metadata: | ||
name: e2e-test-3 | ||
spec: | ||
rules: | ||
# Positive test expected to set the taints | ||
- name: "e2e-taint-test-1" | ||
taints: | ||
- effect: PreferNoSchedule | ||
key: "nfd.node.kubernetes.io/fake-special-node" | ||
value: "exists" | ||
- effect: NoExecute | ||
key: "nfd.node.kubernetes.io/fake-dedicated-node" | ||
value: "true" | ||
- effect: "NoExecute" | ||
key: "nfd.node.kubernetes.io/performance-optimized-node" | ||
value: "true" | ||
matchFeatures: | ||
- feature: "fake.attribute" | ||
matchExpressions: | ||
"attr_1": {op: IsTrue} | ||
"attr_2": {op: IsFalse} | ||
|
||
# Negative test not supposed to set the taints | ||
- name: "e2e-taint-test-2" | ||
taints: | ||
- effect: PreferNoSchedule | ||
key: "nfd.node.kubernetes.io/fake-special-cpu" | ||
value: "true" | ||
matchFeatures: | ||
- feature: "fake.attribute" | ||
matchExpressions: | ||
"attr_1": {op: IsTrue} | ||
"attr_2": {op: IsTrue} |
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