π Description
In ReconcileWorkerSliceConfig, copier.CopyWithOption is used at line 230 to deep-copy externalGatewayControllersConfig into externalGatewayConfig. If the copy fails, the error is logged at line 234 but execution continues. At line 275, workerSliceConfig.Spec.ExternalGatewayConfig = externalGatewayConfig writes the zero-value (empty) struct to the Kubernetes API. Worker clusters then receive an empty external gateway config, silently losing all gateway configuration.
π Reproduction steps
- Read
service/worker_slice_config_service.go:230-235 β error from copier.CopyWithOption is logged but not returned.
- Read line 275 β
workerSliceConfig.Spec.ExternalGatewayConfig = externalGatewayConfig unconditionally writes the result.
- If
copier.CopyWithOption fails at runtime, externalGatewayConfig remains as its zero value and overwrites real config on the worker slice.
π Expected behavior
If copier.CopyWithOption returns an error, ReconcileWorkerSliceConfig should return ctrl.Result{}, err immediately so the bad value is never written to Kubernetes.
π Actual Behavior
The error is logged and execution continues. A zero-value ExternalGatewayConfig is written to the worker slice config resource, silently erasing the real gateway configuration.
π Relevant log output
Version
main branch β run git describe --tags in the repo
π₯οΈ What operating system are you seeing the problem on?
Linux
β
Proposed Solution
Change lines 233β235 from logging-and-continuing to returning the error:
if err != nil {
return ctrl.Result{}, err
}
π Have you spent some time to check if this issue has been raised before?
Code of Conduct
π Description
In
ReconcileWorkerSliceConfig,copier.CopyWithOptionis used at line 230 to deep-copyexternalGatewayControllersConfigintoexternalGatewayConfig. If the copy fails, the error is logged at line 234 but execution continues. At line 275,workerSliceConfig.Spec.ExternalGatewayConfig = externalGatewayConfigwrites the zero-value (empty) struct to the Kubernetes API. Worker clusters then receive an empty external gateway config, silently losing all gateway configuration.π Reproduction steps
service/worker_slice_config_service.go:230-235β error fromcopier.CopyWithOptionis logged but not returned.workerSliceConfig.Spec.ExternalGatewayConfig = externalGatewayConfigunconditionally writes the result.copier.CopyWithOptionfails at runtime,externalGatewayConfigremains as its zero value and overwrites real config on the worker slice.π Expected behavior
If
copier.CopyWithOptionreturns an error,ReconcileWorkerSliceConfigshould returnctrl.Result{}, errimmediately so the bad value is never written to Kubernetes.π Actual Behavior
The error is logged and execution continues. A zero-value
ExternalGatewayConfigis written to the worker slice config resource, silently erasing the real gateway configuration.π Relevant log output
Version
main branch β run
git describe --tagsin the repoπ₯οΈ What operating system are you seeing the problem on?
Linux
β Proposed Solution
Change lines 233β235 from logging-and-continuing to returning the error:
π Have you spent some time to check if this issue has been raised before?
Code of Conduct