use fixed port names for runtime k8s

This commit is contained in:
Asim Aslam 2019-12-10 14:05:05 +00:00
parent 8289dbabc4
commit 8da77a3ddc

View File

@ -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,
}}, }},
}}, }},