Skip to content

Commit

Permalink
not trim uid
Browse files Browse the repository at this point in the history
Signed-off-by: Di Xu <stephenhsu90@gmail.com>
  • Loading branch information
dixudx committed May 12, 2022
1 parent d08c4fe commit 72083e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/registry/shadow/template/trimmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func trimCommonMetadata(result *unstructured.Unstructured) {
unstructured.RemoveNestedField(result.Object, "metadata", "managedFields")
unstructured.RemoveNestedField(result.Object, "metadata", "resourceVersion")
unstructured.RemoveNestedField(result.Object, "metadata", "selfLink")
unstructured.RemoveNestedField(result.Object, "metadata", "uid")
}

func trimCoreService(result *unstructured.Unstructured) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/registry/shadow/template/trimmer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func TestTrimCoreService(t *testing.T) {
},
"name": "my-test-nodeport-svc",
"namespace": "nginx-test",
"uid": "28f5ae38-9eea-431c-918b-68ffdf263c24",
},
"spec": map[string]interface{}{
"clusterIP": "10.98.177.115",
Expand Down Expand Up @@ -210,6 +211,7 @@ func TestTrimBatchJob(t *testing.T) {
},
"name": "pi",
"namespace": "default",
"uid": "dc8ca8aa-268c-4634-b1f7-6bf67e3af6cb",
},
"spec": map[string]interface{}{
"backoffLimit": 4,
Expand Down

0 comments on commit 72083e4

Please sign in to comment.