@@ -52,6 +52,56 @@ AnsibleTest Custom Resource
5252 :language: yaml
5353
5454
55+ .. _git-branch-selection-for-ansibletest :
56+
57+ Git Branch Selection for AnsibleTest
58+ ====================================
59+ AnsibleTest runs Ansible playbooks from a git repository inside a test pod.
60+ By default, the pod clones the repository and uses its default branch. The
61+ git branch selection feature allows you to specify which branch, tag, or ref
62+ should be checked out before the playbook runs.
63+
64+ Functionality
65+ -------------
66+
67+ The feature is controlled by two related fields in the AnsibleTest CR spec:
68+
69+ :code: `ansibleGitRepo ` **(required) **
70+
71+ The URL of the git repository to clone into the test pod. This must be a
72+ valid URI accessible from within the cluster.
73+
74+ :code: `ansibleGitBranch ` **(optional, no default) **
75+
76+ The branch, tag, or git ref to check out after cloning. When omitted or
77+ left empty, the repository's default branch is used.
78+
79+ The operator passes both values to the test pod as environment variables.
80+ The container's entrypoint script handles the clone and checkout.
81+
82+ Basic Usage
83+ -----------
84+
85+ Run playbooks from a specific branch:
86+
87+ .. code-block :: yaml
88+
89+ apiVersion : test.openstack.org/v1beta1
90+ kind : AnsibleTest
91+ metadata :
92+ name : release-validation
93+ namespace : openstack
94+ spec :
95+ ansibleGitRepo : " https://github.com/myorg/openstack-tests"
96+ ansibleGitBranch : " release-2.1"
97+ ansiblePlaybookPath : " playbooks/validate.yaml"
98+
99+ The pod clones the repository, checks out :code: `release-2.1 `, then runs the
100+ playbook.
101+
102+ The :code: `ansibleGitBranch ` field accepts any valid git ref — branch names,
103+ tag names, or commit SHAs all work.
104+
55105.. _parallel-execution :
56106
57107Parallel Execution
@@ -144,6 +194,36 @@ CRs that can use the workflow section:
144194
145195* :ref: `ansibletest-custom-resource `
146196
197+ .. _nodeselector-and-tolerations :
198+
199+ NodeSelector and Tolerations
200+ ============================
201+ The test-operator creates pods to run OpenStack tests. By default, the
202+ Kubernetes scheduler places these pods on any available node based on resource
203+ availability.The toleration grants permission to run on the tainted nod. The
204+ :code: `nodeSelector ` ensures the pod only runs on nodes with the matching
205+ label.
206+
207+ Basic Usage
208+ -----------
209+
210+ .. code-block :: yaml
211+
212+ apiVersion : test.openstack.org/v1beta1
213+ kind : AnsibleTest
214+ metadata :
215+ name : ansible-validate
216+ namespace : openstack
217+ spec :
218+ nodeSelector :
219+ testoperator : " true"
220+ tolerations :
221+ - key : " test"
222+ operator : " Equal"
223+ value : " true"
224+ effect : " NoSchedule"
225+ containerImage : quay.io/podified-antelope-centos9/openstack-ansible-tests:current-podified
226+
147227 ExtraMounts parameter
148228=====================
149229To correctly use the :code: `ExtraMounts ` parameter, follow these steps:
@@ -159,7 +239,7 @@ to be mounted. The name assigned here is later referenced in the
159239mounted in the Pod. Each entry should include the name of a volume
160240from the :code: `volumes ` field and the target mount path.
161241
162- Example of using the :code: `ExtraMounts ` parameter:
242+ Example test of using the :code: `ExtraMounts ` parameter:
163243
164244.. code-block :: yaml
165245
0 commit comments