1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-07-12 22:21:40 +02:00

Use unique label selector for pod label for kubernetes services (#2723)

Co-authored-by: Julian Haseleu <julian.haseleu@dreamit.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
J-Ha
2023-11-04 10:35:37 +01:00
committed by GitHub
parent fc8a001b2b
commit 9af71dcc98
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)
func Service(namespace, name, podName string, ports []uint16) (*v1.Service, error) {
func Service(namespace, name string, ports []uint16) (*v1.Service, error) {
var svcPorts []v1.ServicePort
for _, port := range ports {
svcPorts = append(svcPorts, v1.ServicePort{
@ -42,7 +42,7 @@ func Service(namespace, name, podName string, ports []uint16) (*v1.Service, erro
Spec: v1.ServiceSpec{
Type: v1.ServiceTypeClusterIP,
Selector: map[string]string{
"step": podName,
"step": dnsName,
},
Ports: svcPorts,
},