Skip to content

Commit

Permalink
[test-operator] Expose nodeSelector and tolerations parameters
Browse files Browse the repository at this point in the history
This patch exposes nodeSelector and tolerations parameters in the
test-operator role. These two parameters were introduced to
test-operator in the linked PR.

Depends-On: openstack-k8s-operators/test-operator#95
  • Loading branch information
lpiwowar committed May 16, 2024
1 parent b14d023 commit a48e92d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/test_operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +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: `{}`

## Tempest specific parameters
* `cifmw_test_operator_tempest_registry`: (String) The registry where to pull tempest container. Default value: `quay.io`
Expand All @@ -42,6 +44,8 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
namespace: "{{ cifmw_test_operator_namespace }}"
spec:
containerImage: "{{ cifmw_test_operator_tempest_image }}:{{ cifmw_test_operator_tempest_image_tag }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
tempestRun:
includeList: |
{{ cifmw_test_operator_tempest_include_list | default('') }}
Expand Down Expand Up @@ -81,6 +85,8 @@ Execute tests via the [test-operator](https://openstack-k8s-operators.github.io/
testenv: "{{ cifmw_test_operator_tobiko_testenv }}"
version: "{{ cifmw_test_operator_tobiko_version }}"
pytestAddopts: "{{ cifmw_test_operator_tobiko_pytest_addopts if cifmw_test_operator_tobiko_pytest_addopts is not none else omit }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
# preventCreate: preventCreate is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_prevent_create
# numProcesses: numProcesses is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_num_processes
# privateKey: privateKey is automatically generated by the test_operator role
Expand Down
4 changes: 4 additions & 0 deletions roles/test_operator/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ cifmw_test_operator_tempest_config:
externalPlugin: "{{ cifmw_test_operator_tempest_external_plugin | default([]) }}"
neutronExtraImage: "{{ cifmw_test_operator_tempest_ntp_extra_image | default('') }}"
tempestconfRun: "{{ cifmw_tempest_tempestconf_config | default(omit) }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
workflow: "{{ cifmw_test_operator_tempest_workflow }}"

# Section 3: tobiko parameters - used when run_test_fw is 'tobiko'
Expand Down Expand Up @@ -94,6 +96,8 @@ cifmw_test_operator_tobiko_config:
testenv: "{{ cifmw_test_operator_tobiko_testenv }}"
version: "{{ cifmw_test_operator_tobiko_version }}"
pytestAddopts: "{{ cifmw_test_operator_tobiko_pytest_addopts if cifmw_test_operator_tobiko_pytest_addopts is not none else omit }}"
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
# preventCreate: preventCreate is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_prevent_create
# numProcesses: numProcesses is generated by the test_operator role based on the value of cifmw_test_operator_tobiko_num_processes
# privateKey: privateKey is automatically by the test_operator role
Expand Down

0 comments on commit a48e92d

Please sign in to comment.