Runtime refactoring and NetworkPolicy support (#2016)

This commit is contained in:
Prawn
2020-10-14 02:54:05 +13:00
committed by GitHub
parent 5e35d89b38
commit 1a962e46fd
13 changed files with 877 additions and 362 deletions

View File

@@ -156,6 +156,8 @@ func (c *client) Update(r *Resource, opts ...UpdateOption) error {
req.Body(r.Value.(*Deployment))
case "pod":
req.Body(r.Value.(*Pod))
case "networkpolicy", "networkpolicies":
req.Body(r.Value.(*NetworkPolicy))
default:
return errors.New("unsupported resource")
}