From 63208e518a9ae8e736e47860afb63c4f6b6738c2 Mon Sep 17 00:00:00 2001 From: jingxueli Date: Mon, 11 Oct 2021 11:14:05 +0800 Subject: [PATCH] remove work ownerReferences field Signed-off-by: jingxueli --- pkg/webhook/work/mutating.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/webhook/work/mutating.go b/pkg/webhook/work/mutating.go index 73fead453021..152b2cbec688 100644 --- a/pkg/webhook/work/mutating.go +++ b/pkg/webhook/work/mutating.go @@ -109,6 +109,8 @@ func removeIrrelevantField(workload *unstructured.Unstructured) error { // populated by the kubernetes. unstructured.RemoveNestedField(workload.Object, "metadata", "uid") + unstructured.RemoveNestedField(workload.Object, "metadata", "ownerReferences") + unstructured.RemoveNestedField(workload.Object, "status") if workload.GetKind() == util.ServiceKind {