Skip to content

Commit

Permalink
Add tolerations and nodeSelector to test-operator-controller-manager
Browse files Browse the repository at this point in the history
In previous PR [1], tolerations and nodeSelector parameters were added
to the test_operator role in order to configure tempest and tobiko pods.
This new PR adds the option to apply those parameters to the
test-operator-controller-manager pod as well.

[1] openstack-k8s-operators#1716
  • Loading branch information
eduolivares committed May 16, 2024
1 parent efda855 commit 9906a13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/test_operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
* `cifmw_test_operator_dry_run`: (Boolean) Whether test-operator should run or not. Default value: `false`
* `cifmw_test_operator_fail_fast`: (Boolean) Whether the test results are evaluated when each test framework execution finishes or when all test frameworks are done. Default value: `false`
* `cifmw_test_operator_controller_ip`: (String) An ip address of the controller node. Default value: `ansible_default_ipv4.address` which defaults to (`""`).
* `cifmw_test_operator_tolerations`: (Dict) `tolerations` value that is applied to all pods spawned by the test-operator. Default value: `{}`
* `cifmw_test_operator_node_selector`: (Dict) `nodeSelector` value that is applied to all pods spawned by the test-operator. Default value: `{}`
* `cifmw_test_operator_tolerations`: (Dict) `tolerations` value that is applied to all pods spawned by the test-operator and to the test-operator-controller-manager pod. Default value: `{}`
* `cifmw_test_operator_node_selector`: (Dict) `nodeSelector` value that is applied to all pods spawned by the test-operator and to the test-operator-controller-manager pod. Default value: `{}`

## Tempest specific parameters
* `cifmw_test_operator_tempest_registry`: (String) The registry where to pull tempest container. Default value: `quay.io`
Expand Down
3 changes: 3 additions & 0 deletions roles/test_operator/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
name: test-operator
source: test-operator-catalog
sourceNamespace: "{{ cifmw_test_operator_namespace }}"
config:
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
when: not cifmw_test_operator_dry_run | bool

- name: Wait until the test-operator csv is present
Expand Down

0 comments on commit 9906a13

Please sign in to comment.