in pkg/clientset/versioned/typed/networking/v1alpha3/envoyfilter.gen.go [201:224]
func (c *envoyFilters) Apply(ctx context.Context, envoyFilter *networkingv1alpha3.EnvoyFilterApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.EnvoyFilter, err error) {
if envoyFilter == nil {
return nil, fmt.Errorf("envoyFilter provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(envoyFilter)
if err != nil {
return nil, err
}
name := envoyFilter.Name
if name == nil {
return nil, fmt.Errorf("envoyFilter.Name must be provided to Apply")
}
result = &v1alpha3.EnvoyFilter{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("envoyfilters").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}