File tree Expand file tree Collapse file tree 5 files changed +26
-0
lines changed Expand file tree Collapse file tree 5 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 7070 dashboardUrl :
7171 description : DashboardUrl is the URL of the Horizon dashboard.
7272 type : string
73+ debug :
74+ default : false
75+ description : Activate debug mode. When debug mode is activated any
76+ error encountered inside the test-pod causes that the pod will be
77+ kept alive indefinitely (stuck in "Running" phase) or until the
78+ corresponding HorizonTest CR is deleted. This allows the user to
79+ debug any potential troubles with `oc rsh`.
80+ type : boolean
7381 extraConfigmapsMounts :
7482 description : Extra configmaps for mounting inside the pod
7583 items :
Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ import (
2828type HorizonTestSpec struct {
2929 CommonOptions `json:",inline"`
3030
31+ // +kubebuilder:validation:Optional
32+ // +kubebuilder:default=false
33+ // Activate debug mode. When debug mode is activated any error encountered
34+ // inside the test-pod causes that the pod will be kept alive indefinitely
35+ // (stuck in "Running" phase) or until the corresponding HorizonTest CR is deleted.
36+ // This allows the user to debug any potential troubles with `oc rsh`.
37+ Debug bool `json:"debug"`
38+
3139 // AdminUsername is the username for the OpenStack admin user.
3240 // +kubebuilder:validation:Required
3341 // +operator-sdk:csv:customresourcedefinitions:type=spec
Original file line number Diff line number Diff line change 7070 dashboardUrl :
7171 description : DashboardUrl is the URL of the Horizon dashboard.
7272 type : string
73+ debug :
74+ default : false
75+ description : Activate debug mode. When debug mode is activated any
76+ error encountered inside the test-pod causes that the pod will be
77+ kept alive indefinitely (stuck in "Running" phase) or until the
78+ corresponding HorizonTest CR is deleted. This allows the user to
79+ debug any potential troubles with `oc rsh`.
80+ type : boolean
7381 extraConfigmapsMounts :
7482 description : Extra configmaps for mounting inside the pod
7583 items :
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ metadata:
1010 name : horizontest-sample
1111spec :
1212 containerImage : " "
13+ # debug: false
1314
1415 # OpenStack admin credentials
1516 adminUsername : " admin"
Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ func (r *HorizonTestReconciler) PrepareHorizonTestEnvVars(
352352 envVars ["PASSWORD" ] = env .SetValue ("horizontest" )
353353 envVars ["FLAVOR_NAME" ] = env .SetValue ("m1.tiny" )
354354 envVars ["HORIZON_KEYS_FOLDER" ] = env .SetValue ("/etc/test_operator" )
355+ envVars ["HORIZONTEST_DEBUG_MODE" ] = env .SetValue (r .GetDefaultBool (instance .Spec .Debug ))
355356
356357 return envVars
357358}
You can’t perform that action at this time.
0 commit comments