use pointer types for metav1.Time fields (#1951)

* use pointer types for metav1.Time fields

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* simpler metav1.Time ptrs

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* remove test debug println

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
This commit is contained in:
Adnan Abdulhussein
2019-10-14 10:20:28 -06:00
committed by Steve Kriss
parent 3fc4097231
commit e3d64d9dd9
29 changed files with 158 additions and 88 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ import (
jsonpatch "github.com/evanphx/json-patch"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/clock"
@@ -47,7 +48,7 @@ func Process(req *velerov1api.ServerStatusRequest, client velerov1client.ServerS
log.Info("Processing new ServerStatusRequest")
return errors.WithStack(patch(client, req, func(req *velerov1api.ServerStatusRequest) {
req.Status.ServerVersion = buildinfo.Version
req.Status.ProcessedTimestamp.Time = clock.Now()
req.Status.ProcessedTimestamp = &metav1.Time{Time: clock.Now()}
req.Status.Phase = velerov1api.ServerStatusRequestPhaseProcessed
req.Status.Plugins = plugins(pluginLister)
}))