Skip to content

Commit cef303d

Browse files
Merge pull request #324 from kstrenkova/validate-CR-input
Validate CR parameters in more detail
2 parents 0b0d67a + 9cf36c4 commit cef303d

13 files changed

+269
-127
lines changed

api/bases/test.openstack.org_ansibletests.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ spec:
5555
type: string
5656
ansibleCollections:
5757
default: ""
58-
description: AnsibleCollections - extra ansible collections to instal
59-
in additionn to the ones exist in the requirements.yaml
58+
description: |-
59+
AnsibleCollections - extra ansible collections to install in addition
60+
to the ones existing in the requirements.yaml
6061
type: string
6162
ansibleExtraVars:
6263
default: ""
6364
description: AnsibleExtraVars - string to pass parameters to ansible
64-
using
6565
type: string
6666
ansibleGitRepo:
67-
default: ""
6867
description: AnsibleGitRepo - git repo to clone into container
68+
format: uri
6969
type: string
7070
ansibleInventory:
7171
default: ""
@@ -78,8 +78,10 @@ spec:
7878
type: string
7979
ansibleVarFiles:
8080
default: ""
81-
description: AnsibleVarFiles - interface to create ansible var files
82-
Those get added to the
81+
description: |-
82+
AnsibleVarFiles - interface to create ansible var files. Those get added
83+
to the service config dir in /etc/test_operator/<file> and passed to the
84+
ansible command using -e @/etc/test_operator/<file>
8385
type: string
8486
backoffLimit:
8587
default: 0
@@ -92,6 +94,7 @@ spec:
9294
description: |-
9395
ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
9496
The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
97+
maxLength: 253
9598
type: string
9699
containerImage:
97100
default: ""
@@ -1334,15 +1337,17 @@ spec:
13341337
operator.
13351338
type: string
13361339
ansibleCollections:
1337-
description: AnsibleCollections - extra ansible collections
1338-
to instal in additionn to the ones exist in the requirements.yaml
1340+
description: |-
1341+
AnsibleCollections - extra ansible collections to install in addition
1342+
to the ones existing in the requirements.yaml
13391343
type: string
13401344
ansibleExtraVars:
13411345
description: AnsibleExtraVars - interface to pass parameters
13421346
to ansible using -e
13431347
type: string
13441348
ansibleGitRepo:
13451349
description: AnsibleGitRepo - git repo to clone into container
1350+
format: uri
13461351
type: string
13471352
ansibleInventory:
13481353
description: AnsibleInventory - string that contains the inventory
@@ -1353,8 +1358,9 @@ spec:
13531358
type: string
13541359
ansibleVarFiles:
13551360
description: |-
1356-
AnsibleVarFiles - interface to create ansible var files Those get added to the
1357-
service config dir in /etc/test_operator/<file> and passed to the ansible command using -e @/etc/test_operator/<file>
1361+
AnsibleVarFiles - interface to create ansible var files. Those get added
1362+
to the service config dir in /etc/test_operator/<file> and passed to the
1363+
ansible command using -e @/etc/test_operator/<file>
13581364
type: string
13591365
backoffLimit:
13601366
default: 0
@@ -1366,6 +1372,7 @@ spec:
13661372
description: |-
13671373
ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
13681374
The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
1375+
maxLength: 253
13691376
type: string
13701377
containerImage:
13711378
default: ""
@@ -1485,7 +1492,7 @@ spec:
14851492
description: |-
14861493
Name of a workflow step. The step name will be used for example to create
14871494
a logs directory.
1488-
maxLength: 100
1495+
pattern: ^[a-z0-9-]+$
14891496
type: string
14901497
storageClass:
14911498
description: StorageClass used to create any test-operator related
@@ -1536,6 +1543,7 @@ spec:
15361543
description: |-
15371544
WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
15381545
The key is mounted to ~/test_keypair.key in the ansible pod
1546+
maxLength: 253
15391547
type: string
15401548
required:
15411549
- stepName
@@ -1546,6 +1554,7 @@ spec:
15461554
description: |-
15471555
WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
15481556
The key is mounted to ~/test_keypair.key in the ansible pod
1557+
maxLength: 253
15491558
type: string
15501559
required:
15511560
- ansibleGitRepo

api/bases/test.openstack.org_horizontests.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,19 @@ spec:
5757
default: admin
5858
description: AdminPassword is the password for the OpenStack admin
5959
user.
60+
maxLength: 253
61+
minLength: 1
6062
type: string
6163
adminUsername:
6264
default: admin
6365
description: AdminUsername is the username for the OpenStack admin
6466
user.
67+
maxLength: 253
68+
minLength: 1
6569
type: string
6670
authUrl:
6771
description: AuthUrl is the authentication URL for OpenStack.
72+
format: uri
6873
type: string
6974
backoffLimit:
7075
default: 0
@@ -79,6 +84,7 @@ spec:
7984
type: string
8085
dashboardUrl:
8186
description: DashboardUrl is the URL of the Horizon dashboard.
87+
format: uri
8288
type: string
8389
debug:
8490
default: false
@@ -1194,6 +1200,7 @@ spec:
11941200
imageUrl:
11951201
default: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
11961202
description: ImageUrl is the URL to download the Cirros image.
1203+
format: uri
11971204
type: string
11981205
kubeconfigSecretName:
11991206
description: |-
@@ -1220,6 +1227,7 @@ spec:
12201227
default: horizontest
12211228
description: Password is the password for the user running the Horizon
12221229
tests.
1230+
maxLength: 253
12231231
type: string
12241232
privileged:
12251233
default: false
@@ -1245,6 +1253,7 @@ spec:
12451253
repoUrl:
12461254
default: https://review.opendev.org/openstack/horizon
12471255
description: RepoUrl is the URL of the Horizon repository.
1256+
format: uri
12481257
type: string
12491258
resources:
12501259
default:
@@ -1360,6 +1369,7 @@ spec:
13601369
default: horizontest
13611370
description: User is the username under which the Horizon tests will
13621371
run.
1372+
maxLength: 253
13631373
type: string
13641374
required:
13651375
- adminPassword

0 commit comments

Comments
 (0)