31
31
appsv1StatefulsetClient appsv1.StatefulSetInterface
32
32
)
33
33
34
- //PreparePodAutoscaler contains the preparation steps and chaos injection steps
34
+ // PreparePodAutoscaler contains the preparation steps and chaos injection steps
35
35
func PreparePodAutoscaler (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , resultDetails * types.ResultDetails , eventsDetails * types.EventDetails , chaosDetails * types.ChaosDetails ) error {
36
36
37
37
//Waiting for the ramp time before chaos injection
@@ -117,7 +117,7 @@ func getSliceOfTotalApplicationsTargeted(appList []experimentTypes.ApplicationUn
117
117
return appList [:newAppListLength ]
118
118
}
119
119
120
- //getDeploymentDetails is used to get the name and total number of replicas of the deployment
120
+ // getDeploymentDetails is used to get the name and total number of replicas of the deployment
121
121
func getDeploymentDetails (experimentsDetails * experimentTypes.ExperimentDetails ) ([]experimentTypes.ApplicationUnderTest , error ) {
122
122
123
123
deploymentList , err := appsv1DeploymentClient .List (context .Background (), metav1.ListOptions {LabelSelector : experimentsDetails .AppLabel })
@@ -135,7 +135,7 @@ func getDeploymentDetails(experimentsDetails *experimentTypes.ExperimentDetails)
135
135
return getSliceOfTotalApplicationsTargeted (appsUnderTest , experimentsDetails ), nil
136
136
}
137
137
138
- //getStatefulsetDetails is used to get the name and total number of replicas of the statefulsets
138
+ // getStatefulsetDetails is used to get the name and total number of replicas of the statefulsets
139
139
func getStatefulsetDetails (experimentsDetails * experimentTypes.ExperimentDetails ) ([]experimentTypes.ApplicationUnderTest , error ) {
140
140
141
141
statefulsetList , err := appsv1StatefulsetClient .List (context .Background (), metav1.ListOptions {LabelSelector : experimentsDetails .AppLabel })
@@ -154,7 +154,7 @@ func getStatefulsetDetails(experimentsDetails *experimentTypes.ExperimentDetails
154
154
return getSliceOfTotalApplicationsTargeted (appsUnderTest , experimentsDetails ), nil
155
155
}
156
156
157
- //podAutoscalerChaosInDeployment scales up the replicas of deployment and verify the status
157
+ // podAutoscalerChaosInDeployment scales up the replicas of deployment and verify the status
158
158
func podAutoscalerChaosInDeployment (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , appsUnderTest []experimentTypes.ApplicationUnderTest , resultDetails * types.ResultDetails , eventsDetails * types.EventDetails , chaosDetails * types.ChaosDetails ) error {
159
159
160
160
// Scale Application
@@ -185,7 +185,7 @@ func podAutoscalerChaosInDeployment(experimentsDetails *experimentTypes.Experime
185
185
return deploymentStatusCheck (experimentsDetails , clients , appsUnderTest , resultDetails , eventsDetails , chaosDetails )
186
186
}
187
187
188
- //podAutoscalerChaosInStatefulset scales up the replicas of statefulset and verify the status
188
+ // podAutoscalerChaosInStatefulset scales up the replicas of statefulset and verify the status
189
189
func podAutoscalerChaosInStatefulset (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , appsUnderTest []experimentTypes.ApplicationUnderTest , resultDetails * types.ResultDetails , eventsDetails * types.EventDetails , chaosDetails * types.ChaosDetails ) error {
190
190
191
191
// Scale Application
@@ -305,7 +305,7 @@ func statefulsetStatusCheck(experimentsDetails *experimentTypes.ExperimentDetail
305
305
return nil
306
306
}
307
307
308
- //autoscalerRecoveryInDeployment rollback the replicas to initial values in deployment
308
+ // autoscalerRecoveryInDeployment rollback the replicas to initial values in deployment
309
309
func autoscalerRecoveryInDeployment (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , appsUnderTest []experimentTypes.ApplicationUnderTest , chaosDetails * types.ChaosDetails ) error {
310
310
311
311
// Scale back to initial number of replicas
@@ -351,7 +351,7 @@ func autoscalerRecoveryInDeployment(experimentsDetails *experimentTypes.Experime
351
351
})
352
352
}
353
353
354
- //autoscalerRecoveryInStatefulset rollback the replicas to initial values in deployment
354
+ // autoscalerRecoveryInStatefulset rollback the replicas to initial values in deployment
355
355
func autoscalerRecoveryInStatefulset (experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , appsUnderTest []experimentTypes.ApplicationUnderTest , chaosDetails * types.ChaosDetails ) error {
356
356
357
357
// Scale back to initial number of replicas
@@ -399,7 +399,7 @@ func autoscalerRecoveryInStatefulset(experimentsDetails *experimentTypes.Experim
399
399
400
400
func int32Ptr (i int32 ) * int32 { return & i }
401
401
402
- //abortPodAutoScalerChaos go routine will continuously watch for the abort signal for the entire chaos duration and generate the required events and result
402
+ // abortPodAutoScalerChaos go routine will continuously watch for the abort signal for the entire chaos duration and generate the required events and result
403
403
func abortPodAutoScalerChaos (appsUnderTest []experimentTypes.ApplicationUnderTest , experimentsDetails * experimentTypes.ExperimentDetails , clients clients.ClientSets , resultDetails * types.ResultDetails , eventsDetails * types.EventDetails , chaosDetails * types.ChaosDetails ) {
404
404
405
405
// signChan channel is used to transmit signal notifications.
0 commit comments