Skip to content

Commit f290639

Browse files
committed
Embed common Structs
Use common structs for common CR options and status
1 parent 458fbd9 commit f290639

16 files changed

+854
-749
lines changed

api/bases/test.openstack.org_ansibletests.yaml

Lines changed: 113 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,15 @@ spec:
8686
type: string
8787
containerImage:
8888
default: ""
89-
description: Container image for AnsibleTest
89+
description: A URL of a container image that should be used by the
90+
test-operator for tests execution.
9091
type: string
9192
debug:
9293
default: false
9394
description: Run ansible playbook with -vvvv
9495
type: boolean
9596
extraConfigmapsMounts:
96-
description: Extra configmaps for mounting in the pod.
97+
description: Extra configmaps for mounting inside the pod
9798
items:
9899
properties:
99100
mountPath:
@@ -115,6 +116,12 @@ spec:
115116
- subPath
116117
type: object
117118
type: array
119+
nodeSelector:
120+
additionalProperties:
121+
type: string
122+
description: This value contains a nodeSelector value that is applied
123+
to test pods spawned by the test operator.
124+
type: object
118125
openStackConfigMap:
119126
default: openstack-config
120127
description: OpenStackConfigMap is the name of the ConfigMap containing
@@ -137,8 +144,50 @@ spec:
137144
type: boolean
138145
storageClass:
139146
default: local-storage
140-
description: StorageClass used to create PVCs that store the logs
147+
description: StorageClass used to create any test-operator related
148+
PVCs.
141149
type: string
150+
tolerations:
151+
description: This value contains a toleration that is applied to pods
152+
spawned by the test pods that are spawned by the test-operator.
153+
items:
154+
description: The pod this Toleration is attached to tolerates any
155+
taint that matches the triple <key,value,effect> using the matching
156+
operator <operator>.
157+
properties:
158+
effect:
159+
description: Effect indicates the taint effect to match. Empty
160+
means match all taint effects. When specified, allowed values
161+
are NoSchedule, PreferNoSchedule and NoExecute.
162+
type: string
163+
key:
164+
description: Key is the taint key that the toleration applies
165+
to. Empty means match all taint keys. If the key is empty,
166+
operator must be Exists; this combination means to match all
167+
values and all keys.
168+
type: string
169+
operator:
170+
description: Operator represents a key's relationship to the
171+
value. Valid operators are Exists and Equal. Defaults to Equal.
172+
Exists is equivalent to wildcard for value, so that a pod
173+
can tolerate all taints of a particular category.
174+
type: string
175+
tolerationSeconds:
176+
description: TolerationSeconds represents the period of time
177+
the toleration (which must be of effect NoExecute, otherwise
178+
this field is ignored) tolerates the taint. By default, it
179+
is not set, which means tolerate the taint forever (do not
180+
evict). Zero and negative values will be treated as 0 (evict
181+
immediately) by the system.
182+
format: int64
183+
type: integer
184+
value:
185+
description: Value is the taint value the toleration matches
186+
to. If the operator is Exists, the value should be empty,
187+
otherwise just a regular string.
188+
type: string
189+
type: object
190+
type: array
142191
workflow:
143192
description: A parameter that contains a workflow definition.
144193
items:
@@ -167,23 +216,26 @@ spec:
167216
and passed to the ansible command using -e @/etc/test_operator/<file>
168217
type: string
169218
backoffLimit:
219+
default: 0
170220
description: BackoffLimit allows to define the maximum number
171221
of retried executions (defaults to 0).
172222
format: int32
173223
type: integer
174224
computeSSHKeySecretName:
175-
description: ComputesSSHKeySecretName is the name of the k8s
225+
description: ComputeSSHKeySecretName is the name of the k8s
176226
secret that contains an ssh key for computes. The key is mounted
177227
to ~/.ssh/id_ecdsa in the ansible pod
178228
type: string
179229
containerImage:
180-
description: Container image for AnsibleTest
230+
default: ""
231+
description: A URL of a container image that should be used
232+
by the test-operator for tests execution.
181233
type: string
182234
debug:
183235
description: Run ansible playbook with -vvvv
184236
type: boolean
185237
extraConfigmapsMounts:
186-
description: Extra configmaps for mounting in the pod
238+
description: Extra configmaps for mounting inside the pod
187239
items:
188240
properties:
189241
mountPath:
@@ -205,11 +257,19 @@ spec:
205257
- subPath
206258
type: object
207259
type: array
260+
nodeSelector:
261+
additionalProperties:
262+
type: string
263+
description: This value contains a nodeSelector value that is
264+
applied to test pods spawned by the test operator.
265+
type: object
208266
openStackConfigMap:
267+
default: openstack-config
209268
description: OpenStackConfigMap is the name of the ConfigMap
210269
containing the clouds.yaml
211270
type: string
212271
openStackConfigSecret:
272+
default: openstack-config-secret
213273
description: OpenStackConfigSecret is the name of the Secret
214274
containing the secure.yaml
215275
type: string
@@ -228,9 +288,53 @@ spec:
228288
maxLength: 100
229289
type: string
230290
storageClass:
231-
description: StorageClass used to create PVCs that store the
232-
logs
291+
default: local-storage
292+
description: StorageClass used to create any test-operator related
293+
PVCs.
233294
type: string
295+
tolerations:
296+
description: This value contains a toleration that is applied
297+
to pods spawned by the test pods that are spawned by the test-operator.
298+
items:
299+
description: The pod this Toleration is attached to tolerates
300+
any taint that matches the triple <key,value,effect> using
301+
the matching operator <operator>.
302+
properties:
303+
effect:
304+
description: Effect indicates the taint effect to match.
305+
Empty means match all taint effects. When specified,
306+
allowed values are NoSchedule, PreferNoSchedule and
307+
NoExecute.
308+
type: string
309+
key:
310+
description: Key is the taint key that the toleration
311+
applies to. Empty means match all taint keys. If the
312+
key is empty, operator must be Exists; this combination
313+
means to match all values and all keys.
314+
type: string
315+
operator:
316+
description: Operator represents a key's relationship
317+
to the value. Valid operators are Exists and Equal.
318+
Defaults to Equal. Exists is equivalent to wildcard
319+
for value, so that a pod can tolerate all taints of
320+
a particular category.
321+
type: string
322+
tolerationSeconds:
323+
description: TolerationSeconds represents the period of
324+
time the toleration (which must be of effect NoExecute,
325+
otherwise this field is ignored) tolerates the taint.
326+
By default, it is not set, which means tolerate the
327+
taint forever (do not evict). Zero and negative values
328+
will be treated as 0 (evict immediately) by the system.
329+
format: int64
330+
type: integer
331+
value:
332+
description: Value is the taint value the toleration matches
333+
to. If the operator is Exists, the value should be empty,
334+
otherwise just a regular string.
335+
type: string
336+
type: object
337+
type: array
234338
workloadSSHKeySecretName:
235339
description: WorkloadSSHKeySecretName is the name of the k8s
236340
secret that contains an ssh key for the ansible workload.
@@ -251,7 +355,7 @@ spec:
251355
- ansiblePlaybookPath
252356
type: object
253357
status:
254-
description: AnsibleTestStatus defines the observed state of AnsibleTest
358+
description: CommonTestStatus defines the observed state of the controller
255359
properties:
256360
conditions:
257361
description: Conditions

