fixed bug where controller did not look at protocol
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m54s

This commit is contained in:
2025-05-26 16:47:26 +03:00
parent 09e9b5dabd
commit e075ff13fa
2 changed files with 2 additions and 2 deletions

View File

@@ -599,7 +599,7 @@ func (r *ServerManagerReconciler) BrowserPod(s *servermanagerv1alpha1.ServerMana
func (r *ServerManagerReconciler) ServerService(s *servermanagerv1alpha1.ServerManager) *corev1.Service {
ports := make([]corev1.ServicePort, len(s.Spec.Server.Ports))
for i, port := range s.Spec.Server.Ports {
ports[i] = corev1.ServicePort{NodePort: 0, Port: port.Port, TargetPort: intstr.FromInt32(port.Port), Name: fmt.Sprintf("%s-%d", strings.ToLower(string(port.Protocol)), port.Port)}
ports[i] = corev1.ServicePort{NodePort: 0, Port: port.Port, TargetPort: intstr.FromInt32(port.Port), Name: fmt.Sprintf("%s-%d", strings.ToLower(string(port.Protocol)), port.Port), Protocol: port.Protocol}
}
service := &corev1.Service{
ObjectMeta: metav1.ObjectMeta{