use fixed port names for runtime k8s
This commit is contained in:
parent
8289dbabc4
commit
8da77a3ddc
@ -53,7 +53,7 @@ func NewService(name, version, typ string) *Service {
|
|||||||
Type: "ClusterIP",
|
Type: "ClusterIP",
|
||||||
Selector: Labels,
|
Selector: Labels,
|
||||||
Ports: []ServicePort{{
|
Ports: []ServicePort{{
|
||||||
name + "-port", 9090, "",
|
"service-port", 9090, "",
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ func NewDeployment(name, version, typ string) *Deployment {
|
|||||||
Env: []EnvVar{env},
|
Env: []EnvVar{env},
|
||||||
Command: []string{"go", "run", "main.go"},
|
Command: []string{"go", "run", "main.go"},
|
||||||
Ports: []ContainerPort{{
|
Ports: []ContainerPort{{
|
||||||
Name: name + "-port",
|
Name: "service-port",
|
||||||
ContainerPort: 8080,
|
ContainerPort: 8080,
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
|
Loading…
Reference in New Issue
Block a user