Skip to content

Commit 33e7769

Browse files
committed
Set extra mounts for test-operator
This PR exposes the extraMounts parameter for all test-operator related CRs (Tempest, Tobiko, AnsibleTest, HorizonTest). This parameter can be used to specify additional volume mounts for the test pods spawned by test-operator.
1 parent 9fae0d1 commit 33e7769

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

roles/test_operator/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ cifmw_test_operator_stages:
6565
* `cifmw_test_operator_tempest_network_attachments`: (List) List of network attachment definitions to attach to the tempest pods spawned by test-operator. Default value: `[]`.
6666
* `cifmw_test_operator_tempest_extra_rpms`: (List) . A list of URLs that point to RPMs that should be installed before the execution of tempest. Note that this parameter has no effect when `cifmw_test_operator_tempest_external_plugin` is used. Default value: `[]`
6767
* `cifmw_test_operator_tempest_extra_configmaps_mounts`: (List) A list of configmaps that should be mounted into the tempest test pods. Default value: `[]`
68+
* `cifmw_test_operator_tempest_extra_mounts`: (List) A list of additional volume mounts for the tempest test pods. Each item specifies a volume name, mount path, and other mount properties. Default value: `[]`
6869
* `cifmw_test_operator_tempest_debug`: (Bool) Run Tempest in debug mode, it keeps the operator pod sleeping infinity (it must only set to `true`only for debugging purposes). Default value: `false`
6970
* `cifmw_test_operator_tempest_resources`: (Dict) A dictionary that specifies resources (cpu, memory) for the test pods. When untouched it clears the default values set on the test-operator side. This means that the tempest test pods run with unspecified resource limits. Default value: `{requests: {}, limits: {}}`
7071
* `cifmw_tempest_tempestconf_config`: Deprecated, please use `cifmw_test_operator_tempest_tempestconf_config` instead
@@ -122,6 +123,7 @@ Default value: {}
122123
* `cifmw_test_operator_tobiko_network_attachments`: (List) List of network attachment definitions to attach to the tobiko pods spawned by test-operator. Default value: `[]`.
123124
* `cifmw_test_operator_tobiko_workflow`: (List) Definition of a Tobiko workflow that consists of multiple steps. Each step can contain all values from Spec section of [Tobiko CR](https://openstack-k8s-operators.github.io/test-operator/crds.html#tobiko-custom-resource).
124125
* `cifmw_test_operator_tobiko_resources`: (Dict) A dictionary that specifies resources (cpu, memory) for the test pods. When kept untouched it defaults to the resource limits specified on the test-operator side. Default value: `{}`
126+
* `cifmw_test_operator_tobiko_extra_mounts`: (List) A list of additional volume mounts for the tobiko test pods. Each item specifies a volume name, mount path, and other mount properties. Default value: `[]`
125127
* `cifmw_test_operator_tobiko_config`: (Dict) Definition of Tobiko CRD instance that is passed to the test-operator (see [the test-operator documentation](https://openstack-k8s-operators.github.io/test-operator/crds.html#tobiko-custom-resource)). Default value:
126128
```
127129
apiVersion: test.openstack.org/v1beta1
@@ -168,6 +170,7 @@ Default value: {}
168170
* `cifmw_test_operator_ansibletest_debug`: (Bool) Run ansible playbook with -vvvv. Default value: `false`
169171
* `cifmw_test_operator_ansibletest_workflow`: (List) A parameter that contains a workflow definition. Default value: `[]`
170172
* `cifmw_test_operator_ansibletest_extra_configmaps_mounts`: (List) Extra configmaps for mounting in the pod. Default value: `[]`
173+
* `cifmw_test_operator_ansibletest_extra_mounts`: (List) A list of additional volume mounts for the ansibletest test pods. Each item specifies a volume name, mount path, and other mount properties. Default value: `[]`
171174
* `cifmw_test_operator_ansibletest_resources`: (Dict) A dictionary that specifies resources (cpu, memory) for the test pods. When kept untouched it defaults to the resource limits specified on the test-operator side. Default value: `{}`
172175
* `cifmw_test_operator_ansibletest_config`: Definition of AnsibleTest CRD instance that is passed to the test-operator (see [the test-operator documentation](https://openstack-k8s-operators.github.io/test-operator/crds.html)). Default value:
173176
```
@@ -215,6 +218,7 @@ Default value: {}
215218
* `cifmw_test_operator_horizontest_logs_directory_name`: (String) The name of the directory to store test logs. Default value: `horizon`
216219
* `cifmw_test_operator_horizontest_horizon_test_dir`: (String) The directory path for Horizon tests. Default value: `/var/lib/horizontest`
217220
* `cifmw_test_operator_horizontest_resources`: (Dict) A dictionary that specifies resources (cpu, memory) for the test pods. When kept untouched it defaults to the resource limits specified on the test-operator side. Default value: `{}`
221+
* `cifmw_test_operator_horizontest_extra_mounts`: (List) A list of additional volume mounts for the horizontest test pods. Each item specifies a volume name, mount path, and other mount properties. Default value: `[]`
218222
* `cifmw_test_operator_horizontest_debug`: (Bool) Run HorizonTest in debug mode, it keeps the operator pod sleeping infinitely (it must only set to `true` only for debugging purposes). Default value: `false`
219223
* `cifmw_test_operator_horizontest_extra_flag`: (String) The extra flag to modify pytest command to include/exclude tests. Default value: `not pagination`
220224
* `cifmw_test_operator_horizontest_project_name_xpath`: (String) The xpath to select project name based on dashboard theme. Default value: `//span[@class='rcueicon rcueicon-folder-open']/ancestor::li`

roles/test_operator/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ cifmw_test_operator_tempest_config:
131131
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
132132
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
133133
extraConfigmapsMounts: "{{ stage_vars_dict.cifmw_test_operator_tempest_extra_configmaps_mounts | default(omit) }}"
134+
extraMounts: "{{ stage_vars_dict.cifmw_test_operator_tempest_extra_mounts | default(omit) }}"
134135
resources: "{{ stage_vars_dict.cifmw_test_operator_tempest_resources }}"
135136
tempestRun:
136137
includeList: |
@@ -188,6 +189,7 @@ cifmw_test_operator_tobiko_config:
188189
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
189190
debug: "{{ stage_vars_dict.cifmw_test_operator_tobiko_debug }}"
190191
networkAttachments: "{{ stage_vars_dict.cifmw_test_operator_tobiko_network_attachments }}"
192+
extraMounts: "{{ stage_vars_dict.cifmw_test_operator_tobiko_extra_mounts | default(omit) }}"
191193
resources: "{{ stage_vars_dict.cifmw_test_operator_tobiko_resources }}"
192194
# preventCreate: preventCreate is generated by the test_operator role based on the value of stage_vars_dict.cifmw_test_operator_tobiko_prevent_create
193195
# numProcesses: numProcesses is generated by the test_operator role based on the value of stage_vars_dict.cifmw_test_operator_tobiko_num_processes
@@ -227,6 +229,7 @@ cifmw_test_operator_ansibletest_config:
227229
SELinuxLevel: "{{ cifmw_test_operator_selinux_level }}"
228230
containerImage: "{{ stage_vars_dict.cifmw_test_operator_ansibletest_image }}:{{ stage_vars_dict.cifmw_test_operator_ansibletest_image_tag }}"
229231
extraConfigmapsMounts: "{{ stage_vars_dict.cifmw_test_operator_ansibletest_extra_configmaps_mounts }}"
232+
extraMounts: "{{ stage_vars_dict.cifmw_test_operator_ansibletest_extra_mounts | default(omit) }}"
230233
storageClass: "{{ cifmw_test_operator_storage_class }}"
231234
privileged: "{{ cifmw_test_operator_privileged }}"
232235
computeSSHKeySecretName: "{{ stage_vars_dict.cifmw_test_operator_ansibletest_compute_ssh_key_secret_name }}"
@@ -294,4 +297,5 @@ cifmw_test_operator_horizontest_config:
294297
extraFlag: "{{ stage_vars_dict.cifmw_test_operator_horizontest_extra_flag }}"
295298
projectNameXpath: "{{ stage_vars_dict.cifmw_test_operator_horizontest_project_name_xpath }}"
296299
horizonTestDir: "{{ stage_vars_dict.cifmw_test_operator_horizontest_horizon_test_dir }}"
300+
extraMounts: "{{ stage_vars_dict.cifmw_test_operator_horizontest_extra_mounts | default(omit) }}"
297301
resources: "{{ stage_vars_dict.cifmw_test_operator_horizontest_resources }}"

0 commit comments

Comments
 (0)