mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Merge branch 'kubectl5' of https://github.com/brendandburns/kubernetes into kubectl5
This commit is contained in:
commit
884c1632ff
@ -53,16 +53,16 @@ func (t *testRESTStrategy) AllowCreateOnUpdate() bool { return t.allowCreat
|
||||
func (t *testRESTStrategy) AllowUnconditionalUpdate() bool { return t.allowUnconditionalUpdate }
|
||||
|
||||
func (t *testRESTStrategy) PrepareForCreate(obj runtime.Object) {
|
||||
accessor, err := meta.Accessor(obj)
|
||||
metaObj, err := meta.Accessor(obj)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
labels := accessor.Labels()
|
||||
labels := metaObj.GetLabels()
|
||||
if labels == nil {
|
||||
labels = map[string]string{}
|
||||
}
|
||||
labels["prepare_create"] = "true"
|
||||
accessor.SetLabels(labels)
|
||||
metaObj.SetLabels(labels)
|
||||
}
|
||||
|
||||
func (t *testRESTStrategy) PrepareForUpdate(obj, old runtime.Object) {}
|
||||
|
Loading…
Reference in New Issue
Block a user