Skip to content

Commit

Permalink
fix: Fix helm subcommand crashes when client does not have permission…
Browse files Browse the repository at this point in the history
… to list Secrets

Signed-off-by: Justin Toh <tohjustin@hotmail.com>
  • Loading branch information
tohjustin committed Mar 3, 2022
1 parent 7c95ddd commit 23c9dbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/cmd/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,13 @@ func (o *CmdOptions) Run() error {
return err
}

// Include release objects into objects to handle cases where user has access
// to get the release objects but unable to list its resource type
// Include release & secret objects into objects to handle cases where user
// has access to get them individually but unable to list their respective
// resource types
objs.Items = append(objs.Items, rlsObjs...)
if stgObj != nil {
objs.Items = append(objs.Items, *stgObj)
}

// Collect UIDs from release & storage objects
var uids []types.UID
Expand Down

0 comments on commit 23c9dbe

Please sign in to comment.