api/bases/test.openstack.org_horizontests.yaml

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,35 @@ spec:
6565
type: integer
6666
containerImage:
6767
default: ""
68-
description: Container image for horizontest
68+
description: A URL of a container image that should be used by the
69+
test-operator for tests execution.
6970
type: string
7071
dashboardUrl:
7172
description: DashboardUrl is the URL of the Horizon dashboard.
7273
type: string
74+
extraConfigmapsMounts:
75+
description: Extra configmaps for mounting inside the pod
76+
items:
77+
properties:
78+
mountPath:
79+
description: Path within the container at which the volume should
80+
be mounted.
81+
type: string
82+
name:
83+
description: The name of an existing config map for mounting.
84+
maxLength: 253
85+
type: string
86+
subPath:
87+
default: ""
88+
description: Config map subpath for mounting, defaults to configmap
89+
root.
90+
type: string
91+
required:
92+
- mountPath
93+
- name
94+
- subPath
95+
type: object
96+
type: array
7397
flavorName:
7498
default: m1.tiny
7599
description: FlavorName is the name of the OpenStack flavor to create
@@ -97,6 +121,12 @@ spec:
97121
description: LogsDirectoryName is the name of the directory to store
98122
test logs.
99123
type: string
124+
nodeSelector:
125+
additionalProperties:
126+
type: string
127+
description: This value contains a nodeSelector value that is applied
128+
to test pods spawned by the test operator.
129+
type: object
100130
parallel:
101131
default: false
102132
description: Parallel
@@ -127,8 +157,50 @@ spec:
127157
type: string
128158
storageClass:
129159
default: local-storage
130-
description: StorageClass used to create PVCs that store the logs
160+
description: StorageClass used to create any test-operator related
161+
PVCs.
131162
type: string
163+
tolerations:
164+
description: This value contains a toleration that is applied to pods
165+
spawned by the test pods that are spawned by the test-operator.
166+
items:
167+
description: The pod this Toleration is attached to tolerates any
168+
taint that matches the triple <key,value,effect> using the matching
169+
operator <operator>.
170+
properties:
171+
effect:
172+
description: Effect indicates the taint effect to match. Empty
173+
means match all taint effects. When specified, allowed values
174+
are NoSchedule, PreferNoSchedule and NoExecute.
175+
type: string
176+
key:
177+
description: Key is the taint key that the toleration applies
178+
to. Empty means match all taint keys. If the key is empty,
179+
operator must be Exists; this combination means to match all
180+
values and all keys.
181+
type: string
182+
operator:
183+
description: Operator represents a key's relationship to the
184+
value. Valid operators are Exists and Equal. Defaults to Equal.
185+
Exists is equivalent to wildcard for value, so that a pod
186+
can tolerate all taints of a particular category.
187+
type: string
188+
tolerationSeconds:
189+
description: TolerationSeconds represents the period of time
190+
the toleration (which must be of effect NoExecute, otherwise
191+
this field is ignored) tolerates the taint. By default, it
192+
is not set, which means tolerate the taint forever (do not
193+
evict). Zero and negative values will be treated as 0 (evict
194+
immediately) by the system.
195+
format: int64
196+
type: integer
197+
value:
198+
description: Value is the taint value the toleration matches
199+
to. If the operator is Exists, the value should be empty,
200+
otherwise just a regular string.
201+
type: string
202+
type: object
203+
type: array
132204
user:
133205
default: horizontest
134206
description: User is the username under which the Horizon tests will
@@ -141,10 +213,9 @@ spec:
141213
- dashboardUrl
142214
- horizonRepoBranch
143215
- repoUrl
144-
- storageClass
145216
type: object
146217
status:
147-
description: HorizonTestStatus defines the observed state of HorizonTest
218+
description: CommonTestStatus defines the observed state of the controller
148219
properties:
149220
conditions:
150221
description: Conditions

0 commit comments

Comments
 (0)