diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index ed308ec..f00ef80 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -55,7 +55,7 @@ spec: containers: - command: - /manager - image: git.acooldomain.co/server-manager/kubernetes-operator:v0.0.8 + image: git.acooldomain.co/server-manager/kubernetes-operator:v0.0.9 env: - name: CONFIG_PATH value: /etc/server-manager/config.yaml diff --git a/internal/controller/servermanager_controller.go b/internal/controller/servermanager_controller.go index 663330c..bc02728 100644 --- a/internal/controller/servermanager_controller.go +++ b/internal/controller/servermanager_controller.go @@ -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{