Copilot commented on code in PR #848:
URL: https://github.com/apache/dubbo-go-pixiu/pull/848#discussion_r2638202259
##########
controllers/internal/controller/gateway_controller.go:
##########
@@ -669,8 +671,8 @@ func (r *GatewayReconciler) ensureDataPlane(ctx
context.Context, gateway *gatewa
Containers: []corev1.Container{
{
Name:
"pixiu",
- Image:
"mfordjody/pixiugateway:debug",
- ImagePullPolicy:
"Always",
+ Image:
config.ControllerConfig.Gateway.Image,
+ ImagePullPolicy:
corev1.PullPolicy(config.ControllerConfig.Gateway.ImagePullPolicy),
Review Comment:
The ImagePullPolicy value is directly cast to corev1.PullPolicy without
validation. If an invalid value is provided in the configuration (e.g.,
"Invalid"), this will create a deployment with an invalid pull policy that will
be rejected by Kubernetes. Consider adding validation to ensure only valid
values ("Always", "IfNotPresent", "Never") are accepted, either in the config
package or before the conversion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]