Generated files for NetworkPolicyStatus removal

Kubernetes-commit: ec997d5433afc09e79376e35936a027dc2ba8713
This commit is contained in:
Ricardo Katz 2023-02-16 14:31:49 -03:00 committed by Kubernetes Publisher
parent 10f4062eb6
commit 224050a5b5
10 changed files with 2 additions and 316 deletions

View File

@ -32,8 +32,7 @@ import (
type NetworkPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"`
Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"`
Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"`
}
// NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with
@ -248,11 +247,3 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration {
b.Status = value
return b
}

View File

@ -1,48 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use
// with apply.
type NetworkPolicyStatusApplyConfiguration struct {
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with
// apply.
func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration {
return &NetworkPolicyStatusApplyConfiguration{}
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}

View File

@ -8343,10 +8343,6 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec
default: {}
- name: status
type:
namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus
default: {}
- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule
map:
fields:
@ -8426,17 +8422,6 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: io.k8s.api.extensions.v1beta1.ReplicaSet
map:
fields:
@ -10087,10 +10072,6 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.networking.v1.NetworkPolicySpec
default: {}
- name: status
type:
namedType: io.k8s.api.networking.v1.NetworkPolicyStatus
default: {}
- name: io.k8s.api.networking.v1.NetworkPolicyEgressRule
map:
fields:
@ -10170,17 +10151,6 @@ var schemaYAML = typed.YAMLObject(`types:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.networking.v1.NetworkPolicyStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: io.k8s.api.networking.v1.ServiceBackendPort
map:
fields:

View File

@ -32,8 +32,7 @@ import (
type NetworkPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"`
Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"`
Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"`
}
// NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with
@ -248,11 +247,3 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration {
b.Status = value
return b
}

View File

@ -1,48 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use
// with apply.
type NetworkPolicyStatusApplyConfiguration struct {
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with
// apply.
func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration {
return &NetworkPolicyStatusApplyConfiguration{}
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}

View File

@ -1019,8 +1019,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsextensionsv1beta1.NetworkPolicyPortApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicySpec"):
return &applyconfigurationsextensionsv1beta1.NetworkPolicySpecApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"):
return &applyconfigurationsextensionsv1beta1.NetworkPolicyStatusApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet"):
return &applyconfigurationsextensionsv1beta1.ReplicaSetApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSetCondition"):
@ -1293,8 +1291,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsnetworkingv1.NetworkPolicyPortApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("NetworkPolicySpec"):
return &applyconfigurationsnetworkingv1.NetworkPolicySpecApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"):
return &applyconfigurationsnetworkingv1.NetworkPolicyStatusApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("ServiceBackendPort"):
return &applyconfigurationsnetworkingv1.ServiceBackendPortApplyConfiguration{}

View File

@ -104,18 +104,6 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1
return obj.(*v1beta1.NetworkPolicy), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &v1beta1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.NetworkPolicy), err
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
@ -164,26 +152,3 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *extensio
}
return obj.(*v1beta1.NetworkPolicy), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) {
if networkPolicy == nil {
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
}
data, err := json.Marshal(networkPolicy)
if err != nil {
return nil, err
}
name := networkPolicy.Name
if name == nil {
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.NetworkPolicy), err
}

View File

@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface {
type NetworkPolicyInterface interface {
Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error)
Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error)
UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.NetworkPolicy, error)
@ -51,7 +50,6 @@ type NetworkPolicyInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error)
Apply(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error)
ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error)
NetworkPolicyExpansion
}
@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.Net
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) {
result = &v1beta1.NetworkPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("networkpolicies").
Name(networkPolicy.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(networkPolicy).
Do(ctx).
Into(result)
return
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1
Into(result)
return
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) {
if networkPolicy == nil {
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(networkPolicy)
if err != nil {
return nil, err
}
name := networkPolicy.Name
if name == nil {
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
}
result = &v1beta1.NetworkPolicy{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("networkpolicies").
Name(*name).
SubResource("status").
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -104,18 +104,6 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1.Netw
return obj.(*v1.NetworkPolicy), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &v1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1.NetworkPolicy), err
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
_, err := c.Fake.
@ -164,26 +152,3 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *networki
}
return obj.(*v1.NetworkPolicy), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) {
if networkPolicy == nil {
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
}
data, err := json.Marshal(networkPolicy)
if err != nil {
return nil, err
}
name := networkPolicy.Name
if name == nil {
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1.NetworkPolicy), err
}

View File

@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface {
type NetworkPolicyInterface interface {
Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error)
Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error)
UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error)
@ -51,7 +50,6 @@ type NetworkPolicyInterface interface {
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error)
Apply(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error)
ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error)
NetworkPolicyExpansion
}
@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkP
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) {
result = &v1.NetworkPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("networkpolicies").
Name(networkPolicy.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(networkPolicy).
Do(ctx).
Into(result)
return
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *networkingv1
Into(result)
return
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) {
if networkPolicy == nil {
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(networkPolicy)
if err != nil {
return nil, err
}
name := networkPolicy.Name
if name == nil {
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
}
result = &v1.NetworkPolicy{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("networkpolicies").
Name(*name).
SubResource("status").
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}