mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Set uid during object create
This commit is contained in:
@@ -100,7 +100,8 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
if errs := validation.ValidatePod(pod); len(errs) > 0 {
|
||||
return nil, errors.NewInvalid("pod", pod.Name, errs)
|
||||
}
|
||||
pod.CreationTimestamp = util.Now()
|
||||
|
||||
api.FillObjectMetaSystemFields(ctx, &pod.ObjectMeta)
|
||||
|
||||
return apiserver.MakeAsync(func() (runtime.Object, error) {
|
||||
if err := rs.registry.CreatePod(ctx, pod); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user