diff options
Diffstat (limited to 'cloud/pkg/taskmanager')
| -rw-r--r-- | cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_task.go | 5 | ||||
| -rw-r--r-- | cloud/pkg/taskmanager/nodeupgradecontroller/upgrade_task.go | 5 | ||||
| -rw-r--r-- | cloud/pkg/taskmanager/util/util.go | 4 |
3 files changed, 5 insertions, 9 deletions
diff --git a/cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_task.go b/cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_task.go index aedd8fe08..dcf8988a1 100644 --- a/cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_task.go +++ b/cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_task.go @@ -27,7 +27,6 @@ import ( v1alpha12 "github.com/kubeedge/api/apis/fsm/v1alpha1" "github.com/kubeedge/api/apis/operations/v1alpha1" "github.com/kubeedge/kubeedge/cloud/pkg/common/client" - "github.com/kubeedge/kubeedge/cloud/pkg/taskmanager/util" "github.com/kubeedge/kubeedge/pkg/util/fsm" ) @@ -71,7 +70,7 @@ func updatePrePullNodeState(id, nodeName string, state v1alpha12.State, event fs State: state, Event: event.Type, Action: event.Action, - Time: time.Now().Format(util.ISO8601UTC), + Time: time.Now().UTC().Format(time.RFC3339), Reason: event.Msg, }, ImageStatus: imagesStatus, @@ -122,7 +121,7 @@ func updateUpgradeTaskState(id, _ string, state v1alpha12.State, event fsm.Event status.Action = event.Action status.Reason = event.Msg status.State = state - status.Time = time.Now().Format(util.ISO8601UTC) + status.Time = time.Now().UTC().Format(time.RFC3339) err := patchStatus(newTask, *status, client.GetCRDClient()) diff --git a/cloud/pkg/taskmanager/nodeupgradecontroller/upgrade_task.go b/cloud/pkg/taskmanager/nodeupgradecontroller/upgrade_task.go index 14f8873c9..ab269e744 100644 --- a/cloud/pkg/taskmanager/nodeupgradecontroller/upgrade_task.go +++ b/cloud/pkg/taskmanager/nodeupgradecontroller/upgrade_task.go @@ -24,7 +24,6 @@ import ( v1alpha12 "github.com/kubeedge/api/apis/fsm/v1alpha1" "github.com/kubeedge/api/apis/operations/v1alpha1" "github.com/kubeedge/kubeedge/cloud/pkg/common/client" - "github.com/kubeedge/kubeedge/cloud/pkg/taskmanager/util" "github.com/kubeedge/kubeedge/pkg/util/fsm" ) @@ -62,7 +61,7 @@ func updateUpgradeNodeState(id, nodeName string, state v1alpha12.State, event fs State: state, Event: event.Type, Action: event.Action, - Time: time.Now().Format(util.ISO8601UTC), + Time: time.Now().UTC().Format(time.RFC3339), Reason: event.Msg, } break @@ -111,7 +110,7 @@ func updateUpgradeTaskState(id, _ string, state v1alpha12.State, event fsm.Event status.Action = event.Action status.Reason = event.Msg status.State = state - status.Time = time.Now().Format(util.ISO8601UTC) + status.Time = time.Now().UTC().Format(time.RFC3339) err := patchStatus(newTask, *status, client.GetCRDClient()) diff --git a/cloud/pkg/taskmanager/util/util.go b/cloud/pkg/taskmanager/util/util.go index e998047a5..400c48b67 100644 --- a/cloud/pkg/taskmanager/util/util.go +++ b/cloud/pkg/taskmanager/util/util.go @@ -22,7 +22,7 @@ import ( "github.com/distribution/distribution/v3/reference" metav1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" versionutil "k8s.io/apimachinery/pkg/util/version" "k8s.io/klog/v2" @@ -41,8 +41,6 @@ const ( TaskRollback = "rollback" TaskBackup = "backup" TaskPrePull = "prepull" - - ISO8601UTC = "2006-01-02T15:04:05Z" ) type TaskMessage struct { |
