You've already forked woodpecker
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:
@ -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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user