really fix the cluster up race
@@ -93,6 +93,10 @@ func (c *WebConsoleOperatorComponentOptions) Install(dockerClient dockerhelper.I
if err != nil {
return err
}
+ // we can race a controller. It's not a big deal if we're a little late, so retry on conflict. It's easier than a patch.
+ backoff := retry.DefaultBackoff
+ backoff.Steps = 6
+ err = retry.RetryOnConflict(backoff, func() error {
operatorConfig, err := operatorClient.WebconsoleV1alpha1().OpenShiftWebConsoleConfigs().Get("instance", metav1.GetOptions{})
if err != nil {
return err
@@ -107,11 +111,7 @@ func (c *WebConsoleOperatorComponentOptions) Install(dockerClient dockerhelper.I
if err != nil {
return err
}
- // we can race a controller. It's not a big deal if we're a little late, so retry on conflict. It's easier than a patch.
- backoff := retry.DefaultBackoff
- backoff.Steps = 6
- err = retry.RetryOnConflict(backoff, func() error {
- _, err := operatorClient.WebconsoleV1alpha1().OpenShiftWebConsoleConfigs().Update(operatorConfig)
+ _, err = operatorClient.WebconsoleV1alpha1().OpenShiftWebConsoleConfigs().Update(operatorConfig)
return err
})
if err != nil {
