1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Change the k8s runtime notifier update to get the deployment and update build

This commit is contained in:
Asim Aslam
2019-11-26 13:49:52 +00:00
parent 12d9c5b187
commit b06854b0d5
3 changed files with 166 additions and 159 deletions

View File

@ -2,9 +2,7 @@
package client
import (
"strconv"
"strings"
"time"
"github.com/micro/go-micro/util/log"
)
@ -94,16 +92,6 @@ func NewDeployment(name, version string) *Deployment {
Annotations: map[string]string{},
}
// TODO: we need to figure out this version stuff
// might have to add Build to runtime.Service
buildTime, err := strconv.ParseInt(version, 10, 64)
if err == nil {
buildUnixTimeUTC := time.Unix(buildTime, 0)
Metadata.Annotations["build"] = buildUnixTimeUTC.Format(time.RFC3339)
} else {
log.Tracef("could not parse build: %v", err)
}
// enable go modules by default
env := EnvVar{
Name: "GO111MODULE",