diff --git a/api/bases/test.openstack.org_horizontests.yaml b/api/bases/test.openstack.org_horizontests.yaml index 2cc24c40..2c7a12c6 100644 --- a/api/bases/test.openstack.org_horizontests.yaml +++ b/api/bases/test.openstack.org_horizontests.yaml @@ -54,18 +54,22 @@ spec: operator. type: string adminPassword: - default: admin - description: AdminPassword is the password for the OpenStack admin - user. + default: "" + description: |- + WARNING: This parameter will be deprecated! + Please set the password in the OpenStackConfigSecret (secure.yaml) instead. + When this parameter is empty the value is read from the secure.yaml. + AdminPassword is the password for the OpenStack admin user. maxLength: 253 - minLength: 1 type: string adminUsername: - default: admin - description: AdminUsername is the username for the OpenStack admin - user. + default: "" + description: |- + WARNING: This parameter will be deprecated! + Please set the username in the OpenStackConfigMap (clouds.yaml) instead. + When this parameter is empty the value is read from the clouds.yaml. + AdminUsername is the username for the OpenStack admin user. maxLength: 253 - minLength: 1 type: string authUrl: description: AuthUrl is the authentication URL for OpenStack. @@ -1457,8 +1461,6 @@ spec: maxLength: 253 type: string required: - - adminPassword - - adminUsername - authUrl - dashboardUrl - horizonRepoBranch diff --git a/api/v1beta1/horizontest_types.go b/api/v1beta1/horizontest_types.go index eca3590b..e6746dfa 100644 --- a/api/v1beta1/horizontest_types.go +++ b/api/v1beta1/horizontest_types.go @@ -59,19 +59,23 @@ type HorizonTestSpec struct { // on the u/s or d/s theme ProjectTextXpath string `json:"projectTextXpath"` - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Optional // +kubebuilder:validation:MaxLength=253 // +operator-sdk:csv:customresourcedefinitions:type=spec - // +kubebuilder:default:="admin" + // +kubebuilder:default:="" + // WARNING: This parameter will be deprecated! + // Please set the username in the OpenStackConfigMap (clouds.yaml) instead. + // When this parameter is empty the value is read from the clouds.yaml. // AdminUsername is the username for the OpenStack admin user. AdminUsername string `json:"adminUsername"` - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Optional // +kubebuilder:validation:MaxLength=253 // +operator-sdk:csv:customresourcedefinitions:type=spec - // +kubebuilder:default:="admin" + // +kubebuilder:default:="" + // WARNING: This parameter will be deprecated! + // Please set the password in the OpenStackConfigSecret (secure.yaml) instead. + // When this parameter is empty the value is read from the secure.yaml. // AdminPassword is the password for the OpenStack admin user. AdminPassword string `json:"adminPassword"` diff --git a/config/crd/bases/test.openstack.org_horizontests.yaml b/config/crd/bases/test.openstack.org_horizontests.yaml index 2cc24c40..2c7a12c6 100644 --- a/config/crd/bases/test.openstack.org_horizontests.yaml +++ b/config/crd/bases/test.openstack.org_horizontests.yaml @@ -54,18 +54,22 @@ spec: operator. type: string adminPassword: - default: admin - description: AdminPassword is the password for the OpenStack admin - user. + default: "" + description: |- + WARNING: This parameter will be deprecated! + Please set the password in the OpenStackConfigSecret (secure.yaml) instead. + When this parameter is empty the value is read from the secure.yaml. + AdminPassword is the password for the OpenStack admin user. maxLength: 253 - minLength: 1 type: string adminUsername: - default: admin - description: AdminUsername is the username for the OpenStack admin - user. + default: "" + description: |- + WARNING: This parameter will be deprecated! + Please set the username in the OpenStackConfigMap (clouds.yaml) instead. + When this parameter is empty the value is read from the clouds.yaml. + AdminUsername is the username for the OpenStack admin user. maxLength: 253 - minLength: 1 type: string authUrl: description: AuthUrl is the authentication URL for OpenStack. @@ -1457,8 +1461,6 @@ spec: maxLength: 253 type: string required: - - adminPassword - - adminUsername - authUrl - dashboardUrl - horizonRepoBranch diff --git a/config/samples/test_v1beta1_horizontest.yaml b/config/samples/test_v1beta1_horizontest.yaml index 4ca0d7b6..1f0f0550 100644 --- a/config/samples/test_v1beta1_horizontest.yaml +++ b/config/samples/test_v1beta1_horizontest.yaml @@ -13,10 +13,6 @@ spec: # debug: false storageClass: "local-storage" - # OpenStack admin credentials - adminUsername: "admin" - adminPassword: "12345678" - # The URL of the Horizon dashboard dashboardUrl: "https://horizon-openstack.apps.ocp.openstack.lab/"