sqs-operator v0.1.11: fix ensureService UI port, FILE_LOCK=NO for H2
This commit is contained in:
@@ -667,14 +667,27 @@ func (r *QueueServiceReconciler) ensureService(ctx context.Context, qs *sqsv1alp
|
||||
Selector: map[string]string{
|
||||
"sqs.kube5s.ru/tenant": qs.Spec.TenantID,
|
||||
},
|
||||
Ports: []corev1.ServicePort{
|
||||
{
|
||||
Name: "sqs-http",
|
||||
Port: int32(elasticMQPort),
|
||||
TargetPort: intstr.FromInt(elasticMQPort),
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
Ports: func() []corev1.ServicePort {
|
||||
// Базовый порт ElasticMQ — всегда
|
||||
ports := []corev1.ServicePort{
|
||||
{
|
||||
Name: "sqs-http",
|
||||
Port: int32(elasticMQPort),
|
||||
TargetPort: intstr.FromInt(elasticMQPort),
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
}
|
||||
// Порт UI — только если enableUI=true; при self-healing сервис пересоздаётся с нужными портами
|
||||
if qs.Spec.EnableUI {
|
||||
ports = append(ports, corev1.ServicePort{
|
||||
Name: "ui-http",
|
||||
Port: int32(elasticMQUIPort),
|
||||
TargetPort: intstr.FromInt(elasticMQUIPort),
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
})
|
||||
}
|
||||
return ports
|
||||
}(),
|
||||
},
|
||||
}
|
||||
return r.Create(ctx, svc)
|
||||
|
||||
Reference in New Issue
Block a user