Skip to content

Commit

Permalink
cliplugin/sync: append pod subresources
Browse files Browse the repository at this point in the history
  • Loading branch information
jmprusi committed Feb 6, 2023
1 parent eb61c60 commit e69da7e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/cliplugins/workload/plugin/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,20 @@ func getGroupMappings(resourcesToSync []string) []groupMapping {
} else {
groupMap[apiGroup] = append(groupMap[apiGroup], name)
}
// If pods are being synced, add the subresources that are required to
// support the pod subresources.
if apiGroup == "" && name == "pods" {
podSubresources := []string{
"pods/log",
"pods/exec",
"pods/attach",
"pods/binding",
"pods/portforward",
"pods/proxy",
"pods/ephemeralcontainers",
}
groupMap[apiGroup] = append(groupMap[apiGroup], podSubresources...)
}
}

groupMappings := make([]groupMapping, 0, len(groupMap))
Expand Down

0 comments on commit e69da7e

Please sign in to comment.