Skip to content

Commit

Permalink
Exclude the status subresouce from the applied resource
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Jan 13, 2022
1 parent 1c5bb59 commit d8a9a2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ssa/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ func SetNativeKindsDefaults(objects []*unstructured.Unstructured) error {
}

for _, u := range objects {
unstructured.RemoveNestedField(u.Object, "metadata", "creationTimestamp")

switch u.GetAPIVersion() {
case "v1":
switch u.GetKind() {
Expand Down Expand Up @@ -417,6 +415,10 @@ func SetNativeKindsDefaults(objects []*unstructured.Unstructured) error {
u.Object = out
}
}

// remove fields that are not supposed to be present in manifests
unstructured.RemoveNestedField(u.Object, "metadata", "creationTimestamp")
unstructured.RemoveNestedField(u.Object, "status")
}
return nil
}
Expand Down

0 comments on commit d8a9a2b

Please sign in to comment.