Browse Source

bugfix service ports list

master
Vladimir Smagin 1 year ago
parent
commit
b90e5a3fae
Signed by: 21h GPG Key ID: 13BCE12E5618F071
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      pkg/controller/manifests/manifest_service.go

+ 7
- 7
pkg/controller/manifests/manifest_service.go View File

@ -22,15 +22,15 @@ func GenerateService(cr *blindagev1alpha1.Redis, serviceName string, ports map[s
service.Spec.Type = corev1.ServiceTypeClusterIP
service.Spec.Ports = []corev1.ServicePort{}
for portName, portNum := range ports {
service.Spec.Ports = []corev1.ServicePort{
{
Name: portName,
Port: portNum,
Protocol: corev1.ProtocolTCP,
TargetPort: intstr.FromString(portName),
},
port := corev1.ServicePort{
Name: portName,
Port: portNum,
Protocol: corev1.ProtocolTCP,
TargetPort: intstr.FromString(portName),
}
service.Spec.Ports = append(service.Spec.Ports, port)
}
service.Spec.Selector = labelsComplete


Loading…
Cancel
Save