func (k *kubernetes) updateNetworkPolicy(networkPolicy *runtime.NetworkPolicy) error {
	err := k.client.Update(&client.Resource{
		Kind:  "networkpolicy",
		Name:  networkPolicy.Name,
		Value: client.NewNetworkPolicy(networkPolicy.Name, networkPolicy.Namespace, networkPolicy.AllowedLabels),
	}, client.UpdateNamespace(networkPolicy.Namespace))
	if err != nil {
		if logger.V(logger.ErrorLevel, logger.DefaultLogger) {
			logger.Errorf("Error updating resource %s: %v", networkPolicy.String(), err)
		}
	}
	return err
}
updateNetworkPolicy updates a networkpolicy resource in-place
package kubernetes
import (
	"github.com/micro/micro/v3/service/logger"
	"github.com/micro/micro/v3/service/runtime"
	"github.com/micro/micro/v3/service/runtime/kubernetes/client"
)
func (k *kubernetes) createNetworkPolicy(networkPolicy *runtime.NetworkPolicy) error {
	err := k.client.Create(&client.Resource{
		Kind:  "networkpolicy",
		Value: client.NewNetworkPolicy(networkPolicy.Name, networkPolicy.Namespace, networkPolicy.AllowedLabels),
	}, client.CreateNamespace(networkPolicy.Namespace))
	if err != nil {
		if logger.V(logger.ErrorLevel, logger.DefaultLogger) {
			logger.Errorf("Error creating resource %s: %v", networkPolicy.String(), err)
		}
	}
	return err
}