add last login time for user (#2679)

Signed-off-by: Jeff <zw0948@gmail.com>
This commit is contained in:
zryfish
2020-07-28 17:26:13 +08:00
committed by GitHub
parent e4510972dd
commit 93b123c1f0
9 changed files with 145 additions and 46 deletions

View File

@@ -137,6 +137,9 @@ type UserStatus struct {
Reason string `json:"reason,omitempty"`
// +optional
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
// Last login attempt timestamp
// +optional
LastLoginTime *metav1.Time `json:"lastLoginTime,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@@ -577,6 +577,10 @@ func (in *UserStatus) DeepCopyInto(out *UserStatus) {
in, out := &in.LastTransitionTime, &out.LastTransitionTime
*out = (*in).DeepCopy()
}
if in.LastLoginTime != nil {
in, out := &in.LastLoginTime, &out.LastLoginTime
*out = (*in).DeepCopy()
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus.