Commit 884c1632 authored by Brendan Burns's avatar Brendan Burns

Merge branch 'kubectl5' of https://github.com/brendandburns/kubernetes into kubectl5

parents 2efcccf9 a60069b3
...@@ -53,16 +53,16 @@ func (t *testRESTStrategy) AllowCreateOnUpdate() bool { return t.allowCreat ...@@ -53,16 +53,16 @@ func (t *testRESTStrategy) AllowCreateOnUpdate() bool { return t.allowCreat
func (t *testRESTStrategy) AllowUnconditionalUpdate() bool { return t.allowUnconditionalUpdate } func (t *testRESTStrategy) AllowUnconditionalUpdate() bool { return t.allowUnconditionalUpdate }
func (t *testRESTStrategy) PrepareForCreate(obj runtime.Object) { func (t *testRESTStrategy) PrepareForCreate(obj runtime.Object) {
accessor, err := meta.Accessor(obj) metaObj, err := meta.Accessor(obj)
if err != nil { if err != nil {
panic(err.Error()) panic(err.Error())
} }
labels := accessor.Labels() labels := metaObj.GetLabels()
if labels == nil { if labels == nil {
labels = map[string]string{} labels = map[string]string{}
} }
labels["prepare_create"] = "true" labels["prepare_create"] = "true"
accessor.SetLabels(labels) metaObj.SetLabels(labels)
} }
func (t *testRESTStrategy) PrepareForUpdate(obj, old runtime.Object) {} func (t *testRESTStrategy) PrepareForUpdate(obj, old runtime.Object) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment