📜 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