From 2cb266c26522e415d80d140f742bfddc4864bbbb Mon Sep 17 00:00:00 2001 From: Katarina Strenkova Date: Thu, 23 Jul 2026 06:51:20 -0400 Subject: [PATCH] Remove unused fields from HorizonTest CR The ProjectName, User, Password fields were never read by the controller. In TCIB it is hardcoded as "horizontest" regardless of what was set in the CR. Normally, I would recommend deprecation for parameters, but since these parameters never worked from the start, I suggest a removal. There is also no need for them to be parameters, as the Horizon team agreed they do not have to be overwritten and can stay hardcoded. --- .../test.openstack.org_horizontests.yaml | 17 ---------------- api/v1beta1/horizontest_types.go | 20 ------------------- .../test.openstack.org_horizontests.yaml | 17 ---------------- config/samples/test_v1beta1_horizontest.yaml | 9 --------- internal/controller/horizontest_controller.go | 3 --- 5 files changed, 66 deletions(-) diff --git a/api/bases/test.openstack.org_horizontests.yaml b/api/bases/test.openstack.org_horizontests.yaml index 2cc24c40..ada1ebe9 100644 --- a/api/bases/test.openstack.org_horizontests.yaml +++ b/api/bases/test.openstack.org_horizontests.yaml @@ -1298,12 +1298,6 @@ spec: default: false description: Parallel type: boolean - password: - default: horizontest - description: Password is the password for the user running the Horizon - tests. - maxLength: 253 - type: string privileged: default: false description: |- @@ -1315,11 +1309,6 @@ spec: needed for certain test-operator functionalities to work properly (e.g.: extraRPMs in Tempest CR, or a certain set of tobiko tests). type: boolean - projectName: - default: horizontest - description: ProjectName is the name of the OpenStack project for - Horizon tests. - type: string projectNameXpath: description: |- ProjectNameXpath is the xpath to select project name @@ -1450,12 +1439,6 @@ spec: type: string type: object type: array - user: - default: horizontest - description: User is the username under which the Horizon tests will - run. - maxLength: 253 - type: string required: - adminPassword - adminUsername diff --git a/api/v1beta1/horizontest_types.go b/api/v1beta1/horizontest_types.go index eca3590b..ff34dab9 100644 --- a/api/v1beta1/horizontest_types.go +++ b/api/v1beta1/horizontest_types.go @@ -107,26 +107,6 @@ type HorizonTestSpec struct { // ImageUrl is the URL to download the Cirros image. ImageUrl string `json:"imageUrl"` - // +kubebuilder:validation:Optional - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +kubebuilder:default:="horizontest" - // ProjectName is the name of the OpenStack project for Horizon tests. - ProjectName string `json:"projectName"` - - // +kubebuilder:validation:Optional - // +kubebuilder:validation:MaxLength=253 - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +kubebuilder:default:="horizontest" - // User is the username under which the Horizon tests will run. - User string `json:"user"` - - // +kubebuilder:validation:Optional - // +kubebuilder:validation:MaxLength=253 - // +operator-sdk:csv:customresourcedefinitions:type=spec - // +kubebuilder:default:="horizontest" - // Password is the password for the user running the Horizon tests. - Password string `json:"password"` - // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec // +kubebuilder:default:="m1.tiny" diff --git a/config/crd/bases/test.openstack.org_horizontests.yaml b/config/crd/bases/test.openstack.org_horizontests.yaml index 2cc24c40..ada1ebe9 100644 --- a/config/crd/bases/test.openstack.org_horizontests.yaml +++ b/config/crd/bases/test.openstack.org_horizontests.yaml @@ -1298,12 +1298,6 @@ spec: default: false description: Parallel type: boolean - password: - default: horizontest - description: Password is the password for the user running the Horizon - tests. - maxLength: 253 - type: string privileged: default: false description: |- @@ -1315,11 +1309,6 @@ spec: needed for certain test-operator functionalities to work properly (e.g.: extraRPMs in Tempest CR, or a certain set of tobiko tests). type: boolean - projectName: - default: horizontest - description: ProjectName is the name of the OpenStack project for - Horizon tests. - type: string projectNameXpath: description: |- ProjectNameXpath is the xpath to select project name @@ -1450,12 +1439,6 @@ spec: type: string type: object type: array - user: - default: horizontest - description: User is the username under which the Horizon tests will - run. - maxLength: 253 - type: string required: - adminPassword - adminUsername diff --git a/config/samples/test_v1beta1_horizontest.yaml b/config/samples/test_v1beta1_horizontest.yaml index 4ca0d7b6..3cad9fda 100644 --- a/config/samples/test_v1beta1_horizontest.yaml +++ b/config/samples/test_v1beta1_horizontest.yaml @@ -32,15 +32,6 @@ spec: # The URL to download the Cirros image (optional) imageUrl: "http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img" - # The name of the OpenStack project for Horizon tests (optional) - projectName: "horizontest" - - # The username under which Horizon tests will run (optional) - user: "horizontest" - - # The password for the user running the Horizon tests (optional) - password: "horizontest" - # The name of the OpenStack flavor to create for Horizon tests (optional) flavorName: "m1.tiny" diff --git a/internal/controller/horizontest_controller.go b/internal/controller/horizontest_controller.go index 8cf48df9..b97c6407 100644 --- a/internal/controller/horizontest_controller.go +++ b/internal/controller/horizontest_controller.go @@ -180,9 +180,6 @@ func (r *HorizonTestReconciler) PrepareHorizonTestEnvVars( "IMAGE_FILE": "/var/lib/horizontest/cirros-0.6.2-x86_64-disk.img", "IMAGE_FILE_NAME": "cirros-0.6.2-x86_64-disk", "IMAGE_URL": "http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img", - "PROJECT_NAME": "horizontest", - "USER_NAME": "horizontest", - "PASSWORD": "horizontest", "FLAVOR_NAME": "m1.tiny", "HORIZON_KEYS_FOLDER": "/etc/test_operator", "EXTRA_FLAG": instance.Spec.ExtraFlag,