Add type of service (#1385)
This commit is contained in:
parent
e49be1da42
commit
d2f153d795
@ -84,6 +84,8 @@ func (k *kubernetes) getService(labels map[string]string) ([]*service, error) {
|
||||
address := kservice.Spec.ClusterIP
|
||||
port := kservice.Spec.Ports[0]
|
||||
srv.Service.Metadata["address"] = fmt.Sprintf("%s:%d", address, port.Port)
|
||||
// set the type of service
|
||||
srv.Service.Metadata["type"] = kservice.Metadata.Labels["micro"]
|
||||
|
||||
// copy annotations metadata into service metadata
|
||||
for k, v := range kservice.Metadata.Annotations {
|
||||
|
@ -125,6 +125,8 @@ func (s *service) Start() error {
|
||||
s.running = true
|
||||
// set status
|
||||
s.Metadata["status"] = "running"
|
||||
// set started
|
||||
s.Metadata["started"] = time.Now().Format(time.RFC3339)
|
||||
|
||||
if s.output != nil {
|
||||
s.streamOutput()
|
||||
|
Loading…
Reference in New Issue
Block a user