Skip to content

Commit

Permalink
clear data section for secret
Browse files Browse the repository at this point in the history
  • Loading branch information
shangma authored and bk201 committed Sep 8, 2021
1 parent 189e740 commit 81e055d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/manager/client/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ func toObj(b []byte, groupVersion, kind string) (interface{}, error) {
}
}

if kind == "Secret" {
for _, child := range jsonParsed.S("items").Children() {
if exists := child.Exists("data"); exists {
_, err := child.SetP("", "data")
if err != nil {
logrus.Error("Unable to clear data section")
}
}
}
}

return jsonParsed.Data(), nil
}

Expand Down

0 comments on commit 81e055d

Please sign in to comment.