add k8s service ip to metadata (#1367)

* add k8s service ip to metadata

* go fmt

* use same port as container
This commit is contained in:
Asim Aslam
2020-03-18 18:27:29 +00:00
committed by GitHub
parent c91bf7e9e7
commit 1bd340701b
3 changed files with 16 additions and 7 deletions

View File

@@ -217,7 +217,7 @@ func NewService(name, version, typ string) *Service {
Type: "ClusterIP",
Selector: Labels,
Ports: []ServicePort{{
"service-port", 9090, "",
"service-port", 8080, "",
}},
}

View File

@@ -132,9 +132,10 @@ type ServicePort struct {
// ServiceSpec provides service configuration
type ServiceSpec struct {
Type string `json:"type,omitempty"`
Selector map[string]string `json:"selector,omitempty"`
Ports []ServicePort `json:"ports,omitempty"`
ClusterIP string `json:"clusterIP"`
Type string `json:"type,omitempty"`
Selector map[string]string `json:"selector,omitempty"`
Ports []ServicePort `json:"ports,omitempty"`
}
// ServiceStatus