repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/interface.go
vendor/k8s.io/client-go/informers/admissionregistration/interface.go
/* 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 informer-gen. DO NOT EDIT. package admissionregistration import ( v1 "k8s.io/client-go/informers/admissionregistration/v1" v1alpha1 "k8s.io/client-go/informers/admissionregistration/v1alpha1" v1beta1 "k8s.io/client-go/informers/admissionregistration/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } // V1alpha1 returns a new v1alpha1.Interface. func (g *group) V1alpha1() v1alpha1.Interface { return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) } // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go
vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/mutatingadmissionpolicybinding.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( context "context" time "time" apiadmissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" cache "k8s.io/client-go/tools/cache" ) // MutatingAdmissionPolicyBindingInformer provides access to a shared informer and lister for // MutatingAdmissionPolicyBindings. type MutatingAdmissionPolicyBindingInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1alpha1.MutatingAdmissionPolicyBindingLister } type mutatingAdmissionPolicyBindingInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewMutatingAdmissionPolicyBindingInformer constructs a new informer for MutatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredMutatingAdmissionPolicyBindingInformer(client, resyncPeriod, indexers, nil) } // NewFilteredMutatingAdmissionPolicyBindingInformer constructs a new informer for MutatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredMutatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicyBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicyBindings().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1alpha1.MutatingAdmissionPolicyBinding{}, resyncPeriod, indexers, ) } func (f *mutatingAdmissionPolicyBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredMutatingAdmissionPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *mutatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicyBinding{}, f.defaultInformer) } func (f *mutatingAdmissionPolicyBindingInformer) Lister() admissionregistrationv1alpha1.MutatingAdmissionPolicyBindingLister { return admissionregistrationv1alpha1.NewMutatingAdmissionPolicyBindingLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go
vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( context "context" time "time" apiadmissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyBindingInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicyBindings. type ValidatingAdmissionPolicyBindingInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1alpha1.ValidatingAdmissionPolicyBindingLister } type validatingAdmissionPolicyBindingInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicyBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicyBindings().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding{}, f.defaultInformer) } func (f *validatingAdmissionPolicyBindingInformer) Lister() admissionregistrationv1alpha1.ValidatingAdmissionPolicyBindingLister { return admissionregistrationv1alpha1.NewValidatingAdmissionPolicyBindingLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go
vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // MutatingAdmissionPolicies returns a MutatingAdmissionPolicyInformer. MutatingAdmissionPolicies() MutatingAdmissionPolicyInformer // MutatingAdmissionPolicyBindings returns a MutatingAdmissionPolicyBindingInformer. MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingInformer // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // MutatingAdmissionPolicies returns a MutatingAdmissionPolicyInformer. func (v *version) MutatingAdmissionPolicies() MutatingAdmissionPolicyInformer { return &mutatingAdmissionPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // MutatingAdmissionPolicyBindings returns a MutatingAdmissionPolicyBindingInformer. func (v *version) MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingInformer { return &mutatingAdmissionPolicyBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. func (v *version) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer { return &validatingAdmissionPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. func (v *version) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer { return &validatingAdmissionPolicyBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/mutatingadmissionpolicy.go
vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/mutatingadmissionpolicy.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( context "context" time "time" apiadmissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" cache "k8s.io/client-go/tools/cache" ) // MutatingAdmissionPolicyInformer provides access to a shared informer and lister for // MutatingAdmissionPolicies. type MutatingAdmissionPolicyInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1alpha1.MutatingAdmissionPolicyLister } type mutatingAdmissionPolicyInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewMutatingAdmissionPolicyInformer constructs a new informer for MutatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredMutatingAdmissionPolicyInformer(client, resyncPeriod, indexers, nil) } // NewFilteredMutatingAdmissionPolicyInformer constructs a new informer for MutatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredMutatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().MutatingAdmissionPolicies().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1alpha1.MutatingAdmissionPolicy{}, resyncPeriod, indexers, ) } func (f *mutatingAdmissionPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredMutatingAdmissionPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *mutatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1alpha1.MutatingAdmissionPolicy{}, f.defaultInformer) } func (f *mutatingAdmissionPolicyInformer) Lister() admissionregistrationv1alpha1.MutatingAdmissionPolicyLister { return admissionregistrationv1alpha1.NewMutatingAdmissionPolicyLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingadmissionpolicy.go
vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1/validatingadmissionpolicy.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( context "context" time "time" apiadmissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicies. type ValidatingAdmissionPolicyInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1alpha1.ValidatingAdmissionPolicyLister } type validatingAdmissionPolicyInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1alpha1().ValidatingAdmissionPolicies().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicy{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1alpha1.ValidatingAdmissionPolicy{}, f.defaultInformer) } func (f *validatingAdmissionPolicyInformer) Lister() admissionregistrationv1alpha1.ValidatingAdmissionPolicyLister { return admissionregistrationv1alpha1.NewValidatingAdmissionPolicyLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go
vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1 "k8s.io/client-go/listers/admissionregistration/v1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyBindingInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicyBindings. type ValidatingAdmissionPolicyBindingInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1.ValidatingAdmissionPolicyBindingLister } type validatingAdmissionPolicyBindingInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding{}, f.defaultInformer) } func (f *validatingAdmissionPolicyBindingInformer) Lister() admissionregistrationv1.ValidatingAdmissionPolicyBindingLister { return admissionregistrationv1.NewValidatingAdmissionPolicyBindingLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go
vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer. MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer. func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer { return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. func (v *version) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer { return &validatingAdmissionPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. func (v *version) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer { return &validatingAdmissionPolicyBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer { return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go
vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingwebhookconfiguration.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1 "k8s.io/client-go/listers/admissionregistration/v1" cache "k8s.io/client-go/tools/cache" ) // MutatingWebhookConfigurationInformer provides access to a shared informer and lister for // MutatingWebhookConfigurations. type MutatingWebhookConfigurationInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1.MutatingWebhookConfigurationLister } type mutatingWebhookConfigurationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) } // NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1.MutatingWebhookConfiguration{}, resyncPeriod, indexers, ) } func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1.MutatingWebhookConfiguration{}, f.defaultInformer) } func (f *mutatingWebhookConfigurationInformer) Lister() admissionregistrationv1.MutatingWebhookConfigurationLister { return admissionregistrationv1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicy.go
vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicy.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1 "k8s.io/client-go/listers/admissionregistration/v1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicies. type ValidatingAdmissionPolicyInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1.ValidatingAdmissionPolicyLister } type validatingAdmissionPolicyInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1.ValidatingAdmissionPolicy{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1.ValidatingAdmissionPolicy{}, f.defaultInformer) } func (f *validatingAdmissionPolicyInformer) Lister() admissionregistrationv1.ValidatingAdmissionPolicyLister { return admissionregistrationv1.NewValidatingAdmissionPolicyLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go
vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingwebhookconfiguration.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1 "k8s.io/client-go/listers/admissionregistration/v1" cache "k8s.io/client-go/tools/cache" ) // ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for // ValidatingWebhookConfigurations. type ValidatingWebhookConfigurationInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1.ValidatingWebhookConfigurationLister } type validatingWebhookConfigurationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1.ValidatingWebhookConfiguration{}, resyncPeriod, indexers, ) } func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1.ValidatingWebhookConfiguration{}, f.defaultInformer) } func (f *validatingWebhookConfigurationInformer) Lister() admissionregistrationv1.ValidatingWebhookConfigurationLister { return admissionregistrationv1.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingadmissionpolicybinding.go
vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingadmissionpolicybinding.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyBindingInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicyBindings. type ValidatingAdmissionPolicyBindingInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingLister } type validatingAdmissionPolicyBindingInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicyBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicyBindings().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1beta1.ValidatingAdmissionPolicyBinding{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicyBinding{}, f.defaultInformer) } func (f *validatingAdmissionPolicyBindingInformer) Lister() admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingLister { return admissionregistrationv1beta1.NewValidatingAdmissionPolicyBindingLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go
vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer. MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer. func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer { return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. func (v *version) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer { return &validatingAdmissionPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. func (v *version) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer { return &validatingAdmissionPolicyBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer { return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" cache "k8s.io/client-go/tools/cache" ) // MutatingWebhookConfigurationInformer provides access to a shared informer and lister for // MutatingWebhookConfigurations. type MutatingWebhookConfigurationInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1beta1.MutatingWebhookConfigurationLister } type mutatingWebhookConfigurationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) } // NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1beta1.MutatingWebhookConfiguration{}, resyncPeriod, indexers, ) } func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1beta1.MutatingWebhookConfiguration{}, f.defaultInformer) } func (f *mutatingWebhookConfigurationInformer) Lister() admissionregistrationv1beta1.MutatingWebhookConfigurationLister { return admissionregistrationv1beta1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingadmissionpolicy.go
vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingadmissionpolicy.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" cache "k8s.io/client-go/tools/cache" ) // ValidatingAdmissionPolicyInformer provides access to a shared informer and lister for // ValidatingAdmissionPolicies. type ValidatingAdmissionPolicyInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1beta1.ValidatingAdmissionPolicyLister } type validatingAdmissionPolicyInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingAdmissionPolicies().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1beta1.ValidatingAdmissionPolicy{}, resyncPeriod, indexers, ) } func (f *validatingAdmissionPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1beta1.ValidatingAdmissionPolicy{}, f.defaultInformer) } func (f *validatingAdmissionPolicyInformer) Lister() admissionregistrationv1beta1.ValidatingAdmissionPolicyLister { return admissionregistrationv1beta1.NewValidatingAdmissionPolicyLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
vendor/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" admissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" cache "k8s.io/client-go/tools/cache" ) // ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for // ValidatingWebhookConfigurations. type ValidatingWebhookConfigurationInformer interface { Informer() cache.SharedIndexInformer Lister() admissionregistrationv1beta1.ValidatingWebhookConfigurationLister } type validatingWebhookConfigurationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil) } // NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &apiadmissionregistrationv1beta1.ValidatingWebhookConfiguration{}, resyncPeriod, indexers, ) } func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apiadmissionregistrationv1beta1.ValidatingWebhookConfiguration{}, f.defaultInformer) } func (f *validatingWebhookConfigurationInformer) Lister() admissionregistrationv1beta1.ValidatingWebhookConfigurationLister { return admissionregistrationv1beta1.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/storagemigration/interface.go
vendor/k8s.io/client-go/informers/storagemigration/interface.go
/* 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 informer-gen. DO NOT EDIT. package storagemigration import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" v1alpha1 "k8s.io/client-go/informers/storagemigration/v1alpha1" ) // Interface provides access to each of this group's versions. type Interface interface { // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1alpha1 returns a new v1alpha1.Interface. func (g *group) V1alpha1() v1alpha1.Interface { return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/interface.go
vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // StorageVersionMigrations returns a StorageVersionMigrationInformer. StorageVersionMigrations() StorageVersionMigrationInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // StorageVersionMigrations returns a StorageVersionMigrationInformer. func (v *version) StorageVersionMigrations() StorageVersionMigrationInformer { return &storageVersionMigrationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go
vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha1 import ( context "context" time "time" apistoragemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" storagemigrationv1alpha1 "k8s.io/client-go/listers/storagemigration/v1alpha1" cache "k8s.io/client-go/tools/cache" ) // StorageVersionMigrationInformer provides access to a shared informer and lister for // StorageVersionMigrations. type StorageVersionMigrationInformer interface { Informer() cache.SharedIndexInformer Lister() storagemigrationv1alpha1.StorageVersionMigrationLister } type storageVersionMigrationInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewStorageVersionMigrationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredStorageVersionMigrationInformer(client, resyncPeriod, indexers, nil) } // NewFilteredStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredStorageVersionMigrationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(context.TODO(), options) }, }, &apistoragemigrationv1alpha1.StorageVersionMigration{}, resyncPeriod, indexers, ) } func (f *storageVersionMigrationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredStorageVersionMigrationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apistoragemigrationv1alpha1.StorageVersionMigration{}, f.defaultInformer) } func (f *storageVersionMigrationInformer) Lister() storagemigrationv1alpha1.StorageVersionMigrationLister { return storagemigrationv1alpha1.NewStorageVersionMigrationLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/interface.go
vendor/k8s.io/client-go/informers/coordination/interface.go
/* 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 informer-gen. DO NOT EDIT. package coordination import ( v1 "k8s.io/client-go/informers/coordination/v1" v1alpha2 "k8s.io/client-go/informers/coordination/v1alpha2" v1beta1 "k8s.io/client-go/informers/coordination/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface // V1alpha2 provides access to shared informers for resources in V1alpha2. V1alpha2() v1alpha2.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } // V1alpha2 returns a new v1alpha2.Interface. func (g *group) V1alpha2() v1alpha2.Interface { return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) } // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1/lease.go
vendor/k8s.io/client-go/informers/coordination/v1/lease.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apicoordinationv1 "k8s.io/api/coordination/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" coordinationv1 "k8s.io/client-go/listers/coordination/v1" cache "k8s.io/client-go/tools/cache" ) // LeaseInformer provides access to a shared informer and lister for // Leases. type LeaseInformer interface { Informer() cache.SharedIndexInformer Lister() coordinationv1.LeaseLister } type leaseInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewLeaseInformer constructs a new informer for Lease type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredLeaseInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredLeaseInformer constructs a new informer for Lease type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1().Leases(namespace).Watch(context.TODO(), options) }, }, &apicoordinationv1.Lease{}, resyncPeriod, indexers, ) } func (f *leaseInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredLeaseInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *leaseInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apicoordinationv1.Lease{}, f.defaultInformer) } func (f *leaseInformer) Lister() coordinationv1.LeaseLister { return coordinationv1.NewLeaseLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1/interface.go
vendor/k8s.io/client-go/informers/coordination/v1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // Leases returns a LeaseInformer. Leases() LeaseInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // Leases returns a LeaseInformer. func (v *version) Leases() LeaseInformer { return &leaseInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go
vendor/k8s.io/client-go/informers/coordination/v1beta1/lease.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apicoordinationv1beta1 "k8s.io/api/coordination/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" coordinationv1beta1 "k8s.io/client-go/listers/coordination/v1beta1" cache "k8s.io/client-go/tools/cache" ) // LeaseInformer provides access to a shared informer and lister for // Leases. type LeaseInformer interface { Informer() cache.SharedIndexInformer Lister() coordinationv1beta1.LeaseLister } type leaseInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewLeaseInformer constructs a new informer for Lease type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredLeaseInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredLeaseInformer constructs a new informer for Lease type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1beta1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1beta1().Leases(namespace).Watch(context.TODO(), options) }, }, &apicoordinationv1beta1.Lease{}, resyncPeriod, indexers, ) } func (f *leaseInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredLeaseInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *leaseInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apicoordinationv1beta1.Lease{}, f.defaultInformer) } func (f *leaseInformer) Lister() coordinationv1beta1.LeaseLister { return coordinationv1beta1.NewLeaseLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1beta1/interface.go
vendor/k8s.io/client-go/informers/coordination/v1beta1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // Leases returns a LeaseInformer. Leases() LeaseInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // Leases returns a LeaseInformer. func (v *version) Leases() LeaseInformer { return &leaseInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1alpha2/interface.go
vendor/k8s.io/client-go/informers/coordination/v1alpha2/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha2 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // LeaseCandidates returns a LeaseCandidateInformer. LeaseCandidates() LeaseCandidateInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // LeaseCandidates returns a LeaseCandidateInformer. func (v *version) LeaseCandidates() LeaseCandidateInformer { return &leaseCandidateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/coordination/v1alpha2/leasecandidate.go
vendor/k8s.io/client-go/informers/coordination/v1alpha2/leasecandidate.go
/* 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 informer-gen. DO NOT EDIT. package v1alpha2 import ( context "context" time "time" apicoordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" coordinationv1alpha2 "k8s.io/client-go/listers/coordination/v1alpha2" cache "k8s.io/client-go/tools/cache" ) // LeaseCandidateInformer provides access to a shared informer and lister for // LeaseCandidates. type LeaseCandidateInformer interface { Informer() cache.SharedIndexInformer Lister() coordinationv1alpha2.LeaseCandidateLister } type leaseCandidateInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewLeaseCandidateInformer constructs a new informer for LeaseCandidate type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewLeaseCandidateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredLeaseCandidateInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredLeaseCandidateInformer constructs a new informer for LeaseCandidate type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredLeaseCandidateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1alpha2().LeaseCandidates(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoordinationV1alpha2().LeaseCandidates(namespace).Watch(context.TODO(), options) }, }, &apicoordinationv1alpha2.LeaseCandidate{}, resyncPeriod, indexers, ) } func (f *leaseCandidateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredLeaseCandidateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *leaseCandidateInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apicoordinationv1alpha2.LeaseCandidate{}, f.defaultInformer) } func (f *leaseCandidateInformer) Lister() coordinationv1alpha2.LeaseCandidateLister { return coordinationv1alpha2.NewLeaseCandidateLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/policy/interface.go
vendor/k8s.io/client-go/informers/policy/interface.go
/* 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 informer-gen. DO NOT EDIT. package policy import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" v1 "k8s.io/client-go/informers/policy/v1" v1beta1 "k8s.io/client-go/informers/policy/v1beta1" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } type group struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/policy/v1/poddisruptionbudget.go
vendor/k8s.io/client-go/informers/policy/v1/poddisruptionbudget.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( context "context" time "time" apipolicyv1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" policyv1 "k8s.io/client-go/listers/policy/v1" cache "k8s.io/client-go/tools/cache" ) // PodDisruptionBudgetInformer provides access to a shared informer and lister for // PodDisruptionBudgets. type PodDisruptionBudgetInformer interface { Informer() cache.SharedIndexInformer Lister() policyv1.PodDisruptionBudgetLister } type podDisruptionBudgetInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredPodDisruptionBudgetInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PolicyV1().PodDisruptionBudgets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PolicyV1().PodDisruptionBudgets(namespace).Watch(context.TODO(), options) }, }, &apipolicyv1.PodDisruptionBudget{}, resyncPeriod, indexers, ) } func (f *podDisruptionBudgetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredPodDisruptionBudgetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apipolicyv1.PodDisruptionBudget{}, f.defaultInformer) } func (f *podDisruptionBudgetInformer) Lister() policyv1.PodDisruptionBudgetLister { return policyv1.NewPodDisruptionBudgetLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/policy/v1/interface.go
vendor/k8s.io/client-go/informers/policy/v1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. PodDisruptionBudgets() PodDisruptionBudgetInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer { return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go
vendor/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( context "context" time "time" apipolicyv1beta1 "k8s.io/api/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" policyv1beta1 "k8s.io/client-go/listers/policy/v1beta1" cache "k8s.io/client-go/tools/cache" ) // PodDisruptionBudgetInformer provides access to a shared informer and lister for // PodDisruptionBudgets. type PodDisruptionBudgetInformer interface { Informer() cache.SharedIndexInformer Lister() policyv1beta1.PodDisruptionBudgetLister } type podDisruptionBudgetInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredPodDisruptionBudgetInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredPodDisruptionBudgetInformer constructs a new informer for PodDisruptionBudget type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(context.TODO(), options) }, }, &apipolicyv1beta1.PodDisruptionBudget{}, resyncPeriod, indexers, ) } func (f *podDisruptionBudgetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredPodDisruptionBudgetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&apipolicyv1beta1.PodDisruptionBudget{}, f.defaultInformer) } func (f *podDisruptionBudgetInformer) Lister() policyv1beta1.PodDisruptionBudgetLister { return policyv1beta1.NewPodDisruptionBudgetLister(f.Informer().GetIndexer()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go
vendor/k8s.io/client-go/informers/policy/v1beta1/interface.go
/* 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 informer-gen. DO NOT EDIT. package v1beta1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. PodDisruptionBudgets() PodDisruptionBudgetInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer { return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/scheme.go
vendor/k8s.io/client-go/dynamic/scheme.go
/* Copyright 2018 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. */ package dynamic import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/cbor" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/client-go/features" ) var basicScheme = runtime.NewScheme() var parameterScheme = runtime.NewScheme() var dynamicParameterCodec = runtime.NewParameterCodec(parameterScheme) var versionV1 = schema.GroupVersion{Version: "v1"} func init() { metav1.AddToGroupVersion(basicScheme, versionV1) metav1.AddToGroupVersion(parameterScheme, versionV1) } func newBasicNegotiatedSerializer() basicNegotiatedSerializer { supportedMediaTypes := []runtime.SerializerInfo{ { MediaType: "application/json", MediaTypeType: "application", MediaTypeSubType: "json", EncodesAsText: true, Serializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, unstructuredCreater{basicScheme}, unstructuredTyper{basicScheme}, json.SerializerOptions{}), PrettySerializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, unstructuredCreater{basicScheme}, unstructuredTyper{basicScheme}, json.SerializerOptions{Pretty: true}), StreamSerializer: &runtime.StreamSerializerInfo{ EncodesAsText: true, Serializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, basicScheme, basicScheme, json.SerializerOptions{}), Framer: json.Framer, }, }, } if features.FeatureGates().Enabled(features.ClientsAllowCBOR) { supportedMediaTypes = append(supportedMediaTypes, runtime.SerializerInfo{ MediaType: "application/cbor", MediaTypeType: "application", MediaTypeSubType: "cbor", Serializer: cbor.NewSerializer(unstructuredCreater{basicScheme}, unstructuredTyper{basicScheme}), StreamSerializer: &runtime.StreamSerializerInfo{ Serializer: cbor.NewSerializer(basicScheme, basicScheme, cbor.Transcode(false)), Framer: cbor.NewFramer(), }, }) } return basicNegotiatedSerializer{supportedMediaTypes: supportedMediaTypes} } type basicNegotiatedSerializer struct { supportedMediaTypes []runtime.SerializerInfo } func (s basicNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { return s.supportedMediaTypes } func (s basicNegotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { return runtime.WithVersionEncoder{ Version: gv, Encoder: encoder, ObjectTyper: permissiveTyper{basicScheme}, } } func (s basicNegotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { return decoder } type unstructuredCreater struct { nested runtime.ObjectCreater } func (c unstructuredCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { out, err := c.nested.New(kind) if err == nil { return out, nil } out = &unstructured.Unstructured{} out.GetObjectKind().SetGroupVersionKind(kind) return out, nil } type unstructuredTyper struct { nested runtime.ObjectTyper } func (t unstructuredTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { kinds, unversioned, err := t.nested.ObjectKinds(obj) if err == nil { return kinds, unversioned, nil } if _, ok := obj.(runtime.Unstructured); ok && !obj.GetObjectKind().GroupVersionKind().Empty() { return []schema.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil } return nil, false, err } func (t unstructuredTyper) Recognizes(gvk schema.GroupVersionKind) bool { return true } // The dynamic client has historically accepted Unstructured objects with missing or empty // apiVersion and/or kind as arguments to its write request methods. This typer will return the type // of a runtime.Unstructured with no error, even if the type is missing or empty. type permissiveTyper struct { nested runtime.ObjectTyper } func (t permissiveTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { kinds, unversioned, err := t.nested.ObjectKinds(obj) if err == nil { return kinds, unversioned, nil } if _, ok := obj.(runtime.Unstructured); ok { return []schema.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil } return nil, false, err } func (t permissiveTyper) Recognizes(gvk schema.GroupVersionKind) bool { return true }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/interface.go
vendor/k8s.io/client-go/dynamic/interface.go
/* Copyright 2016 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. */ package dynamic import ( "context" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" ) type Interface interface { Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface } type ResourceInterface interface { Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) Apply(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions, subresources ...string) (*unstructured.Unstructured, error) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) } type NamespaceableResourceInterface interface { Namespace(string) ResourceInterface ResourceInterface } // APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is optional. // TODO find a better place to move this for existing callers type APIPathResolverFunc func(kind schema.GroupVersionKind) string // LegacyAPIPathResolverFunc can resolve paths properly with the legacy API. // TODO find a better place to move this for existing callers func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { if len(kind.Group) == 0 { return "/api" } return "/apis" }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/simple.go
vendor/k8s.io/client-go/dynamic/simple.go
/* Copyright 2018 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. */ package dynamic import ( "context" "fmt" "net/http" "time" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/features" "k8s.io/client-go/rest" "k8s.io/client-go/util/apply" "k8s.io/client-go/util/consistencydetector" "k8s.io/client-go/util/watchlist" "k8s.io/klog/v2" ) type DynamicClient struct { client rest.Interface } var _ Interface = &DynamicClient{} // ConfigFor returns a copy of the provided config with the // appropriate dynamic client defaults set. func ConfigFor(inConfig *rest.Config) *rest.Config { config := rest.CopyConfig(inConfig) config.ContentType = "application/json" config.AcceptContentTypes = "application/json" if features.FeatureGates().Enabled(features.ClientsAllowCBOR) { config.AcceptContentTypes = "application/json;q=0.9,application/cbor;q=1" if features.FeatureGates().Enabled(features.ClientsPreferCBOR) { config.ContentType = "application/cbor" } } config.NegotiatedSerializer = newBasicNegotiatedSerializer() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } return config } // New creates a new DynamicClient for the given RESTClient. func New(c rest.Interface) *DynamicClient { return &DynamicClient{client: c} } // NewForConfigOrDie creates a new DynamicClient for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *DynamicClient { ret, err := NewForConfig(c) if err != nil { panic(err) } return ret } // NewForConfig creates a new dynamic client or returns an error. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(inConfig *rest.Config) (*DynamicClient, error) { config := ConfigFor(inConfig) httpClient, err := rest.HTTPClientFor(config) if err != nil { return nil, err } return NewForConfigAndClient(config, httpClient) } // NewForConfigAndClient creates a new dynamic client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(inConfig *rest.Config, h *http.Client) (*DynamicClient, error) { config := ConfigFor(inConfig) config.GroupVersion = nil config.APIPath = "/if-you-see-this-search-for-the-break" restClient, err := rest.UnversionedRESTClientForConfigAndClient(config, h) if err != nil { return nil, err } return &DynamicClient{client: restClient}, nil } type dynamicResourceClient struct { client *DynamicClient namespace string resource schema.GroupVersionResource } func (c *DynamicClient) Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface { return &dynamicResourceClient{client: c, resource: resource} } func (c *dynamicResourceClient) Namespace(ns string) ResourceInterface { ret := *c ret.namespace = ns return &ret } func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { name := "" if len(subresources) > 0 { accessor, err := meta.Accessor(obj) if err != nil { return nil, err } name = accessor.GetName() if len(name) == 0 { return nil, fmt.Errorf("name is required") } } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } var out unstructured.Unstructured if err := c.client.client. Post(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(obj). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, err } name := accessor.GetName() if len(name) == 0 { return nil, fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } var out unstructured.Unstructured if err := c.client.client. Put(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(obj). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, err } name := accessor.GetName() if len(name) == 0 { return nil, fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } var out unstructured.Unstructured if err := c.client.client. Put(). AbsPath(append(c.makeURLSegments(name), "status")...). Body(obj). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) error { if len(name) == 0 { return fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return err } result := c.client.client. Delete(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(&opts). Do(ctx) return result.Error() } func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) error { if err := validateNamespaceWithOptionalName(c.namespace); err != nil { return err } result := c.client.client. Delete(). AbsPath(c.makeURLSegments("")...). Body(&opts). SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1). Do(ctx) return result.Error() } func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { if len(name) == 0 { return nil, fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } var out unstructured.Unstructured if err := c.client.client. Get(). AbsPath(append(c.makeURLSegments(name), subresources...)...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil { klog.Warningf("Failed preparing watchlist options for %v, falling back to the standard LIST semantics, err = %v", c.resource, watchListOptionsErr) } else if hasWatchListOptionsPrepared { result, err := c.watchList(ctx, watchListOptions) if err == nil { consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, fmt.Sprintf("watchlist request for %v", c.resource), c.list, opts, result) return result, nil } klog.Warningf("The watchlist request for %v ended with an error, falling back to the standard LIST semantics, err = %v", c.resource, err) } result, err := c.list(ctx, opts) if err == nil { consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, fmt.Sprintf("list request for %v", c.resource), c.list, opts, result) } return result, err } func (c *dynamicResourceClient) list(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { if err := validateNamespaceWithOptionalName(c.namespace); err != nil { return nil, err } var out unstructured.UnstructuredList if err := c.client.client. Get(). AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } // watchList establishes a watch stream with the server and returns an unstructured list. func (c *dynamicResourceClient) watchList(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { if err := validateNamespaceWithOptionalName(c.namespace); err != nil { return nil, err } var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } result := &unstructured.UnstructuredList{} err := c.client.client.Get().AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Timeout(timeout). WatchList(ctx). Into(result) return result, err } func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true if err := validateNamespaceWithOptionalName(c.namespace); err != nil { return nil, err } return c.client.client.Get().AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Watch(ctx) } func (c *dynamicResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { if len(name) == 0 { return nil, fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } var out unstructured.Unstructured if err := c.client.client. Patch(pt). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(data). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) Apply(ctx context.Context, name string, obj *unstructured.Unstructured, opts metav1.ApplyOptions, subresources ...string) (*unstructured.Unstructured, error) { if len(name) == 0 { return nil, fmt.Errorf("name is required") } if err := validateNamespaceWithOptionalName(c.namespace, name); err != nil { return nil, err } accessor, err := meta.Accessor(obj) if err != nil { return nil, err } managedFields := accessor.GetManagedFields() if len(managedFields) > 0 { return nil, fmt.Errorf(`cannot apply an object with managed fields already set. Use the client-go/applyconfigurations "UnstructructuredExtractor" to obtain the unstructured ApplyConfiguration for the given field manager that you can use/modify here to apply`) } patchOpts := opts.ToPatchOptions() request, err := apply.NewRequest(c.client.client, obj.Object) if err != nil { return nil, err } var out unstructured.Unstructured if err := request. AbsPath(append(c.makeURLSegments(name), subresources...)...). SpecificallyVersionedParams(&patchOpts, dynamicParameterCodec, versionV1). Do(ctx).Into(&out); err != nil { return nil, err } return &out, nil } func (c *dynamicResourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, opts metav1.ApplyOptions) (*unstructured.Unstructured, error) { return c.Apply(ctx, name, obj, opts, "status") } func validateNamespaceWithOptionalName(namespace string, name ...string) error { if msgs := rest.IsValidPathSegmentName(namespace); len(msgs) != 0 { return fmt.Errorf("invalid namespace %q: %v", namespace, msgs) } if len(name) > 1 { panic("Invalid number of names") } else if len(name) == 1 { if msgs := rest.IsValidPathSegmentName(name[0]); len(msgs) != 0 { return fmt.Errorf("invalid resource name %q: %v", name[0], msgs) } } return nil } func (c *dynamicResourceClient) makeURLSegments(name string) []string { url := []string{} if len(c.resource.Group) == 0 { url = append(url, "api") } else { url = append(url, "apis", c.resource.Group) } url = append(url, c.resource.Version) if len(c.namespace) > 0 { url = append(url, "namespaces", c.namespace) } url = append(url, c.resource.Resource) if len(name) > 0 { url = append(url, name) } return url }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/dynamicinformer/interface.go
vendor/k8s.io/client-go/dynamic/dynamicinformer/interface.go
/* Copyright 2018 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. */ package dynamicinformer import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/informers" ) // DynamicSharedInformerFactory provides access to a shared informer and lister for dynamic client type DynamicSharedInformerFactory interface { // Start initializes all requested informers. They are handled in goroutines // which run until the stop channel gets closed. Start(stopCh <-chan struct{}) // ForResource gives generic access to a shared informer of the matching type. ForResource(gvr schema.GroupVersionResource) informers.GenericInformer // WaitForCacheSync blocks until all started informers' caches were synced // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[schema.GroupVersionResource]bool // Shutdown marks a factory as shutting down. At that point no new // informers can be started anymore and Start will return without // doing anything. // // In addition, Shutdown blocks until all goroutines have terminated. For that // to happen, the close channel(s) that they were started with must be closed, // either before Shutdown gets called or while it is waiting. // // Shutdown may be called multiple times, even concurrently. All such calls will // block until all goroutines have terminated. Shutdown() } // TweakListOptionsFunc defines the signature of a helper function // that wants to provide more listing options to API type TweakListOptionsFunc func(*metav1.ListOptions)
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/dynamicinformer/informer.go
vendor/k8s.io/client-go/dynamic/dynamicinformer/informer.go
/* Copyright 2018 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. */ package dynamicinformer import ( "context" "sync" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/dynamic" "k8s.io/client-go/dynamic/dynamiclister" "k8s.io/client-go/informers" "k8s.io/client-go/tools/cache" ) // NewDynamicSharedInformerFactory constructs a new instance of dynamicSharedInformerFactory for all namespaces. func NewDynamicSharedInformerFactory(client dynamic.Interface, defaultResync time.Duration) DynamicSharedInformerFactory { return NewFilteredDynamicSharedInformerFactory(client, defaultResync, metav1.NamespaceAll, nil) } // NewFilteredDynamicSharedInformerFactory constructs a new instance of dynamicSharedInformerFactory. // Listers obtained via this factory will be subject to the same filters as specified here. func NewFilteredDynamicSharedInformerFactory(client dynamic.Interface, defaultResync time.Duration, namespace string, tweakListOptions TweakListOptionsFunc) DynamicSharedInformerFactory { return &dynamicSharedInformerFactory{ client: client, defaultResync: defaultResync, namespace: namespace, informers: map[schema.GroupVersionResource]informers.GenericInformer{}, startedInformers: make(map[schema.GroupVersionResource]bool), tweakListOptions: tweakListOptions, } } type dynamicSharedInformerFactory struct { client dynamic.Interface defaultResync time.Duration namespace string lock sync.Mutex informers map[schema.GroupVersionResource]informers.GenericInformer // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[schema.GroupVersionResource]bool tweakListOptions TweakListOptionsFunc // wg tracks how many goroutines were started. wg sync.WaitGroup // shuttingDown is true when Shutdown has been called. It may still be running // because it needs to wait for goroutines. shuttingDown bool } var _ DynamicSharedInformerFactory = &dynamicSharedInformerFactory{} func (f *dynamicSharedInformerFactory) ForResource(gvr schema.GroupVersionResource) informers.GenericInformer { f.lock.Lock() defer f.lock.Unlock() key := gvr informer, exists := f.informers[key] if exists { return informer } informer = NewFilteredDynamicInformer(f.client, gvr, f.namespace, f.defaultResync, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) f.informers[key] = informer return informer } // Start initializes all requested informers. func (f *dynamicSharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() if f.shuttingDown { return } for informerType, informer := range f.informers { if !f.startedInformers[informerType] { f.wg.Add(1) // We need a new variable in each loop iteration, // otherwise the goroutine would use the loop variable // and that keeps changing. informer := informer.Informer() go func() { defer f.wg.Done() informer.Run(stopCh) }() f.startedInformers[informerType] = true } } } // WaitForCacheSync waits for all started informers' cache were synced. func (f *dynamicSharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[schema.GroupVersionResource]bool { informers := func() map[schema.GroupVersionResource]cache.SharedIndexInformer { f.lock.Lock() defer f.lock.Unlock() informers := map[schema.GroupVersionResource]cache.SharedIndexInformer{} for informerType, informer := range f.informers { if f.startedInformers[informerType] { informers[informerType] = informer.Informer() } } return informers }() res := map[schema.GroupVersionResource]bool{} for informType, informer := range informers { res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) } return res } func (f *dynamicSharedInformerFactory) Shutdown() { // Will return immediately if there is nothing to wait for. defer f.wg.Wait() f.lock.Lock() defer f.lock.Unlock() f.shuttingDown = true } // NewFilteredDynamicInformer constructs a new informer for a dynamic type. func NewFilteredDynamicInformer(client dynamic.Interface, gvr schema.GroupVersionResource, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions TweakListOptionsFunc) informers.GenericInformer { return &dynamicInformer{ gvr: gvr, informer: cache.NewSharedIndexInformerWithOptions( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.Resource(gvr).Namespace(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.Resource(gvr).Namespace(namespace).Watch(context.TODO(), options) }, }, &unstructured.Unstructured{}, cache.SharedIndexInformerOptions{ ResyncPeriod: resyncPeriod, Indexers: indexers, ObjectDescription: gvr.String(), }, ), } } type dynamicInformer struct { informer cache.SharedIndexInformer gvr schema.GroupVersionResource } var _ informers.GenericInformer = &dynamicInformer{} func (d *dynamicInformer) Informer() cache.SharedIndexInformer { return d.informer } func (d *dynamicInformer) Lister() cache.GenericLister { return dynamiclister.NewRuntimeObjectShim(dynamiclister.New(d.informer.GetIndexer(), d.gvr)) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/dynamiclister/shim.go
vendor/k8s.io/client-go/dynamic/dynamiclister/shim.go
/* Copyright 2018 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. */ package dynamiclister import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/cache" ) var _ cache.GenericLister = &dynamicListerShim{} var _ cache.GenericNamespaceLister = &dynamicNamespaceListerShim{} // dynamicListerShim implements the cache.GenericLister interface. type dynamicListerShim struct { lister Lister } // NewRuntimeObjectShim returns a new shim for Lister. // It wraps Lister so that it implements cache.GenericLister interface func NewRuntimeObjectShim(lister Lister) cache.GenericLister { return &dynamicListerShim{lister: lister} } // List will return all objects across namespaces func (s *dynamicListerShim) List(selector labels.Selector) (ret []runtime.Object, err error) { objs, err := s.lister.List(selector) if err != nil { return nil, err } ret = make([]runtime.Object, len(objs)) for index, obj := range objs { ret[index] = obj } return ret, err } // Get will attempt to retrieve assuming that name==key func (s *dynamicListerShim) Get(name string) (runtime.Object, error) { return s.lister.Get(name) } func (s *dynamicListerShim) ByNamespace(namespace string) cache.GenericNamespaceLister { return &dynamicNamespaceListerShim{ namespaceLister: s.lister.Namespace(namespace), } } // dynamicNamespaceListerShim implements the NamespaceLister interface. // It wraps NamespaceLister so that it implements cache.GenericNamespaceLister interface type dynamicNamespaceListerShim struct { namespaceLister NamespaceLister } // List will return all objects in this namespace func (ns *dynamicNamespaceListerShim) List(selector labels.Selector) (ret []runtime.Object, err error) { objs, err := ns.namespaceLister.List(selector) if err != nil { return nil, err } ret = make([]runtime.Object, len(objs)) for index, obj := range objs { ret[index] = obj } return ret, err } // Get will attempt to retrieve by namespace and name func (ns *dynamicNamespaceListerShim) Get(name string) (runtime.Object, error) { return ns.namespaceLister.Get(name) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/dynamiclister/interface.go
vendor/k8s.io/client-go/dynamic/dynamiclister/interface.go
/* Copyright 2018 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. */ package dynamiclister import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" ) // Lister helps list resources. type Lister interface { // List lists all resources in the indexer. List(selector labels.Selector) (ret []*unstructured.Unstructured, err error) // Get retrieves a resource from the indexer with the given name Get(name string) (*unstructured.Unstructured, error) // Namespace returns an object that can list and get resources in a given namespace. Namespace(namespace string) NamespaceLister } // NamespaceLister helps list and get resources. type NamespaceLister interface { // List lists all resources in the indexer for a given namespace. List(selector labels.Selector) (ret []*unstructured.Unstructured, err error) // Get retrieves a resource from the indexer for a given namespace and name. Get(name string) (*unstructured.Unstructured, error) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/dynamic/dynamiclister/lister.go
vendor/k8s.io/client-go/dynamic/dynamiclister/lister.go
/* Copyright 2018 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. */ package dynamiclister import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" ) var _ Lister = &dynamicLister{} var _ NamespaceLister = &dynamicNamespaceLister{} // dynamicLister implements the Lister interface. type dynamicLister struct { indexer cache.Indexer gvr schema.GroupVersionResource } // New returns a new Lister. func New(indexer cache.Indexer, gvr schema.GroupVersionResource) Lister { return &dynamicLister{indexer: indexer, gvr: gvr} } // List lists all resources in the indexer. func (l *dynamicLister) List(selector labels.Selector) (ret []*unstructured.Unstructured, err error) { err = cache.ListAll(l.indexer, selector, func(m interface{}) { ret = append(ret, m.(*unstructured.Unstructured)) }) return ret, err } // Get retrieves a resource from the indexer with the given name func (l *dynamicLister) Get(name string) (*unstructured.Unstructured, error) { obj, exists, err := l.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(l.gvr.GroupResource(), name) } return obj.(*unstructured.Unstructured), nil } // Namespace returns an object that can list and get resources from a given namespace. func (l *dynamicLister) Namespace(namespace string) NamespaceLister { return &dynamicNamespaceLister{indexer: l.indexer, namespace: namespace, gvr: l.gvr} } // dynamicNamespaceLister implements the NamespaceLister interface. type dynamicNamespaceLister struct { indexer cache.Indexer namespace string gvr schema.GroupVersionResource } // List lists all resources in the indexer for a given namespace. func (l *dynamicNamespaceLister) List(selector labels.Selector) (ret []*unstructured.Unstructured, err error) { err = cache.ListAllByNamespace(l.indexer, l.namespace, selector, func(m interface{}) { ret = append(ret, m.(*unstructured.Unstructured)) }) return ret, err } // Get retrieves a resource from the indexer for a given namespace and name. func (l *dynamicNamespaceLister) Get(name string) (*unstructured.Unstructured, error) { obj, exists, err := l.indexer.GetByKey(l.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(l.gvr.GroupResource(), name) } return obj.(*unstructured.Unstructured), nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/gentype/fake.go
vendor/k8s.io/client-go/gentype/fake.go
/* Copyright 2024 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. */ package gentype import ( "context" json "encoding/json" "fmt" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" ) // FakeClient represents a fake client type FakeClient[T objectWithMeta] struct { *testing.Fake ns string resource schema.GroupVersionResource kind schema.GroupVersionKind newObject func() T } // FakeClientWithList represents a fake client with support for lists. type FakeClientWithList[T objectWithMeta, L runtime.Object] struct { *FakeClient[T] alsoFakeLister[T, L] } // FakeClientWithApply represents a fake client with support for apply declarative configurations. type FakeClientWithApply[T objectWithMeta, C namedObject] struct { *FakeClient[T] alsoFakeApplier[T, C] } // FakeClientWithListAndApply represents a fake client with support for lists and apply declarative configurations. type FakeClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject] struct { *FakeClient[T] alsoFakeLister[T, L] alsoFakeApplier[T, C] } // Helper types for composition type alsoFakeLister[T objectWithMeta, L runtime.Object] struct { client *FakeClient[T] newList func() L copyListMeta func(L, L) getItems func(L) []T setItems func(L, []T) } type alsoFakeApplier[T objectWithMeta, C namedObject] struct { client *FakeClient[T] } // NewFakeClient constructs a fake client, namespaced or not, with no support for lists or apply. // Non-namespaced clients are constructed by passing an empty namespace (""). func NewFakeClient[T objectWithMeta]( fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, ) *FakeClient[T] { return &FakeClient[T]{fake, namespace, resource, kind, emptyObjectCreator} } // NewFakeClientWithList constructs a namespaced client with support for lists. func NewFakeClientWithList[T objectWithMeta, L runtime.Object]( fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, emptyListCreator func() L, listMetaCopier func(L, L), itemGetter func(L) []T, itemSetter func(L, []T), ) *FakeClientWithList[T, L] { fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) return &FakeClientWithList[T, L]{ fakeClient, alsoFakeLister[T, L]{fakeClient, emptyListCreator, listMetaCopier, itemGetter, itemSetter}, } } // NewFakeClientWithApply constructs a namespaced client with support for apply declarative configurations. func NewFakeClientWithApply[T objectWithMeta, C namedObject]( fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, ) *FakeClientWithApply[T, C] { fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) return &FakeClientWithApply[T, C]{ fakeClient, alsoFakeApplier[T, C]{fakeClient}, } } // NewFakeClientWithListAndApply constructs a client with support for lists and applying declarative configurations. func NewFakeClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject]( fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, emptyListCreator func() L, listMetaCopier func(L, L), itemGetter func(L) []T, itemSetter func(L, []T), ) *FakeClientWithListAndApply[T, L, C] { fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) return &FakeClientWithListAndApply[T, L, C]{ fakeClient, alsoFakeLister[T, L]{fakeClient, emptyListCreator, listMetaCopier, itemGetter, itemSetter}, alsoFakeApplier[T, C]{fakeClient}, } } // Get takes name of a resource, and returns the corresponding object, and an error if there is any. func (c *FakeClient[T]) Get(ctx context.Context, name string, options metav1.GetOptions) (T, error) { emptyResult := c.newObject() obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(c.resource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } func ToPointerSlice[T any](src []T) []*T { if src == nil { return nil } result := make([]*T, len(src)) for i := range src { result[i] = &src[i] } return result } func FromPointerSlice[T any](src []*T) []T { if src == nil { return nil } result := make([]T, len(src)) for i := range src { result[i] = *src[i] } return result } // List takes label and field selectors, and returns the list of resources that match those selectors. func (l *alsoFakeLister[T, L]) List(ctx context.Context, opts metav1.ListOptions) (result L, err error) { emptyResult := l.newList() obj, err := l.client.Fake. Invokes(testing.NewListActionWithOptions(l.client.resource, l.client.kind, l.client.ns, opts), emptyResult) if obj == nil { return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) if label == nil { // Everything matches return obj.(L), nil } list := l.newList() l.copyListMeta(list, obj.(L)) var items []T for _, item := range l.getItems(obj.(L)) { itemMeta, err := meta.Accessor(item) if err != nil { // No ObjectMeta, nothing can match continue } if label.Matches(labels.Set(itemMeta.GetLabels())) { items = append(items, item) } } l.setItems(list, items) return list, err } // Watch returns a watch.Interface that watches the requested resources. func (c *FakeClient[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchActionWithOptions(c.resource, c.ns, opts)) } // Create takes the representation of a resource and creates it. Returns the server's representation of the resource, and an error, if there is any. func (c *FakeClient[T]) Create(ctx context.Context, resource T, opts metav1.CreateOptions) (result T, err error) { emptyResult := c.newObject() obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(c.resource, c.ns, resource, opts), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } // Update takes the representation of a resource and updates it. Returns the server's representation of the resource, and an error, if there is any. func (c *FakeClient[T]) Update(ctx context.Context, resource T, opts metav1.UpdateOptions) (result T, err error) { emptyResult := c.newObject() obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(c.resource, c.ns, resource, opts), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } // UpdateStatus updates the resource's status and returns the updated resource. func (c *FakeClient[T]) UpdateStatus(ctx context.Context, resource T, opts metav1.UpdateOptions) (result T, err error) { emptyResult := c.newObject() obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceActionWithOptions(c.resource, "status", c.ns, resource, opts), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } // Delete deletes the resource matching the given name. Returns an error if one occurs. func (c *FakeClient[T]) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteActionWithOptions(c.resource, c.ns, name, opts), c.newObject()) return err } // DeleteCollection deletes a collection of objects. func (l *alsoFakeLister[T, L]) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { _, err := l.client.Fake. Invokes(testing.NewDeleteCollectionActionWithOptions(l.client.resource, l.client.ns, opts, listOpts), l.newList()) return err } // Patch applies the patch and returns the patched resource. func (c *FakeClient[T]) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result T, err error) { emptyResult := c.newObject() obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(c.resource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resource. func (a *alsoFakeApplier[T, C]) Apply(ctx context.Context, configuration C, opts metav1.ApplyOptions) (result T, err error) { if configuration == *new(C) { return *new(T), fmt.Errorf("configuration provided to Apply must not be nil") } data, err := json.Marshal(configuration) if err != nil { return *new(T), err } name := configuration.GetName() if name == nil { return *new(T), fmt.Errorf("configuration.Name must be provided to Apply") } emptyResult := a.client.newObject() obj, err := a.client.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(a.client.resource, a.client.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } // ApplyStatus applies the given apply declarative configuration to the resource's status and returns the updated resource. func (a *alsoFakeApplier[T, C]) ApplyStatus(ctx context.Context, configuration C, opts metav1.ApplyOptions) (result T, err error) { if configuration == *new(C) { return *new(T), fmt.Errorf("configuration provided to Apply must not be nil") } data, err := json.Marshal(configuration) if err != nil { return *new(T), err } name := configuration.GetName() if name == nil { return *new(T), fmt.Errorf("configuration.Name must be provided to Apply") } emptyResult := a.client.newObject() obj, err := a.client.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(a.client.resource, a.client.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) if obj == nil { return emptyResult, err } return obj.(T), err } func (c *FakeClient[T]) Namespace() string { return c.ns } func (c *FakeClient[T]) Kind() schema.GroupVersionKind { return c.kind } func (c *FakeClient[T]) Resource() schema.GroupVersionResource { return c.resource }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/gentype/type.go
vendor/k8s.io/client-go/gentype/type.go
/* Copyright 2024 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. */ package gentype import ( "context" "fmt" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" "k8s.io/client-go/util/apply" "k8s.io/client-go/util/consistencydetector" "k8s.io/client-go/util/watchlist" "k8s.io/klog/v2" ) // objectWithMeta matches objects implementing both runtime.Object and metav1.Object. type objectWithMeta interface { runtime.Object metav1.Object } // namedObject matches comparable objects implementing GetName(); it is intended for use with apply declarative configurations. type namedObject interface { comparable GetName() *string } // Client represents a client, optionally namespaced, with no support for lists or apply declarative configurations. type Client[T objectWithMeta] struct { resource string client rest.Interface namespace string // "" for non-namespaced clients newObject func() T parameterCodec runtime.ParameterCodec prefersProtobuf bool } // ClientWithList represents a client with support for lists. type ClientWithList[T objectWithMeta, L runtime.Object] struct { *Client[T] alsoLister[T, L] } // ClientWithApply represents a client with support for apply declarative configurations. type ClientWithApply[T objectWithMeta, C namedObject] struct { *Client[T] alsoApplier[T, C] } // ClientWithListAndApply represents a client with support for lists and apply declarative configurations. type ClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject] struct { *Client[T] alsoLister[T, L] alsoApplier[T, C] } // Helper types for composition type alsoLister[T objectWithMeta, L runtime.Object] struct { client *Client[T] newList func() L } type alsoApplier[T objectWithMeta, C namedObject] struct { client *Client[T] } type Option[T objectWithMeta] func(*Client[T]) func PrefersProtobuf[T objectWithMeta]() Option[T] { return func(c *Client[T]) { c.prefersProtobuf = true } } // NewClient constructs a client, namespaced or not, with no support for lists or apply. // Non-namespaced clients are constructed by passing an empty namespace (""). func NewClient[T objectWithMeta]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, options ...Option[T], ) *Client[T] { c := &Client[T]{ resource: resource, client: client, parameterCodec: parameterCodec, namespace: namespace, newObject: emptyObjectCreator, } for _, option := range options { option(c) } return c } // NewClientWithList constructs a namespaced client with support for lists. func NewClientWithList[T objectWithMeta, L runtime.Object]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, emptyListCreator func() L, options ...Option[T], ) *ClientWithList[T, L] { typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithList[T, L]{ typeClient, alsoLister[T, L]{typeClient, emptyListCreator}, } } // NewClientWithApply constructs a namespaced client with support for apply declarative configurations. func NewClientWithApply[T objectWithMeta, C namedObject]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, options ...Option[T], ) *ClientWithApply[T, C] { typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithApply[T, C]{ typeClient, alsoApplier[T, C]{typeClient}, } } // NewClientWithListAndApply constructs a client with support for lists and applying declarative configurations. func NewClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, emptyListCreator func() L, options ...Option[T], ) *ClientWithListAndApply[T, L, C] { typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithListAndApply[T, L, C]{ typeClient, alsoLister[T, L]{typeClient, emptyListCreator}, alsoApplier[T, C]{typeClient}, } } // GetClient returns the REST interface. func (c *Client[T]) GetClient() rest.Interface { return c.client } // GetNamespace returns the client's namespace, if any. func (c *Client[T]) GetNamespace() string { return c.namespace } // Get takes name of the resource, and returns the corresponding object, and an error if there is any. func (c *Client[T]) Get(ctx context.Context, name string, options metav1.GetOptions) (T, error) { result := c.newObject() err := c.client.Get(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). VersionedParams(&options, c.parameterCodec). Do(ctx). Into(result) return result, err } // List takes label and field selectors, and returns the list of resources that match those selectors. func (l *alsoLister[T, L]) List(ctx context.Context, opts metav1.ListOptions) (L, error) { if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil { klog.Warningf("Failed preparing watchlist options for $.type|resource$, falling back to the standard LIST semantics, err = %v", watchListOptionsErr) } else if hasWatchListOptionsPrepared { result, err := l.watchList(ctx, watchListOptions) if err == nil { consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for "+l.client.resource, l.list, opts, result) return result, nil } klog.Warningf("The watchlist request for %s ended with an error, falling back to the standard LIST semantics, err = %v", l.client.resource, err) } result, err := l.list(ctx, opts) if err == nil { consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for "+l.client.resource, l.list, opts, result) } return result, err } func (l *alsoLister[T, L]) list(ctx context.Context, opts metav1.ListOptions) (L, error) { list := l.newList() var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } err := l.client.client.Get(). UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&opts, l.client.parameterCodec). Timeout(timeout). Do(ctx). Into(list) return list, err } // watchList establishes a watch stream with the server and returns the list of resources. func (l *alsoLister[T, L]) watchList(ctx context.Context, opts metav1.ListOptions) (result L, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } result = l.newList() err = l.client.client.Get(). UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&opts, l.client.parameterCodec). Timeout(timeout). WatchList(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested resources. func (c *Client[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } opts.Watch = true return c.client.Get(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). VersionedParams(&opts, c.parameterCodec). Timeout(timeout). Watch(ctx) } // Create takes the representation of a resource and creates it. Returns the server's representation of the resource, and an error, if there is any. func (c *Client[T]) Create(ctx context.Context, obj T, opts metav1.CreateOptions) (T, error) { result := c.newObject() err := c.client.Post(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). VersionedParams(&opts, c.parameterCodec). Body(obj). Do(ctx). Into(result) return result, err } // Update takes the representation of a resource and updates it. Returns the server's representation of the resource, and an error, if there is any. func (c *Client[T]) Update(ctx context.Context, obj T, opts metav1.UpdateOptions) (T, error) { result := c.newObject() err := c.client.Put(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(obj.GetName()). VersionedParams(&opts, c.parameterCodec). Body(obj). Do(ctx). Into(result) return result, err } // UpdateStatus updates the status subresource of a resource. Returns the server's representation of the resource, and an error, if there is any. func (c *Client[T]) UpdateStatus(ctx context.Context, obj T, opts metav1.UpdateOptions) (T, error) { result := c.newObject() err := c.client.Put(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(obj.GetName()). SubResource("status"). VersionedParams(&opts, c.parameterCodec). Body(obj). Do(ctx). Into(result) return result, err } // Delete takes name of the resource and deletes it. Returns an error if one occurs. func (c *Client[T]) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). Body(&opts). Do(ctx). Error() } // DeleteCollection deletes a collection of objects. func (l *alsoLister[T, L]) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration if listOpts.TimeoutSeconds != nil { timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return l.client.client.Delete(). UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&listOpts, l.client.parameterCodec). Timeout(timeout). Body(&opts). Do(ctx). Error() } // Patch applies the patch and returns the patched resource. func (c *Client[T]) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (T, error) { result := c.newObject() err := c.client.Patch(pt). UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). SubResource(subresources...). VersionedParams(&opts, c.parameterCodec). Body(data). Do(ctx). Into(result) return result, err } // Apply takes the given apply declarative configuration, applies it and returns the applied resource. func (a *alsoApplier[T, C]) Apply(ctx context.Context, obj C, opts metav1.ApplyOptions) (T, error) { result := a.client.newObject() if obj == *new(C) { return *new(T), fmt.Errorf("object provided to Apply must not be nil") } patchOpts := opts.ToPatchOptions() if obj.GetName() == nil { return *new(T), fmt.Errorf("obj.Name must be provided to Apply") } request, err := apply.NewRequest(a.client.client, obj) if err != nil { return *new(T), err } err = request. UseProtobufAsDefaultIfPreferred(a.client.prefersProtobuf). NamespaceIfScoped(a.client.namespace, a.client.namespace != ""). Resource(a.client.resource). Name(*obj.GetName()). VersionedParams(&patchOpts, a.client.parameterCodec). Do(ctx). Into(result) return result, err } // Apply takes the given apply declarative configuration, applies it to the status subresource and returns the applied resource. func (a *alsoApplier[T, C]) ApplyStatus(ctx context.Context, obj C, opts metav1.ApplyOptions) (T, error) { if obj == *new(C) { return *new(T), fmt.Errorf("object provided to Apply must not be nil") } patchOpts := opts.ToPatchOptions() if obj.GetName() == nil { return *new(T), fmt.Errorf("obj.Name must be provided to Apply") } request, err := apply.NewRequest(a.client.client, obj) if err != nil { return *new(T), err } result := a.client.newObject() err = request. UseProtobufAsDefaultIfPreferred(a.client.prefersProtobuf). NamespaceIfScoped(a.client.namespace, a.client.namespace != ""). Resource(a.client.resource). Name(*obj.GetName()). SubResource("status"). VersionedParams(&patchOpts, a.client.parameterCodec). Do(ctx). Into(result) return result, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/features/features.go
vendor/k8s.io/client-go/features/features.go
/* Copyright 2024 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. */ package features import ( "errors" "sync/atomic" utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // NOTE: types Feature, FeatureSpec, prerelease (and its values) // were duplicated from the component-base repository // // for more information please refer to https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs const ( // Values for PreRelease. Alpha = prerelease("ALPHA") Beta = prerelease("BETA") GA = prerelease("") // Deprecated Deprecated = prerelease("DEPRECATED") ) type prerelease string type Feature string type FeatureSpec struct { // Default is the default enablement state for the feature Default bool // LockToDefault indicates that the feature is locked to its default and cannot be changed LockToDefault bool // PreRelease indicates the maturity level of the feature PreRelease prerelease } // Gates indicates whether a given feature is enabled or not. type Gates interface { // Enabled returns true if the key is enabled. Enabled(key Feature) bool } // Registry represents an external feature gates registry. type Registry interface { // Add adds existing feature gates to the provided registry. // // As of today, this method is used by AddFeaturesToExistingFeatureGates and // ReplaceFeatureGates to take control of the features exposed by this library. Add(map[Feature]FeatureSpec) error } // FeatureGates returns the feature gates exposed by this library. // // By default, only the default features gates will be returned. // The default implementation allows controlling the features // via environmental variables. // For example, if you have a feature named "MyFeature" // setting an environmental variable "KUBE_FEATURE_MyFeature" // will allow you to configure the state of that feature. // // Please note that the actual set of the feature gates // might be overwritten by calling ReplaceFeatureGates method. func FeatureGates() Gates { return featureGates.Load().(*featureGatesWrapper).Gates } // AddFeaturesToExistingFeatureGates adds the default feature gates to the provided registry. // Usually this function is combined with ReplaceFeatureGates to take control of the // features exposed by this library. func AddFeaturesToExistingFeatureGates(registry Registry) error { return registry.Add(defaultKubernetesFeatureGates) } // ReplaceFeatureGates overwrites the default implementation of the feature gates // used by this library. // // Useful for binaries that would like to have full control of the features // exposed by this library, such as allowing consumers of a binary // to interact with the features via a command line flag. // // For example: // // // first, register client-go's features to your registry. // clientgofeaturegate.AddFeaturesToExistingFeatureGates(utilfeature.DefaultMutableFeatureGate) // // then replace client-go's feature gates implementation with your implementation // clientgofeaturegate.ReplaceFeatureGates(utilfeature.DefaultMutableFeatureGate) func ReplaceFeatureGates(newFeatureGates Gates) { if replaceFeatureGatesWithWarningIndicator(newFeatureGates) { utilruntime.HandleError(errors.New("the default feature gates implementation has already been used and now it's being overwritten. This might lead to unexpected behaviour. Check your initialization order")) } } func replaceFeatureGatesWithWarningIndicator(newFeatureGates Gates) bool { shouldProduceWarning := false if defaultFeatureGates, ok := FeatureGates().(*envVarFeatureGates); ok { if defaultFeatureGates.hasAlreadyReadEnvVar() { shouldProduceWarning = true } } wrappedFeatureGates := &featureGatesWrapper{newFeatureGates} featureGates.Store(wrappedFeatureGates) return shouldProduceWarning } func init() { envVarGates := newEnvVarFeatureGates(defaultKubernetesFeatureGates) wrappedFeatureGates := &featureGatesWrapper{envVarGates} featureGates.Store(wrappedFeatureGates) } // featureGatesWrapper a thin wrapper to satisfy featureGates variable (atomic.Value). // That is, all calls to Store for a given Value must use values of the same concrete type. type featureGatesWrapper struct { Gates } var ( // featureGates is a shared global FeatureGates. // // Top-level commands/options setup that needs to modify this feature gates // should use AddFeaturesToExistingFeatureGates followed by ReplaceFeatureGates. featureGates = &atomic.Value{} )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/features/known_features.go
vendor/k8s.io/client-go/features/known_features.go
/* Copyright 2024 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. */ package features const ( // Every feature gate should add method here following this template: // // // owner: @username // // alpha: v1.4 // MyFeature featuregate.Feature = "MyFeature" // // Feature gates should be listed in alphabetical, case-sensitive // (upper before any lower case character) order. This reduces the risk // of code conflicts because changes are more likely to be scattered // across the file. // owner: @benluddy // kep: https://kep.k8s.io/4222 // alpha: 1.32 // // If disabled, clients configured to accept "application/cbor" will instead accept // "application/json" with the same relative preference, and clients configured to write // "application/cbor" or "application/apply-patch+cbor" will instead write // "application/json" or "application/apply-patch+yaml", respectively. ClientsAllowCBOR Feature = "ClientsAllowCBOR" // owner: @benluddy // kep: https://kep.k8s.io/4222 // alpha: 1.32 // // If enabled, and only if ClientsAllowCBOR is also enabled, the default request content // type (if not explicitly configured) and the dynamic client's request content type both // become "application/cbor" instead of "application/json". The default content type for // apply patch requests becomes "application/apply-patch+cbor" instead of // "application/apply-patch+yaml". ClientsPreferCBOR Feature = "ClientsPreferCBOR" // owner: @nilekhc // alpha: v1.30 InformerResourceVersion Feature = "InformerResourceVersion" // owner: @p0lyn0mial // beta: v1.30 // // Allow the client to get a stream of individual items instead of chunking from the server. // // NOTE: // The feature is disabled in Beta by default because // it will only be turned on for selected control plane component(s). WatchListClient Feature = "WatchListClient" ) // defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys. // // To add a new feature, define a key for it above and add it here. // After registering with the binary, the features are, by default, controllable using environment variables. // For more details, please see envVarFeatureGates implementation. var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{ ClientsAllowCBOR: {Default: false, PreRelease: Alpha}, ClientsPreferCBOR: {Default: false, PreRelease: Alpha}, InformerResourceVersion: {Default: false, PreRelease: Alpha}, WatchListClient: {Default: false, PreRelease: Beta}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/features/envvar.go
vendor/k8s.io/client-go/features/envvar.go
/* Copyright 2024 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. */ package features import ( "fmt" "os" "strconv" "sync" "sync/atomic" "k8s.io/apimachinery/pkg/util/naming" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/klog/v2" ) // internalPackages are packages that ignored when creating a name for featureGates. These packages are in the common // call chains, so they'd be unhelpful as names. var internalPackages = []string{"k8s.io/client-go/features/envvar.go"} var _ Gates = &envVarFeatureGates{} // newEnvVarFeatureGates creates a feature gate that allows for registration // of features and checking if the features are enabled. // // On the first call to Enabled, the effective state of all known features is loaded from // environment variables. The environment variable read for a given feature is formed by // concatenating the prefix "KUBE_FEATURE_" with the feature's name. // // For example, if you have a feature named "MyFeature" // setting an environmental variable "KUBE_FEATURE_MyFeature" // will allow you to configure the state of that feature. // // Please note that environmental variables can only be set to the boolean value. // Incorrect values will be ignored and logged. // // Features can also be set directly via the Set method. // In that case, these features take precedence over // features set via environmental variables. func newEnvVarFeatureGates(features map[Feature]FeatureSpec) *envVarFeatureGates { known := map[Feature]FeatureSpec{} for name, spec := range features { known[name] = spec } fg := &envVarFeatureGates{ callSiteName: naming.GetNameFromCallsite(internalPackages...), known: known, } fg.enabledViaEnvVar.Store(map[Feature]bool{}) fg.enabledViaSetMethod = map[Feature]bool{} return fg } // envVarFeatureGates implements Gates and allows for feature registration. type envVarFeatureGates struct { // callSiteName holds the name of the file // that created this instance callSiteName string // readEnvVarsOnce guards reading environmental variables readEnvVarsOnce sync.Once // known holds known feature gates known map[Feature]FeatureSpec // enabledViaEnvVar holds a map[Feature]bool // with values explicitly set via env var enabledViaEnvVar atomic.Value // lockEnabledViaSetMethod protects enabledViaSetMethod lockEnabledViaSetMethod sync.RWMutex // enabledViaSetMethod holds values explicitly set // via Set method, features stored in this map take // precedence over features stored in enabledViaEnvVar enabledViaSetMethod map[Feature]bool // readEnvVars holds the boolean value which // indicates whether readEnvVarsOnce has been called. readEnvVars atomic.Bool } // Enabled returns true if the key is enabled. If the key is not known, this call will panic. func (f *envVarFeatureGates) Enabled(key Feature) bool { if v, ok := f.wasFeatureEnabledViaSetMethod(key); ok { // ensue that the state of all known features // is loaded from environment variables // on the first call to Enabled method. if !f.hasAlreadyReadEnvVar() { _ = f.getEnabledMapFromEnvVar() } return v } if v, ok := f.getEnabledMapFromEnvVar()[key]; ok { return v } if v, ok := f.known[key]; ok { return v.Default } panic(fmt.Errorf("feature %q is not registered in FeatureGates %q", key, f.callSiteName)) } // Set sets the given feature to the given value. // // Features set via this method take precedence over // the features set via environment variables. func (f *envVarFeatureGates) Set(featureName Feature, featureValue bool) error { feature, ok := f.known[featureName] if !ok { return fmt.Errorf("feature %q is not registered in FeatureGates %q", featureName, f.callSiteName) } if feature.LockToDefault && feature.Default != featureValue { return fmt.Errorf("cannot set feature gate %q to %v, feature is locked to %v", featureName, featureValue, feature.Default) } f.lockEnabledViaSetMethod.Lock() defer f.lockEnabledViaSetMethod.Unlock() f.enabledViaSetMethod[featureName] = featureValue return nil } // getEnabledMapFromEnvVar will fill the enabled map on the first call. // This is the only time a known feature can be set to a value // read from the corresponding environmental variable. func (f *envVarFeatureGates) getEnabledMapFromEnvVar() map[Feature]bool { f.readEnvVarsOnce.Do(func() { featureGatesState := map[Feature]bool{} for feature, featureSpec := range f.known { featureState, featureStateSet := os.LookupEnv(fmt.Sprintf("KUBE_FEATURE_%s", feature)) if !featureStateSet { continue } boolVal, boolErr := strconv.ParseBool(featureState) switch { case boolErr != nil: utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, due to %v", feature, featureState, boolErr)) case featureSpec.LockToDefault: if boolVal != featureSpec.Default { utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, feature is locked to %v", feature, featureState, featureSpec.Default)) break } featureGatesState[feature] = featureSpec.Default default: featureGatesState[feature] = boolVal } } f.enabledViaEnvVar.Store(featureGatesState) f.readEnvVars.Store(true) for feature, featureSpec := range f.known { if featureState, ok := featureGatesState[feature]; ok { klog.V(1).InfoS("Feature gate updated state", "feature", feature, "enabled", featureState) continue } klog.V(1).InfoS("Feature gate default state", "feature", feature, "enabled", featureSpec.Default) } }) return f.enabledViaEnvVar.Load().(map[Feature]bool) } func (f *envVarFeatureGates) wasFeatureEnabledViaSetMethod(key Feature) (bool, bool) { f.lockEnabledViaSetMethod.RLock() defer f.lockEnabledViaSetMethod.RUnlock() value, found := f.enabledViaSetMethod[key] return value, found } func (f *envVarFeatureGates) hasAlreadyReadEnvVar() bool { return f.readEnvVars.Load() }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/utils.go
vendor/k8s.io/client-go/applyconfigurations/utils.go
/* 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 applyconfigurations import ( v1 "k8s.io/api/admissionregistration/v1" v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1beta1 "k8s.io/api/admissionregistration/v1beta1" apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" autoscalingv1 "k8s.io/api/autoscaling/v1" v2 "k8s.io/api/autoscaling/v2" v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" certificatesv1 "k8s.io/api/certificates/v1" certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" v1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1 "k8s.io/api/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" v1beta3 "k8s.io/api/flowcontrol/v1beta3" imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" networkingv1 "k8s.io/api/networking/v1" networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" nodev1beta1 "k8s.io/api/node/v1beta1" policyv1 "k8s.io/api/policy/v1" policyv1beta1 "k8s.io/api/policy/v1beta1" rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" v1alpha3 "k8s.io/api/resource/v1alpha3" resourcev1beta1 "k8s.io/api/resource/v1beta1" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" applyconfigurationsapiserverinternalv1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" applyconfigurationsappsv1 "k8s.io/client-go/applyconfigurations/apps/v1" applyconfigurationsappsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" autoscalingv2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" autoscalingv2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" applyconfigurationsbatchv1 "k8s.io/client-go/applyconfigurations/batch/v1" applyconfigurationsbatchv1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" applyconfigurationscertificatesv1 "k8s.io/client-go/applyconfigurations/certificates/v1" applyconfigurationscertificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1" applyconfigurationscertificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" applyconfigurationscoordinationv1 "k8s.io/client-go/applyconfigurations/coordination/v1" coordinationv1alpha2 "k8s.io/client-go/applyconfigurations/coordination/v1alpha2" applyconfigurationscoordinationv1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" applyconfigurationsdiscoveryv1 "k8s.io/client-go/applyconfigurations/discovery/v1" applyconfigurationsdiscoveryv1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" applyconfigurationseventsv1 "k8s.io/client-go/applyconfigurations/events/v1" applyconfigurationseventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" applyconfigurationsflowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1" applyconfigurationsflowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" applyconfigurationsflowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3" applyconfigurationsimagepolicyv1alpha1 "k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1" internal "k8s.io/client-go/applyconfigurations/internal" applyconfigurationsmetav1 "k8s.io/client-go/applyconfigurations/meta/v1" applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" applyconfigurationsnetworkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" applyconfigurationsnetworkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" applyconfigurationsnodev1 "k8s.io/client-go/applyconfigurations/node/v1" applyconfigurationsnodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" applyconfigurationsnodev1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" applyconfigurationspolicyv1 "k8s.io/client-go/applyconfigurations/policy/v1" applyconfigurationspolicyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1" applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" applyconfigurationsstoragev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" applyconfigurationsstoragev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" applyconfigurationsstoragemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" testing "k8s.io/client-go/testing" ) // ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no // apply configuration type exists for the given GroupVersionKind. func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { // Group=admissionregistration.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithKind("AuditAnnotation"): return &admissionregistrationv1.AuditAnnotationApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ExpressionWarning"): return &admissionregistrationv1.ExpressionWarningApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("MatchCondition"): return &admissionregistrationv1.MatchConditionApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("MatchResources"): return &admissionregistrationv1.MatchResourcesApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("MutatingWebhook"): return &admissionregistrationv1.MutatingWebhookApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("MutatingWebhookConfiguration"): return &admissionregistrationv1.MutatingWebhookConfigurationApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("NamedRuleWithOperations"): return &admissionregistrationv1.NamedRuleWithOperationsApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ParamKind"): return &admissionregistrationv1.ParamKindApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ParamRef"): return &admissionregistrationv1.ParamRefApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("Rule"): return &admissionregistrationv1.RuleApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("RuleWithOperations"): return &admissionregistrationv1.RuleWithOperationsApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ServiceReference"): return &admissionregistrationv1.ServiceReferenceApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("TypeChecking"): return &admissionregistrationv1.TypeCheckingApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicy"): return &admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBinding"): return &admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBindingSpec"): return &admissionregistrationv1.ValidatingAdmissionPolicyBindingSpecApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicySpec"): return &admissionregistrationv1.ValidatingAdmissionPolicySpecApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyStatus"): return &admissionregistrationv1.ValidatingAdmissionPolicyStatusApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingWebhook"): return &admissionregistrationv1.ValidatingWebhookApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ValidatingWebhookConfiguration"): return &admissionregistrationv1.ValidatingWebhookConfigurationApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("Validation"): return &admissionregistrationv1.ValidationApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("Variable"): return &admissionregistrationv1.VariableApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("WebhookClientConfig"): return &admissionregistrationv1.WebhookClientConfigApplyConfiguration{} // Group=admissionregistration.k8s.io, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithKind("ApplyConfiguration"): return &admissionregistrationv1alpha1.ApplyConfigurationApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("AuditAnnotation"): return &admissionregistrationv1alpha1.AuditAnnotationApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ExpressionWarning"): return &admissionregistrationv1alpha1.ExpressionWarningApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("JSONPatch"): return &admissionregistrationv1alpha1.JSONPatchApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MatchCondition"): return &admissionregistrationv1alpha1.MatchConditionApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MatchResources"): return &admissionregistrationv1alpha1.MatchResourcesApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicy"): return &admissionregistrationv1alpha1.MutatingAdmissionPolicyApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicyBinding"): return &admissionregistrationv1alpha1.MutatingAdmissionPolicyBindingApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicyBindingSpec"): return &admissionregistrationv1alpha1.MutatingAdmissionPolicyBindingSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicySpec"): return &admissionregistrationv1alpha1.MutatingAdmissionPolicySpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Mutation"): return &admissionregistrationv1alpha1.MutationApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NamedRuleWithOperations"): return &admissionregistrationv1alpha1.NamedRuleWithOperationsApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ParamKind"): return &admissionregistrationv1alpha1.ParamKindApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ParamRef"): return &admissionregistrationv1alpha1.ParamRefApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("TypeChecking"): return &admissionregistrationv1alpha1.TypeCheckingApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicy"): return &admissionregistrationv1alpha1.ValidatingAdmissionPolicyApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBinding"): return &admissionregistrationv1alpha1.ValidatingAdmissionPolicyBindingApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBindingSpec"): return &admissionregistrationv1alpha1.ValidatingAdmissionPolicyBindingSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicySpec"): return &admissionregistrationv1alpha1.ValidatingAdmissionPolicySpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyStatus"): return &admissionregistrationv1alpha1.ValidatingAdmissionPolicyStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Validation"): return &admissionregistrationv1alpha1.ValidationApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Variable"): return &admissionregistrationv1alpha1.VariableApplyConfiguration{} // Group=admissionregistration.k8s.io, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithKind("AuditAnnotation"): return &admissionregistrationv1beta1.AuditAnnotationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ExpressionWarning"): return &admissionregistrationv1beta1.ExpressionWarningApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("MatchCondition"): return &admissionregistrationv1beta1.MatchConditionApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("MatchResources"): return &admissionregistrationv1beta1.MatchResourcesApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("MutatingWebhook"): return &admissionregistrationv1beta1.MutatingWebhookApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("MutatingWebhookConfiguration"): return &admissionregistrationv1beta1.MutatingWebhookConfigurationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("NamedRuleWithOperations"): return &admissionregistrationv1beta1.NamedRuleWithOperationsApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ParamKind"): return &admissionregistrationv1beta1.ParamKindApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ParamRef"): return &admissionregistrationv1beta1.ParamRefApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ServiceReference"): return &admissionregistrationv1beta1.ServiceReferenceApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("TypeChecking"): return &admissionregistrationv1beta1.TypeCheckingApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicy"): return &admissionregistrationv1beta1.ValidatingAdmissionPolicyApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBinding"): return &admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBindingSpec"): return &admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingSpecApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicySpec"): return &admissionregistrationv1beta1.ValidatingAdmissionPolicySpecApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyStatus"): return &admissionregistrationv1beta1.ValidatingAdmissionPolicyStatusApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingWebhook"): return &admissionregistrationv1beta1.ValidatingWebhookApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ValidatingWebhookConfiguration"): return &admissionregistrationv1beta1.ValidatingWebhookConfigurationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("Validation"): return &admissionregistrationv1beta1.ValidationApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("Variable"): return &admissionregistrationv1beta1.VariableApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("WebhookClientConfig"): return &admissionregistrationv1beta1.WebhookClientConfigApplyConfiguration{} // Group=apps, Version=v1 case appsv1.SchemeGroupVersion.WithKind("ControllerRevision"): return &applyconfigurationsappsv1.ControllerRevisionApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DaemonSet"): return &applyconfigurationsappsv1.DaemonSetApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DaemonSetCondition"): return &applyconfigurationsappsv1.DaemonSetConditionApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DaemonSetSpec"): return &applyconfigurationsappsv1.DaemonSetSpecApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DaemonSetStatus"): return &applyconfigurationsappsv1.DaemonSetStatusApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DaemonSetUpdateStrategy"): return &applyconfigurationsappsv1.DaemonSetUpdateStrategyApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("Deployment"): return &applyconfigurationsappsv1.DeploymentApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DeploymentCondition"): return &applyconfigurationsappsv1.DeploymentConditionApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DeploymentSpec"): return &applyconfigurationsappsv1.DeploymentSpecApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DeploymentStatus"): return &applyconfigurationsappsv1.DeploymentStatusApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("DeploymentStrategy"): return &applyconfigurationsappsv1.DeploymentStrategyApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("ReplicaSet"): return &applyconfigurationsappsv1.ReplicaSetApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("ReplicaSetCondition"): return &applyconfigurationsappsv1.ReplicaSetConditionApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("ReplicaSetSpec"): return &applyconfigurationsappsv1.ReplicaSetSpecApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("ReplicaSetStatus"): return &applyconfigurationsappsv1.ReplicaSetStatusApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("RollingUpdateDaemonSet"): return &applyconfigurationsappsv1.RollingUpdateDaemonSetApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("RollingUpdateDeployment"): return &applyconfigurationsappsv1.RollingUpdateDeploymentApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("RollingUpdateStatefulSetStrategy"): return &applyconfigurationsappsv1.RollingUpdateStatefulSetStrategyApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSet"): return &applyconfigurationsappsv1.StatefulSetApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetCondition"): return &applyconfigurationsappsv1.StatefulSetConditionApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetOrdinals"): return &applyconfigurationsappsv1.StatefulSetOrdinalsApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetPersistentVolumeClaimRetentionPolicy"): return &applyconfigurationsappsv1.StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetSpec"): return &applyconfigurationsappsv1.StatefulSetSpecApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetStatus"): return &applyconfigurationsappsv1.StatefulSetStatusApplyConfiguration{} case appsv1.SchemeGroupVersion.WithKind("StatefulSetUpdateStrategy"): return &applyconfigurationsappsv1.StatefulSetUpdateStrategyApplyConfiguration{} // Group=apps, Version=v1beta1 case appsv1beta1.SchemeGroupVersion.WithKind("ControllerRevision"): return &applyconfigurationsappsv1beta1.ControllerRevisionApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("Deployment"): return &applyconfigurationsappsv1beta1.DeploymentApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("DeploymentCondition"): return &applyconfigurationsappsv1beta1.DeploymentConditionApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("DeploymentSpec"): return &applyconfigurationsappsv1beta1.DeploymentSpecApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("DeploymentStatus"): return &applyconfigurationsappsv1beta1.DeploymentStatusApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("DeploymentStrategy"): return &applyconfigurationsappsv1beta1.DeploymentStrategyApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("RollbackConfig"): return &applyconfigurationsappsv1beta1.RollbackConfigApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("RollingUpdateDeployment"): return &applyconfigurationsappsv1beta1.RollingUpdateDeploymentApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("RollingUpdateStatefulSetStrategy"): return &applyconfigurationsappsv1beta1.RollingUpdateStatefulSetStrategyApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSet"): return &applyconfigurationsappsv1beta1.StatefulSetApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetCondition"): return &applyconfigurationsappsv1beta1.StatefulSetConditionApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetOrdinals"): return &applyconfigurationsappsv1beta1.StatefulSetOrdinalsApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetPersistentVolumeClaimRetentionPolicy"): return &applyconfigurationsappsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetSpec"): return &applyconfigurationsappsv1beta1.StatefulSetSpecApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetStatus"): return &applyconfigurationsappsv1beta1.StatefulSetStatusApplyConfiguration{} case appsv1beta1.SchemeGroupVersion.WithKind("StatefulSetUpdateStrategy"): return &applyconfigurationsappsv1beta1.StatefulSetUpdateStrategyApplyConfiguration{} // Group=apps, Version=v1beta2 case v1beta2.SchemeGroupVersion.WithKind("ControllerRevision"): return &appsv1beta2.ControllerRevisionApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DaemonSet"): return &appsv1beta2.DaemonSetApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DaemonSetCondition"): return &appsv1beta2.DaemonSetConditionApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DaemonSetSpec"): return &appsv1beta2.DaemonSetSpecApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DaemonSetStatus"): return &appsv1beta2.DaemonSetStatusApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DaemonSetUpdateStrategy"): return &appsv1beta2.DaemonSetUpdateStrategyApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("Deployment"): return &appsv1beta2.DeploymentApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DeploymentCondition"): return &appsv1beta2.DeploymentConditionApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DeploymentSpec"): return &appsv1beta2.DeploymentSpecApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DeploymentStatus"): return &appsv1beta2.DeploymentStatusApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("DeploymentStrategy"): return &appsv1beta2.DeploymentStrategyApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("ReplicaSet"): return &appsv1beta2.ReplicaSetApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("ReplicaSetCondition"): return &appsv1beta2.ReplicaSetConditionApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("ReplicaSetSpec"): return &appsv1beta2.ReplicaSetSpecApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("ReplicaSetStatus"): return &appsv1beta2.ReplicaSetStatusApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("RollingUpdateDaemonSet"): return &appsv1beta2.RollingUpdateDaemonSetApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("RollingUpdateDeployment"): return &appsv1beta2.RollingUpdateDeploymentApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("RollingUpdateStatefulSetStrategy"): return &appsv1beta2.RollingUpdateStatefulSetStrategyApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("Scale"): return &appsv1beta2.ScaleApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSet"): return &appsv1beta2.StatefulSetApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetCondition"): return &appsv1beta2.StatefulSetConditionApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetOrdinals"): return &appsv1beta2.StatefulSetOrdinalsApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetPersistentVolumeClaimRetentionPolicy"): return &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicyApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetSpec"): return &appsv1beta2.StatefulSetSpecApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetStatus"): return &appsv1beta2.StatefulSetStatusApplyConfiguration{} case v1beta2.SchemeGroupVersion.WithKind("StatefulSetUpdateStrategy"): return &appsv1beta2.StatefulSetUpdateStrategyApplyConfiguration{} // Group=autoscaling, Version=v1 case autoscalingv1.SchemeGroupVersion.WithKind("CrossVersionObjectReference"): return &applyconfigurationsautoscalingv1.CrossVersionObjectReferenceApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"): return &applyconfigurationsautoscalingv1.HorizontalPodAutoscalerApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerSpec"): return &applyconfigurationsautoscalingv1.HorizontalPodAutoscalerSpecApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerStatus"): return &applyconfigurationsautoscalingv1.HorizontalPodAutoscalerStatusApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("Scale"): return &applyconfigurationsautoscalingv1.ScaleApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("ScaleSpec"): return &applyconfigurationsautoscalingv1.ScaleSpecApplyConfiguration{} case autoscalingv1.SchemeGroupVersion.WithKind("ScaleStatus"): return &applyconfigurationsautoscalingv1.ScaleStatusApplyConfiguration{} // Group=autoscaling, Version=v2 case v2.SchemeGroupVersion.WithKind("ContainerResourceMetricSource"): return &autoscalingv2.ContainerResourceMetricSourceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ContainerResourceMetricStatus"): return &autoscalingv2.ContainerResourceMetricStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("CrossVersionObjectReference"): return &autoscalingv2.CrossVersionObjectReferenceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ExternalMetricSource"): return &autoscalingv2.ExternalMetricSourceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ExternalMetricStatus"): return &autoscalingv2.ExternalMetricStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"): return &autoscalingv2.HorizontalPodAutoscalerApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerBehavior"): return &autoscalingv2.HorizontalPodAutoscalerBehaviorApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerCondition"): return &autoscalingv2.HorizontalPodAutoscalerConditionApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerSpec"): return &autoscalingv2.HorizontalPodAutoscalerSpecApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerStatus"): return &autoscalingv2.HorizontalPodAutoscalerStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HPAScalingPolicy"): return &autoscalingv2.HPAScalingPolicyApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("HPAScalingRules"): return &autoscalingv2.HPAScalingRulesApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("MetricIdentifier"): return &autoscalingv2.MetricIdentifierApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("MetricSpec"): return &autoscalingv2.MetricSpecApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("MetricStatus"): return &autoscalingv2.MetricStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("MetricTarget"): return &autoscalingv2.MetricTargetApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("MetricValueStatus"): return &autoscalingv2.MetricValueStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ObjectMetricSource"): return &autoscalingv2.ObjectMetricSourceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ObjectMetricStatus"): return &autoscalingv2.ObjectMetricStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("PodsMetricSource"): return &autoscalingv2.PodsMetricSourceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("PodsMetricStatus"): return &autoscalingv2.PodsMetricStatusApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ResourceMetricSource"): return &autoscalingv2.ResourceMetricSourceApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ResourceMetricStatus"): return &autoscalingv2.ResourceMetricStatusApplyConfiguration{} // Group=autoscaling, Version=v2beta1 case v2beta1.SchemeGroupVersion.WithKind("ContainerResourceMetricSource"): return &autoscalingv2beta1.ContainerResourceMetricSourceApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("ContainerResourceMetricStatus"): return &autoscalingv2beta1.ContainerResourceMetricStatusApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("CrossVersionObjectReference"): return &autoscalingv2beta1.CrossVersionObjectReferenceApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("ExternalMetricSource"): return &autoscalingv2beta1.ExternalMetricSourceApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("ExternalMetricStatus"): return &autoscalingv2beta1.ExternalMetricStatusApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"): return &autoscalingv2beta1.HorizontalPodAutoscalerApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerCondition"): return &autoscalingv2beta1.HorizontalPodAutoscalerConditionApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerSpec"): return &autoscalingv2beta1.HorizontalPodAutoscalerSpecApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerStatus"): return &autoscalingv2beta1.HorizontalPodAutoscalerStatusApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("MetricSpec"): return &autoscalingv2beta1.MetricSpecApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("MetricStatus"): return &autoscalingv2beta1.MetricStatusApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("ObjectMetricSource"): return &autoscalingv2beta1.ObjectMetricSourceApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("ObjectMetricStatus"): return &autoscalingv2beta1.ObjectMetricStatusApplyConfiguration{} case v2beta1.SchemeGroupVersion.WithKind("PodsMetricSource"):
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/doc.go
vendor/k8s.io/client-go/applyconfigurations/doc.go
/* Copyright 2021 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. */ /* Package applyconfigurations provides typesafe go representations of the apply configurations that are used to constructs Server-side Apply requests. # Basics The Apply functions in the typed client (see the k8s.io/client-go/kubernetes/typed packages) offer a direct and typesafe way of calling Server-side Apply. Each Apply function takes an "apply configuration" type as an argument, which is a structured representation of an Apply request. For example: import ( ... v1ac "k8s.io/client-go/applyconfigurations/autoscaling/v1" ) hpaApplyConfig := v1ac.HorizontalPodAutoscaler(autoscalerName, ns). WithSpec(v1ac.HorizontalPodAutoscalerSpec(). WithMinReplicas(0) ) return hpav1client.Apply(ctx, hpaApplyConfig, metav1.ApplyOptions{FieldManager: "mycontroller", Force: true}) Note in this example that HorizontalPodAutoscaler is imported from an "applyconfigurations" package. Each "apply configuration" type represents the same Kubernetes object kind as the corresponding go struct, but where all fields are pointers to make them optional, allowing apply requests to be accurately represented. For example, this when the apply configuration in the above example is marshalled to YAML, it produces: apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: myHPA namespace: myNamespace spec: minReplicas: 0 To understand why this is needed, the above YAML cannot be produced by the v1.HorizontalPodAutoscaler go struct. Take for example: hpa := v1.HorizontalPodAutoscaler{ TypeMeta: metav1.TypeMeta{ APIVersion: "autoscaling/v1", Kind: "HorizontalPodAutoscaler", }, ObjectMeta: ObjectMeta{ Namespace: ns, Name: autoscalerName, }, Spec: v1.HorizontalPodAutoscalerSpec{ MinReplicas: pointer.Int32Ptr(0), }, } The above code attempts to declare the same apply configuration as shown in the previous examples, but when marshalled to YAML, produces: kind: HorizontalPodAutoscaler apiVersion: autoscaling/v1 metadata: name: myHPA namespace: myNamespace creationTimestamp: null spec: scaleTargetRef: kind: "" name: "" minReplicas: 0 maxReplicas: 0 Which, among other things, contains spec.maxReplicas set to 0. This is almost certainly not what the caller intended (the intended apply configuration says nothing about the maxReplicas field), and could have serious consequences on a production system: it directs the autoscaler to downscale to zero pods. The problem here originates from the fact that the go structs contain required fields that are zero valued if not set explicitly. The go structs work as intended for create and update operations, but are fundamentally incompatible with apply, which is why we have introduced the generated "apply configuration" types. The "apply configurations" also have convenience With<FieldName> functions that make it easier to build apply requests. This allows developers to set fields without having to deal with the fact that all the fields in the "apply configuration" types are pointers, and are inconvenient to set using go. For example "MinReplicas: &0" is not legal go code, so without the With functions, developers would work around this problem by using a library, .e.g. "MinReplicas: pointer.Int32Ptr(0)", but string enumerations like corev1.Protocol are still a problem since they cannot be supported by a general purpose library. In addition to the convenience, the With functions also isolate developers from the underlying representation, which makes it safer for the underlying representation to be changed to support additional features in the future. # Controller Support The new client-go support makes it much easier to use Server-side Apply in controllers, by either of two mechanisms. Mechanism 1: When authoring new controllers to use Server-side Apply, a good approach is to have the controller recreate the apply configuration for an object each time it reconciles that object. This ensures that the controller fully reconciles all the fields that it is responsible for. Controllers typically should unconditionally set all the fields they own by setting "Force: true" in the ApplyOptions. Controllers must also provide a FieldManager name that is unique to the reconciliation loop that apply is called from. When upgrading existing controllers to use Server-side Apply the same approach often works well--migrate the controllers to recreate the apply configuration each time it reconciles any object. For cases where this does not work well, see Mechanism 2. Mechanism 2: When upgrading existing controllers to use Server-side Apply, the controller might have multiple code paths that update different parts of an object depending on various conditions. Migrating a controller like this to Server-side Apply can be risky because if the controller forgets to include any fields in an apply configuration that is included in a previous apply request, a field can be accidentally deleted. For such cases, an alternative to mechanism 1 is to replace any controller reconciliation code that performs a "read/modify-in-place/update" (or patch) workflow with a "extract/modify-in-place/apply" workflow. Here's an example of the new workflow: fieldMgr := "my-field-manager" deploymentClient := clientset.AppsV1().Deployments("default") // read, could also be read from a shared informer deployment, err := deploymentClient.Get(ctx, "example-deployment", metav1.GetOptions{}) if err != nil { // handle error } // extract deploymentApplyConfig, err := appsv1ac.ExtractDeployment(deployment, fieldMgr) if err != nil { // handle error } // modify-in-place deploymentApplyConfig.Spec.Template.Spec.WithContainers(corev1ac.Container(). WithName("modify-slice"). WithImage("nginx:1.14.2"), ) // apply applied, err := deploymentClient.Apply(ctx, extractedDeployment, metav1.ApplyOptions{FieldManager: fieldMgr}) */ package applyconfigurations // import "k8s.io/client-go/applyconfigurations"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobstatus.go
/* 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 ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use // with apply. type JobStatusApplyConfiguration struct { Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` CompletionTime *metav1.Time `json:"completionTime,omitempty"` Active *int32 `json:"active,omitempty"` Succeeded *int32 `json:"succeeded,omitempty"` Failed *int32 `json:"failed,omitempty"` Terminating *int32 `json:"terminating,omitempty"` CompletedIndexes *string `json:"completedIndexes,omitempty"` FailedIndexes *string `json:"failedIndexes,omitempty"` UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"` Ready *int32 `json:"ready,omitempty"` } // JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with // apply. func JobStatus() *JobStatusApplyConfiguration { return &JobStatusApplyConfiguration{} } // 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 *JobStatusApplyConfiguration) WithConditions(values ...*JobConditionApplyConfiguration) *JobStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") } b.Conditions = append(b.Conditions, *values[i]) } return b } // WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithStartTime(value metav1.Time) *JobStatusApplyConfiguration { b.StartTime = &value return b } // WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithCompletionTime(value metav1.Time) *JobStatusApplyConfiguration { b.CompletionTime = &value return b } // WithActive sets the Active 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 Active field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithActive(value int32) *JobStatusApplyConfiguration { b.Active = &value return b } // WithSucceeded sets the Succeeded 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 Succeeded field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithSucceeded(value int32) *JobStatusApplyConfiguration { b.Succeeded = &value return b } // WithFailed sets the Failed 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 Failed field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithFailed(value int32) *JobStatusApplyConfiguration { b.Failed = &value return b } // WithTerminating sets the Terminating 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 Terminating field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithTerminating(value int32) *JobStatusApplyConfiguration { b.Terminating = &value return b } // WithCompletedIndexes sets the CompletedIndexes 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 CompletedIndexes field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration { b.CompletedIndexes = &value return b } // WithFailedIndexes sets the FailedIndexes 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 FailedIndexes field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithFailedIndexes(value string) *JobStatusApplyConfiguration { b.FailedIndexes = &value return b } // WithUncountedTerminatedPods sets the UncountedTerminatedPods 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 UncountedTerminatedPods field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *UncountedTerminatedPodsApplyConfiguration) *JobStatusApplyConfiguration { b.UncountedTerminatedPods = value return b } // WithReady sets the Ready 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 Ready field is set to the value of the last call. func (b *JobStatusApplyConfiguration) WithReady(value int32) *JobStatusApplyConfiguration { b.Ready = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go
/* 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 // SuccessPolicyRuleApplyConfiguration represents a declarative configuration of the SuccessPolicyRule type for use // with apply. type SuccessPolicyRuleApplyConfiguration struct { SucceededIndexes *string `json:"succeededIndexes,omitempty"` SucceededCount *int32 `json:"succeededCount,omitempty"` } // SuccessPolicyRuleApplyConfiguration constructs a declarative configuration of the SuccessPolicyRule type for use with // apply. func SuccessPolicyRule() *SuccessPolicyRuleApplyConfiguration { return &SuccessPolicyRuleApplyConfiguration{} } // WithSucceededIndexes sets the SucceededIndexes 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 SucceededIndexes field is set to the value of the last call. func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededIndexes(value string) *SuccessPolicyRuleApplyConfiguration { b.SucceededIndexes = &value return b } // WithSucceededCount sets the SucceededCount 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 SucceededCount field is set to the value of the last call. func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededCount(value int32) *SuccessPolicyRuleApplyConfiguration { b.SucceededCount = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonpodconditionspattern.go
/* 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 ( corev1 "k8s.io/api/core/v1" ) // PodFailurePolicyOnPodConditionsPatternApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use // with apply. type PodFailurePolicyOnPodConditionsPatternApplyConfiguration struct { Type *corev1.PodConditionType `json:"type,omitempty"` Status *corev1.ConditionStatus `json:"status,omitempty"` } // PodFailurePolicyOnPodConditionsPatternApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnPodConditionsPattern type for use with // apply. func PodFailurePolicyOnPodConditionsPattern() *PodFailurePolicyOnPodConditionsPatternApplyConfiguration { return &PodFailurePolicyOnPodConditionsPatternApplyConfiguration{} } // WithType sets the Type 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 Type field is set to the value of the last call. func (b *PodFailurePolicyOnPodConditionsPatternApplyConfiguration) WithType(value corev1.PodConditionType) *PodFailurePolicyOnPodConditionsPatternApplyConfiguration { b.Type = &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 *PodFailurePolicyOnPodConditionsPatternApplyConfiguration) WithStatus(value corev1.ConditionStatus) *PodFailurePolicyOnPodConditionsPatternApplyConfiguration { b.Status = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // JobApplyConfiguration represents a declarative configuration of the Job type for use // with apply. type JobApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` Status *JobStatusApplyConfiguration `json:"status,omitempty"` } // Job constructs a declarative configuration of the Job type for use with // apply. func Job(name, namespace string) *JobApplyConfiguration { b := &JobApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("Job") b.WithAPIVersion("batch/v1") return b } // ExtractJob extracts the applied configuration owned by fieldManager from // job. If no managedFields are found in job for fieldManager, a // JobApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // job must be a unmodified Job API object that was retrieved from the Kubernetes API. // ExtractJob provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractJob(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error) { return extractJob(job, fieldManager, "") } // ExtractJobStatus is the same as ExtractJob except // that it extracts the status subresource applied configuration. // Experimental! func ExtractJobStatus(job *batchv1.Job, fieldManager string) (*JobApplyConfiguration, error) { return extractJob(job, fieldManager, "status") } func extractJob(job *batchv1.Job, fieldManager string, subresource string) (*JobApplyConfiguration, error) { b := &JobApplyConfiguration{} err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(job.Name) b.WithNamespace(job.Namespace) b.WithKind("Job") b.WithAPIVersion("batch/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *JobApplyConfiguration) WithKind(value string) *JobApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *JobApplyConfiguration) WithAPIVersion(value string) *JobApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *JobApplyConfiguration) WithName(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *JobApplyConfiguration) WithGenerateName(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *JobApplyConfiguration) WithUID(value types.UID) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *JobApplyConfiguration) WithResourceVersion(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *JobApplyConfiguration) WithGeneration(value int64) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *JobApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *JobApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *JobApplyConfiguration) WithLabels(entries map[string]string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *JobApplyConfiguration) WithAnnotations(entries map[string]string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *JobApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *JobApplyConfiguration) WithFinalizers(values ...string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *JobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *JobApplyConfiguration) WithSpec(value *JobSpecApplyConfiguration) *JobApplyConfiguration { 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 *JobApplyConfiguration) WithStatus(value *JobStatusApplyConfiguration) *JobApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/client-go/applyconfigurations/core/v1" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // JobSpecApplyConfiguration represents a declarative configuration of the JobSpec type for use // with apply. type JobSpecApplyConfiguration struct { Parallelism *int32 `json:"parallelism,omitempty"` Completions *int32 `json:"completions,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"` SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"` BackoffLimit *int32 `json:"backoffLimit,omitempty"` BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"` MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"` Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` ManualSelector *bool `json:"manualSelector,omitempty"` Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"` Suspend *bool `json:"suspend,omitempty"` PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"` ManagedBy *string `json:"managedBy,omitempty"` } // JobSpecApplyConfiguration constructs a declarative configuration of the JobSpec type for use with // apply. func JobSpec() *JobSpecApplyConfiguration { return &JobSpecApplyConfiguration{} } // WithParallelism sets the Parallelism 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 Parallelism field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithParallelism(value int32) *JobSpecApplyConfiguration { b.Parallelism = &value return b } // WithCompletions sets the Completions 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 Completions field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithCompletions(value int32) *JobSpecApplyConfiguration { b.Completions = &value return b } // WithActiveDeadlineSeconds sets the ActiveDeadlineSeconds 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 ActiveDeadlineSeconds field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithActiveDeadlineSeconds(value int64) *JobSpecApplyConfiguration { b.ActiveDeadlineSeconds = &value return b } // WithPodFailurePolicy sets the PodFailurePolicy 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 PodFailurePolicy field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithPodFailurePolicy(value *PodFailurePolicyApplyConfiguration) *JobSpecApplyConfiguration { b.PodFailurePolicy = value return b } // WithSuccessPolicy sets the SuccessPolicy 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 SuccessPolicy field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithSuccessPolicy(value *SuccessPolicyApplyConfiguration) *JobSpecApplyConfiguration { b.SuccessPolicy = value return b } // WithBackoffLimit sets the BackoffLimit 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 BackoffLimit field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithBackoffLimit(value int32) *JobSpecApplyConfiguration { b.BackoffLimit = &value return b } // WithBackoffLimitPerIndex sets the BackoffLimitPerIndex 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 BackoffLimitPerIndex field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithBackoffLimitPerIndex(value int32) *JobSpecApplyConfiguration { b.BackoffLimitPerIndex = &value return b } // WithMaxFailedIndexes sets the MaxFailedIndexes 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 MaxFailedIndexes field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithMaxFailedIndexes(value int32) *JobSpecApplyConfiguration { b.MaxFailedIndexes = &value return b } // WithSelector sets the Selector 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 Selector field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithSelector(value *metav1.LabelSelectorApplyConfiguration) *JobSpecApplyConfiguration { b.Selector = value return b } // WithManualSelector sets the ManualSelector 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 ManualSelector field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithManualSelector(value bool) *JobSpecApplyConfiguration { b.ManualSelector = &value return b } // WithTemplate sets the Template 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 Template field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *JobSpecApplyConfiguration { b.Template = value return b } // WithTTLSecondsAfterFinished sets the TTLSecondsAfterFinished 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 TTLSecondsAfterFinished field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithTTLSecondsAfterFinished(value int32) *JobSpecApplyConfiguration { b.TTLSecondsAfterFinished = &value return b } // WithCompletionMode sets the CompletionMode 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 CompletionMode field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithCompletionMode(value batchv1.CompletionMode) *JobSpecApplyConfiguration { b.CompletionMode = &value return b } // WithSuspend sets the Suspend 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 Suspend field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithSuspend(value bool) *JobSpecApplyConfiguration { b.Suspend = &value return b } // WithPodReplacementPolicy sets the PodReplacementPolicy 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 PodReplacementPolicy field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithPodReplacementPolicy(value batchv1.PodReplacementPolicy) *JobSpecApplyConfiguration { b.PodReplacementPolicy = &value return b } // WithManagedBy sets the ManagedBy 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 ManagedBy field is set to the value of the last call. func (b *JobSpecApplyConfiguration) WithManagedBy(value string) *JobSpecApplyConfiguration { b.ManagedBy = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicy.go
/* 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 // PodFailurePolicyApplyConfiguration represents a declarative configuration of the PodFailurePolicy type for use // with apply. type PodFailurePolicyApplyConfiguration struct { Rules []PodFailurePolicyRuleApplyConfiguration `json:"rules,omitempty"` } // PodFailurePolicyApplyConfiguration constructs a declarative configuration of the PodFailurePolicy type for use with // apply. func PodFailurePolicy() *PodFailurePolicyApplyConfiguration { return &PodFailurePolicyApplyConfiguration{} } // WithRules adds the given value to the Rules 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 Rules field. func (b *PodFailurePolicyApplyConfiguration) WithRules(values ...*PodFailurePolicyRuleApplyConfiguration) *PodFailurePolicyApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithRules") } b.Rules = append(b.Rules, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go
/* 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 ( apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use // with apply. type JobTemplateSpecApplyConfiguration struct { *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` } // JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with // apply. func JobTemplateSpec() *JobTemplateSpecApplyConfiguration { return &JobTemplateSpecApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithName(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithGenerateName(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithUID(value types.UID) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithResourceVersion(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithGeneration(value int64) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *JobTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *JobTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *JobTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithSpec(value *JobSpecApplyConfiguration) *JobTemplateSpecApplyConfiguration { b.Spec = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobTemplateSpecApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyrule.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" ) // PodFailurePolicyRuleApplyConfiguration represents a declarative configuration of the PodFailurePolicyRule type for use // with apply. type PodFailurePolicyRuleApplyConfiguration struct { Action *batchv1.PodFailurePolicyAction `json:"action,omitempty"` OnExitCodes *PodFailurePolicyOnExitCodesRequirementApplyConfiguration `json:"onExitCodes,omitempty"` OnPodConditions []PodFailurePolicyOnPodConditionsPatternApplyConfiguration `json:"onPodConditions,omitempty"` } // PodFailurePolicyRuleApplyConfiguration constructs a declarative configuration of the PodFailurePolicyRule type for use with // apply. func PodFailurePolicyRule() *PodFailurePolicyRuleApplyConfiguration { return &PodFailurePolicyRuleApplyConfiguration{} } // WithAction sets the Action 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 Action field is set to the value of the last call. func (b *PodFailurePolicyRuleApplyConfiguration) WithAction(value batchv1.PodFailurePolicyAction) *PodFailurePolicyRuleApplyConfiguration { b.Action = &value return b } // WithOnExitCodes sets the OnExitCodes 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 OnExitCodes field is set to the value of the last call. func (b *PodFailurePolicyRuleApplyConfiguration) WithOnExitCodes(value *PodFailurePolicyOnExitCodesRequirementApplyConfiguration) *PodFailurePolicyRuleApplyConfiguration { b.OnExitCodes = value return b } // WithOnPodConditions adds the given value to the OnPodConditions 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 OnPodConditions field. func (b *PodFailurePolicyRuleApplyConfiguration) WithOnPodConditions(values ...*PodFailurePolicyOnPodConditionsPatternApplyConfiguration) *PodFailurePolicyRuleApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithOnPodConditions") } b.OnPodConditions = append(b.OnPodConditions, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobstatus.go
/* 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 ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/applyconfigurations/core/v1" ) // CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use // with apply. type CronJobStatusApplyConfiguration struct { Active []corev1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } // CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with // apply. func CronJobStatus() *CronJobStatusApplyConfiguration { return &CronJobStatusApplyConfiguration{} } // WithActive adds the given value to the Active 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 Active field. func (b *CronJobStatusApplyConfiguration) WithActive(values ...*corev1.ObjectReferenceApplyConfiguration) *CronJobStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithActive") } b.Active = append(b.Active, *values[i]) } return b } // WithLastScheduleTime sets the LastScheduleTime 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 LastScheduleTime field is set to the value of the last call. func (b *CronJobStatusApplyConfiguration) WithLastScheduleTime(value metav1.Time) *CronJobStatusApplyConfiguration { b.LastScheduleTime = &value return b } // WithLastSuccessfulTime sets the LastSuccessfulTime 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 LastSuccessfulTime field is set to the value of the last call. func (b *CronJobStatusApplyConfiguration) WithLastSuccessfulTime(value metav1.Time) *CronJobStatusApplyConfiguration { b.LastSuccessfulTime = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/uncountedterminatedpods.go
/* 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 ( types "k8s.io/apimachinery/pkg/types" ) // UncountedTerminatedPodsApplyConfiguration represents a declarative configuration of the UncountedTerminatedPods type for use // with apply. type UncountedTerminatedPodsApplyConfiguration struct { Succeeded []types.UID `json:"succeeded,omitempty"` Failed []types.UID `json:"failed,omitempty"` } // UncountedTerminatedPodsApplyConfiguration constructs a declarative configuration of the UncountedTerminatedPods type for use with // apply. func UncountedTerminatedPods() *UncountedTerminatedPodsApplyConfiguration { return &UncountedTerminatedPodsApplyConfiguration{} } // WithSucceeded adds the given value to the Succeeded 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 Succeeded field. func (b *UncountedTerminatedPodsApplyConfiguration) WithSucceeded(values ...types.UID) *UncountedTerminatedPodsApplyConfiguration { for i := range values { b.Succeeded = append(b.Succeeded, values[i]) } return b } // WithFailed adds the given value to the Failed 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 Failed field. func (b *UncountedTerminatedPodsApplyConfiguration) WithFailed(values ...types.UID) *UncountedTerminatedPodsApplyConfiguration { for i := range values { b.Failed = append(b.Failed, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go
/* 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 // SuccessPolicyApplyConfiguration represents a declarative configuration of the SuccessPolicy type for use // with apply. type SuccessPolicyApplyConfiguration struct { Rules []SuccessPolicyRuleApplyConfiguration `json:"rules,omitempty"` } // SuccessPolicyApplyConfiguration constructs a declarative configuration of the SuccessPolicy type for use with // apply. func SuccessPolicy() *SuccessPolicyApplyConfiguration { return &SuccessPolicyApplyConfiguration{} } // WithRules adds the given value to the Rules 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 Rules field. func (b *SuccessPolicyApplyConfiguration) WithRules(values ...*SuccessPolicyRuleApplyConfiguration) *SuccessPolicyApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithRules") } b.Rules = append(b.Rules, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobcondition.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // JobConditionApplyConfiguration represents a declarative configuration of the JobCondition type for use // with apply. type JobConditionApplyConfiguration struct { Type *batchv1.JobConditionType `json:"type,omitempty"` Status *corev1.ConditionStatus `json:"status,omitempty"` LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` Reason *string `json:"reason,omitempty"` Message *string `json:"message,omitempty"` } // JobConditionApplyConfiguration constructs a declarative configuration of the JobCondition type for use with // apply. func JobCondition() *JobConditionApplyConfiguration { return &JobConditionApplyConfiguration{} } // WithType sets the Type 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 Type field is set to the value of the last call. func (b *JobConditionApplyConfiguration) WithType(value batchv1.JobConditionType) *JobConditionApplyConfiguration { b.Type = &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 *JobConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *JobConditionApplyConfiguration { b.Status = &value return b } // WithLastProbeTime sets the LastProbeTime 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 LastProbeTime field is set to the value of the last call. func (b *JobConditionApplyConfiguration) WithLastProbeTime(value metav1.Time) *JobConditionApplyConfiguration { b.LastProbeTime = &value return b } // WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. func (b *JobConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *JobConditionApplyConfiguration { b.LastTransitionTime = &value return b } // WithReason sets the Reason 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 Reason field is set to the value of the last call. func (b *JobConditionApplyConfiguration) WithReason(value string) *JobConditionApplyConfiguration { b.Reason = &value return b } // WithMessage sets the Message 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 Message field is set to the value of the last call. func (b *JobConditionApplyConfiguration) WithMessage(value string) *JobConditionApplyConfiguration { b.Message = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" ) // CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *batchv1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with // apply. func CronJobSpec() *CronJobSpecApplyConfiguration { return &CronJobSpecApplyConfiguration{} } // WithSchedule sets the Schedule 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 Schedule field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecApplyConfiguration { b.Schedule = &value return b } // WithTimeZone sets the TimeZone 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 TimeZone field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { b.TimeZone = &value return b } // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds 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 StartingDeadlineSeconds field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds(value int64) *CronJobSpecApplyConfiguration { b.StartingDeadlineSeconds = &value return b } // WithConcurrencyPolicy sets the ConcurrencyPolicy 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 ConcurrencyPolicy field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithConcurrencyPolicy(value batchv1.ConcurrencyPolicy) *CronJobSpecApplyConfiguration { b.ConcurrencyPolicy = &value return b } // WithSuspend sets the Suspend 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 Suspend field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSuspend(value bool) *CronJobSpecApplyConfiguration { b.Suspend = &value return b } // WithJobTemplate sets the JobTemplate 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 JobTemplate field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithJobTemplate(value *JobTemplateSpecApplyConfiguration) *CronJobSpecApplyConfiguration { b.JobTemplate = value return b } // WithSuccessfulJobsHistoryLimit sets the SuccessfulJobsHistoryLimit 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 SuccessfulJobsHistoryLimit field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration { b.SuccessfulJobsHistoryLimit = &value return b } // WithFailedJobsHistoryLimit sets the FailedJobsHistoryLimit 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 FailedJobsHistoryLimit field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration { b.FailedJobsHistoryLimit = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use // with apply. type CronJobApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` } // CronJob constructs a declarative configuration of the CronJob type for use with // apply. func CronJob(name, namespace string) *CronJobApplyConfiguration { b := &CronJobApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("CronJob") b.WithAPIVersion("batch/v1") return b } // ExtractCronJob extracts the applied configuration owned by fieldManager from // cronJob. If no managedFields are found in cronJob for fieldManager, a // CronJobApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. // ExtractCronJob provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCronJob(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { return extractCronJob(cronJob, fieldManager, "") } // ExtractCronJobStatus is the same as ExtractCronJob except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCronJobStatus(cronJob *batchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { return extractCronJob(cronJob, fieldManager, "status") } func extractCronJob(cronJob *batchv1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { b := &CronJobApplyConfiguration{} err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1.CronJob"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cronJob.Name) b.WithNamespace(cronJob.Namespace) b.WithKind("CronJob") b.WithAPIVersion("batch/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithKind(value string) *CronJobApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithAPIVersion(value string) *CronJobApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithName(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithGenerateName(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithUID(value types.UID) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithResourceVersion(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithGeneration(value int64) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CronJobApplyConfiguration) WithLabels(entries map[string]string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CronJobApplyConfiguration) WithAnnotations(entries map[string]string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CronJobApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithSpec(value *CronJobSpecApplyConfiguration) *CronJobApplyConfiguration { 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 *CronJobApplyConfiguration) WithStatus(value *CronJobStatusApplyConfiguration) *CronJobApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CronJobApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1/podfailurepolicyonexitcodesrequirement.go
/* 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 ( batchv1 "k8s.io/api/batch/v1" ) // PodFailurePolicyOnExitCodesRequirementApplyConfiguration represents a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use // with apply. type PodFailurePolicyOnExitCodesRequirementApplyConfiguration struct { ContainerName *string `json:"containerName,omitempty"` Operator *batchv1.PodFailurePolicyOnExitCodesOperator `json:"operator,omitempty"` Values []int32 `json:"values,omitempty"` } // PodFailurePolicyOnExitCodesRequirementApplyConfiguration constructs a declarative configuration of the PodFailurePolicyOnExitCodesRequirement type for use with // apply. func PodFailurePolicyOnExitCodesRequirement() *PodFailurePolicyOnExitCodesRequirementApplyConfiguration { return &PodFailurePolicyOnExitCodesRequirementApplyConfiguration{} } // WithContainerName sets the ContainerName 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 ContainerName field is set to the value of the last call. func (b *PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithContainerName(value string) *PodFailurePolicyOnExitCodesRequirementApplyConfiguration { b.ContainerName = &value return b } // WithOperator sets the Operator 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 Operator field is set to the value of the last call. func (b *PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithOperator(value batchv1.PodFailurePolicyOnExitCodesOperator) *PodFailurePolicyOnExitCodesRequirementApplyConfiguration { b.Operator = &value return b } // WithValues adds the given value to the Values 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 Values field. func (b *PodFailurePolicyOnExitCodesRequirementApplyConfiguration) WithValues(values ...int32) *PodFailurePolicyOnExitCodesRequirementApplyConfiguration { for i := range values { b.Values = append(b.Values, values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go
/* 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 ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" batchv1 "k8s.io/client-go/applyconfigurations/batch/v1" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use // with apply. type JobTemplateSpecApplyConfiguration struct { *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *batchv1.JobSpecApplyConfiguration `json:"spec,omitempty"` } // JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with // apply. func JobTemplateSpec() *JobTemplateSpecApplyConfiguration { return &JobTemplateSpecApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithName(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithGenerateName(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithUID(value types.UID) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithResourceVersion(value string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithGeneration(value int64) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithCreationTimestamp(value metav1.Time) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *JobTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *JobTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *JobTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *JobTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *JobTemplateSpecApplyConfiguration) WithSpec(value *batchv1.JobSpecApplyConfiguration) *JobTemplateSpecApplyConfiguration { b.Spec = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobTemplateSpecApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobstatus.go
/* 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 ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/client-go/applyconfigurations/core/v1" ) // CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use // with apply. type CronJobStatusApplyConfiguration struct { Active []v1.ObjectReferenceApplyConfiguration `json:"active,omitempty"` LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } // CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with // apply. func CronJobStatus() *CronJobStatusApplyConfiguration { return &CronJobStatusApplyConfiguration{} } // WithActive adds the given value to the Active 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 Active field. func (b *CronJobStatusApplyConfiguration) WithActive(values ...*v1.ObjectReferenceApplyConfiguration) *CronJobStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithActive") } b.Active = append(b.Active, *values[i]) } return b } // WithLastScheduleTime sets the LastScheduleTime 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 LastScheduleTime field is set to the value of the last call. func (b *CronJobStatusApplyConfiguration) WithLastScheduleTime(value metav1.Time) *CronJobStatusApplyConfiguration { b.LastScheduleTime = &value return b } // WithLastSuccessfulTime sets the LastSuccessfulTime 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 LastSuccessfulTime field is set to the value of the last call. func (b *CronJobStatusApplyConfiguration) WithLastSuccessfulTime(value metav1.Time) *CronJobStatusApplyConfiguration { b.LastSuccessfulTime = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go
/* 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 ( batchv1beta1 "k8s.io/api/batch/v1beta1" ) // CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *batchv1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with // apply. func CronJobSpec() *CronJobSpecApplyConfiguration { return &CronJobSpecApplyConfiguration{} } // WithSchedule sets the Schedule 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 Schedule field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecApplyConfiguration { b.Schedule = &value return b } // WithTimeZone sets the TimeZone 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 TimeZone field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { b.TimeZone = &value return b } // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds 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 StartingDeadlineSeconds field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds(value int64) *CronJobSpecApplyConfiguration { b.StartingDeadlineSeconds = &value return b } // WithConcurrencyPolicy sets the ConcurrencyPolicy 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 ConcurrencyPolicy field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithConcurrencyPolicy(value batchv1beta1.ConcurrencyPolicy) *CronJobSpecApplyConfiguration { b.ConcurrencyPolicy = &value return b } // WithSuspend sets the Suspend 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 Suspend field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSuspend(value bool) *CronJobSpecApplyConfiguration { b.Suspend = &value return b } // WithJobTemplate sets the JobTemplate 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 JobTemplate field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithJobTemplate(value *JobTemplateSpecApplyConfiguration) *CronJobSpecApplyConfiguration { b.JobTemplate = value return b } // WithSuccessfulJobsHistoryLimit sets the SuccessfulJobsHistoryLimit 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 SuccessfulJobsHistoryLimit field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration { b.SuccessfulJobsHistoryLimit = &value return b } // WithFailedJobsHistoryLimit sets the FailedJobsHistoryLimit 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 FailedJobsHistoryLimit field is set to the value of the last call. func (b *CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration { b.FailedJobsHistoryLimit = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go
vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go
/* 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 ( batchv1beta1 "k8s.io/api/batch/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use // with apply. type CronJobApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` } // CronJob constructs a declarative configuration of the CronJob type for use with // apply. func CronJob(name, namespace string) *CronJobApplyConfiguration { b := &CronJobApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("CronJob") b.WithAPIVersion("batch/v1beta1") return b } // ExtractCronJob extracts the applied configuration owned by fieldManager from // cronJob. If no managedFields are found in cronJob for fieldManager, a // CronJobApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API. // ExtractCronJob provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCronJob(cronJob *batchv1beta1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { return extractCronJob(cronJob, fieldManager, "") } // ExtractCronJobStatus is the same as ExtractCronJob except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCronJobStatus(cronJob *batchv1beta1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) { return extractCronJob(cronJob, fieldManager, "status") } func extractCronJob(cronJob *batchv1beta1.CronJob, fieldManager string, subresource string) (*CronJobApplyConfiguration, error) { b := &CronJobApplyConfiguration{} err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1beta1.CronJob"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cronJob.Name) b.WithNamespace(cronJob.Namespace) b.WithKind("CronJob") b.WithAPIVersion("batch/v1beta1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithKind(value string) *CronJobApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithAPIVersion(value string) *CronJobApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithName(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithGenerateName(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithUID(value types.UID) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithResourceVersion(value string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithGeneration(value int64) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CronJobApplyConfiguration) WithLabels(entries map[string]string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CronJobApplyConfiguration) WithAnnotations(entries map[string]string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CronJobApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *CronJobApplyConfiguration) WithSpec(value *CronJobSpecApplyConfiguration) *CronJobApplyConfiguration { 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 *CronJobApplyConfiguration) WithStatus(value *CronJobStatusApplyConfiguration) *CronJobApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CronJobApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go
/* 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 ( discoveryv1 "k8s.io/api/discovery/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EndpointSliceApplyConfiguration represents a declarative configuration of the EndpointSlice type for use // with apply. type EndpointSliceApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` AddressType *discoveryv1.AddressType `json:"addressType,omitempty"` Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } // EndpointSlice constructs a declarative configuration of the EndpointSlice type for use with // apply. func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration { b := &EndpointSliceApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("EndpointSlice") b.WithAPIVersion("discovery.k8s.io/v1") return b } // ExtractEndpointSlice extracts the applied configuration owned by fieldManager from // endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a // EndpointSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. // ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { return extractEndpointSlice(endpointSlice, fieldManager, "") } // ExtractEndpointSliceStatus is the same as ExtractEndpointSlice except // that it extracts the status subresource applied configuration. // Experimental! func ExtractEndpointSliceStatus(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { return extractEndpointSlice(endpointSlice, fieldManager, "status") } func extractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { b := &EndpointSliceApplyConfiguration{} err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1.EndpointSlice"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(endpointSlice.Name) b.WithNamespace(endpointSlice.Namespace) b.WithKind("EndpointSlice") b.WithAPIVersion("discovery.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithKind(value string) *EndpointSliceApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithAPIVersion(value string) *EndpointSliceApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithName(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithGenerateName(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithUID(value types.UID) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithResourceVersion(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithGeneration(value int64) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *EndpointSliceApplyConfiguration) WithLabels(entries map[string]string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *EndpointSliceApplyConfiguration) WithAnnotations(entries map[string]string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *EndpointSliceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithAddressType sets the AddressType 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 AddressType field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithAddressType(value discoveryv1.AddressType) *EndpointSliceApplyConfiguration { b.AddressType = &value return b } // WithEndpoints adds the given value to the Endpoints 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 Endpoints field. func (b *EndpointSliceApplyConfiguration) WithEndpoints(values ...*EndpointApplyConfiguration) *EndpointSliceApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithEndpoints") } b.Endpoints = append(b.Endpoints, *values[i]) } return b } // WithPorts adds the given value to the Ports 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 Ports field. func (b *EndpointSliceApplyConfiguration) WithPorts(values ...*EndpointPortApplyConfiguration) *EndpointSliceApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithPorts") } b.Ports = append(b.Ports, *values[i]) } return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *EndpointSliceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/forzone.go
/* 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 // ForZoneApplyConfiguration represents a declarative configuration of the ForZone type for use // with apply. type ForZoneApplyConfiguration struct { Name *string `json:"name,omitempty"` } // ForZoneApplyConfiguration constructs a declarative configuration of the ForZone type for use with // apply. func ForZone() *ForZoneApplyConfiguration { return &ForZoneApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *ForZoneApplyConfiguration) WithName(value string) *ForZoneApplyConfiguration { b.Name = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointhints.go
/* 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 // EndpointHintsApplyConfiguration represents a declarative configuration of the EndpointHints type for use // with apply. type EndpointHintsApplyConfiguration struct { ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"` } // EndpointHintsApplyConfiguration constructs a declarative configuration of the EndpointHints type for use with // apply. func EndpointHints() *EndpointHintsApplyConfiguration { return &EndpointHintsApplyConfiguration{} } // WithForZones adds the given value to the ForZones 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 ForZones field. func (b *EndpointHintsApplyConfiguration) WithForZones(values ...*ForZoneApplyConfiguration) *EndpointHintsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithForZones") } b.ForZones = append(b.ForZones, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go
/* 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 ( corev1 "k8s.io/api/core/v1" ) // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. type EndpointPortApplyConfiguration struct { Name *string `json:"name,omitempty"` Protocol *corev1.Protocol `json:"protocol,omitempty"` Port *int32 `json:"port,omitempty"` AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with // apply. func EndpointPort() *EndpointPortApplyConfiguration { return &EndpointPortApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithName(value string) *EndpointPortApplyConfiguration { b.Name = &value return b } // WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithProtocol(value corev1.Protocol) *EndpointPortApplyConfiguration { b.Protocol = &value return b } // WithPort sets the Port 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 Port field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithPort(value int32) *EndpointPortApplyConfiguration { b.Port = &value return b } // WithAppProtocol sets the AppProtocol 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 AppProtocol field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithAppProtocol(value string) *EndpointPortApplyConfiguration { b.AppProtocol = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpoint.go
/* 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 ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" ) // EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use // with apply. type EndpointApplyConfiguration struct { Addresses []string `json:"addresses,omitempty"` Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` Hostname *string `json:"hostname,omitempty"` TargetRef *corev1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty"` NodeName *string `json:"nodeName,omitempty"` Zone *string `json:"zone,omitempty"` Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` } // EndpointApplyConfiguration constructs a declarative configuration of the Endpoint type for use with // apply. func Endpoint() *EndpointApplyConfiguration { return &EndpointApplyConfiguration{} } // WithAddresses adds the given value to the Addresses 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 Addresses field. func (b *EndpointApplyConfiguration) WithAddresses(values ...string) *EndpointApplyConfiguration { for i := range values { b.Addresses = append(b.Addresses, values[i]) } return b } // WithConditions sets the Conditions 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 Conditions field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithConditions(value *EndpointConditionsApplyConfiguration) *EndpointApplyConfiguration { b.Conditions = value return b } // WithHostname sets the Hostname 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 Hostname field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithHostname(value string) *EndpointApplyConfiguration { b.Hostname = &value return b } // WithTargetRef sets the TargetRef 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 TargetRef field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithTargetRef(value *corev1.ObjectReferenceApplyConfiguration) *EndpointApplyConfiguration { b.TargetRef = value return b } // WithDeprecatedTopology puts the entries into the DeprecatedTopology field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the DeprecatedTopology field, // overwriting an existing map entries in DeprecatedTopology field with the same key. func (b *EndpointApplyConfiguration) WithDeprecatedTopology(entries map[string]string) *EndpointApplyConfiguration { if b.DeprecatedTopology == nil && len(entries) > 0 { b.DeprecatedTopology = make(map[string]string, len(entries)) } for k, v := range entries { b.DeprecatedTopology[k] = v } return b } // WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithNodeName(value string) *EndpointApplyConfiguration { b.NodeName = &value return b } // WithZone sets the Zone 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 Zone field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithZone(value string) *EndpointApplyConfiguration { b.Zone = &value return b } // WithHints sets the Hints 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 Hints field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithHints(value *EndpointHintsApplyConfiguration) *EndpointApplyConfiguration { b.Hints = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointconditions.go
/* 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 // EndpointConditionsApplyConfiguration represents a declarative configuration of the EndpointConditions type for use // with apply. type EndpointConditionsApplyConfiguration struct { Ready *bool `json:"ready,omitempty"` Serving *bool `json:"serving,omitempty"` Terminating *bool `json:"terminating,omitempty"` } // EndpointConditionsApplyConfiguration constructs a declarative configuration of the EndpointConditions type for use with // apply. func EndpointConditions() *EndpointConditionsApplyConfiguration { return &EndpointConditionsApplyConfiguration{} } // WithReady sets the Ready 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 Ready field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithReady(value bool) *EndpointConditionsApplyConfiguration { b.Ready = &value return b } // WithServing sets the Serving 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 Serving field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithServing(value bool) *EndpointConditionsApplyConfiguration { b.Serving = &value return b } // WithTerminating sets the Terminating 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 Terminating field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithTerminating(value bool) *EndpointConditionsApplyConfiguration { b.Terminating = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go
/* 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 ( discoveryv1beta1 "k8s.io/api/discovery/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EndpointSliceApplyConfiguration represents a declarative configuration of the EndpointSlice type for use // with apply. type EndpointSliceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` AddressType *discoveryv1beta1.AddressType `json:"addressType,omitempty"` Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } // EndpointSlice constructs a declarative configuration of the EndpointSlice type for use with // apply. func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration { b := &EndpointSliceApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("EndpointSlice") b.WithAPIVersion("discovery.k8s.io/v1beta1") return b } // ExtractEndpointSlice extracts the applied configuration owned by fieldManager from // endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a // EndpointSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API. // ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { return extractEndpointSlice(endpointSlice, fieldManager, "") } // ExtractEndpointSliceStatus is the same as ExtractEndpointSlice except // that it extracts the status subresource applied configuration. // Experimental! func ExtractEndpointSliceStatus(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) { return extractEndpointSlice(endpointSlice, fieldManager, "status") } func extractEndpointSlice(endpointSlice *discoveryv1beta1.EndpointSlice, fieldManager string, subresource string) (*EndpointSliceApplyConfiguration, error) { b := &EndpointSliceApplyConfiguration{} err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1beta1.EndpointSlice"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(endpointSlice.Name) b.WithNamespace(endpointSlice.Namespace) b.WithKind("EndpointSlice") b.WithAPIVersion("discovery.k8s.io/v1beta1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithKind(value string) *EndpointSliceApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithAPIVersion(value string) *EndpointSliceApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithName(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithGenerateName(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithUID(value types.UID) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithResourceVersion(value string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithGeneration(value int64) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *EndpointSliceApplyConfiguration) WithLabels(entries map[string]string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *EndpointSliceApplyConfiguration) WithAnnotations(entries map[string]string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *EndpointSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *EndpointSliceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithAddressType sets the AddressType 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 AddressType field is set to the value of the last call. func (b *EndpointSliceApplyConfiguration) WithAddressType(value discoveryv1beta1.AddressType) *EndpointSliceApplyConfiguration { b.AddressType = &value return b } // WithEndpoints adds the given value to the Endpoints 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 Endpoints field. func (b *EndpointSliceApplyConfiguration) WithEndpoints(values ...*EndpointApplyConfiguration) *EndpointSliceApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithEndpoints") } b.Endpoints = append(b.Endpoints, *values[i]) } return b } // WithPorts adds the given value to the Ports 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 Ports field. func (b *EndpointSliceApplyConfiguration) WithPorts(values ...*EndpointPortApplyConfiguration) *EndpointSliceApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithPorts") } b.Ports = append(b.Ports, *values[i]) } return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *EndpointSliceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/forzone.go
/* 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 // ForZoneApplyConfiguration represents a declarative configuration of the ForZone type for use // with apply. type ForZoneApplyConfiguration struct { Name *string `json:"name,omitempty"` } // ForZoneApplyConfiguration constructs a declarative configuration of the ForZone type for use with // apply. func ForZone() *ForZoneApplyConfiguration { return &ForZoneApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *ForZoneApplyConfiguration) WithName(value string) *ForZoneApplyConfiguration { b.Name = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointhints.go
/* 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 // EndpointHintsApplyConfiguration represents a declarative configuration of the EndpointHints type for use // with apply. type EndpointHintsApplyConfiguration struct { ForZones []ForZoneApplyConfiguration `json:"forZones,omitempty"` } // EndpointHintsApplyConfiguration constructs a declarative configuration of the EndpointHints type for use with // apply. func EndpointHints() *EndpointHintsApplyConfiguration { return &EndpointHintsApplyConfiguration{} } // WithForZones adds the given value to the ForZones 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 ForZones field. func (b *EndpointHintsApplyConfiguration) WithForZones(values ...*ForZoneApplyConfiguration) *EndpointHintsApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithForZones") } b.ForZones = append(b.ForZones, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointport.go
/* 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/api/core/v1" ) // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. type EndpointPortApplyConfiguration struct { Name *string `json:"name,omitempty"` Protocol *v1.Protocol `json:"protocol,omitempty"` Port *int32 `json:"port,omitempty"` AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with // apply. func EndpointPort() *EndpointPortApplyConfiguration { return &EndpointPortApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithName(value string) *EndpointPortApplyConfiguration { b.Name = &value return b } // WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithProtocol(value v1.Protocol) *EndpointPortApplyConfiguration { b.Protocol = &value return b } // WithPort sets the Port 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 Port field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithPort(value int32) *EndpointPortApplyConfiguration { b.Port = &value return b } // WithAppProtocol sets the AppProtocol 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 AppProtocol field is set to the value of the last call. func (b *EndpointPortApplyConfiguration) WithAppProtocol(value string) *EndpointPortApplyConfiguration { b.AppProtocol = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpoint.go
/* 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/core/v1" ) // EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use // with apply. type EndpointApplyConfiguration struct { Addresses []string `json:"addresses,omitempty"` Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` Hostname *string `json:"hostname,omitempty"` TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` Topology map[string]string `json:"topology,omitempty"` NodeName *string `json:"nodeName,omitempty"` Hints *EndpointHintsApplyConfiguration `json:"hints,omitempty"` } // EndpointApplyConfiguration constructs a declarative configuration of the Endpoint type for use with // apply. func Endpoint() *EndpointApplyConfiguration { return &EndpointApplyConfiguration{} } // WithAddresses adds the given value to the Addresses 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 Addresses field. func (b *EndpointApplyConfiguration) WithAddresses(values ...string) *EndpointApplyConfiguration { for i := range values { b.Addresses = append(b.Addresses, values[i]) } return b } // WithConditions sets the Conditions 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 Conditions field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithConditions(value *EndpointConditionsApplyConfiguration) *EndpointApplyConfiguration { b.Conditions = value return b } // WithHostname sets the Hostname 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 Hostname field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithHostname(value string) *EndpointApplyConfiguration { b.Hostname = &value return b } // WithTargetRef sets the TargetRef 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 TargetRef field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithTargetRef(value *v1.ObjectReferenceApplyConfiguration) *EndpointApplyConfiguration { b.TargetRef = value return b } // WithTopology puts the entries into the Topology field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Topology field, // overwriting an existing map entries in Topology field with the same key. func (b *EndpointApplyConfiguration) WithTopology(entries map[string]string) *EndpointApplyConfiguration { if b.Topology == nil && len(entries) > 0 { b.Topology = make(map[string]string, len(entries)) } for k, v := range entries { b.Topology[k] = v } return b } // WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithNodeName(value string) *EndpointApplyConfiguration { b.NodeName = &value return b } // WithHints sets the Hints 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 Hints field is set to the value of the last call. func (b *EndpointApplyConfiguration) WithHints(value *EndpointHintsApplyConfiguration) *EndpointApplyConfiguration { b.Hints = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go
vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointconditions.go
/* 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 // EndpointConditionsApplyConfiguration represents a declarative configuration of the EndpointConditions type for use // with apply. type EndpointConditionsApplyConfiguration struct { Ready *bool `json:"ready,omitempty"` Serving *bool `json:"serving,omitempty"` Terminating *bool `json:"terminating,omitempty"` } // EndpointConditionsApplyConfiguration constructs a declarative configuration of the EndpointConditions type for use with // apply. func EndpointConditions() *EndpointConditionsApplyConfiguration { return &EndpointConditionsApplyConfiguration{} } // WithReady sets the Ready 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 Ready field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithReady(value bool) *EndpointConditionsApplyConfiguration { b.Ready = &value return b } // WithServing sets the Serving 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 Serving field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithServing(value bool) *EndpointConditionsApplyConfiguration { b.Serving = &value return b } // WithTerminating sets the Terminating 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 Terminating field is set to the value of the last call. func (b *EndpointConditionsApplyConfiguration) WithTerminating(value bool) *EndpointConditionsApplyConfiguration { b.Terminating = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentspec.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentspec.go
/* 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 v1alpha1 // VolumeAttachmentSpecApplyConfiguration represents a declarative configuration of the VolumeAttachmentSpec type for use // with apply. type VolumeAttachmentSpecApplyConfiguration struct { Attacher *string `json:"attacher,omitempty"` Source *VolumeAttachmentSourceApplyConfiguration `json:"source,omitempty"` NodeName *string `json:"nodeName,omitempty"` } // VolumeAttachmentSpecApplyConfiguration constructs a declarative configuration of the VolumeAttachmentSpec type for use with // apply. func VolumeAttachmentSpec() *VolumeAttachmentSpecApplyConfiguration { return &VolumeAttachmentSpecApplyConfiguration{} } // WithAttacher sets the Attacher 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 Attacher field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithAttacher(value string) *VolumeAttachmentSpecApplyConfiguration { b.Attacher = &value return b } // WithSource sets the Source 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 Source field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithSource(value *VolumeAttachmentSourceApplyConfiguration) *VolumeAttachmentSpecApplyConfiguration { b.Source = value return b } // WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithNodeName(value string) *VolumeAttachmentSpecApplyConfiguration { b.NodeName = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeerror.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeerror.go
/* 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 v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // VolumeErrorApplyConfiguration represents a declarative configuration of the VolumeError type for use // with apply. type VolumeErrorApplyConfiguration struct { Time *v1.Time `json:"time,omitempty"` Message *string `json:"message,omitempty"` } // VolumeErrorApplyConfiguration constructs a declarative configuration of the VolumeError type for use with // apply. func VolumeError() *VolumeErrorApplyConfiguration { return &VolumeErrorApplyConfiguration{} } // WithTime sets the Time 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 Time field is set to the value of the last call. func (b *VolumeErrorApplyConfiguration) WithTime(value v1.Time) *VolumeErrorApplyConfiguration { b.Time = &value return b } // WithMessage sets the Message 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 Message field is set to the value of the last call. func (b *VolumeErrorApplyConfiguration) WithMessage(value string) *VolumeErrorApplyConfiguration { b.Message = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go
/* 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 v1alpha1 import ( storagev1alpha1 "k8s.io/api/storage/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // VolumeAttachmentApplyConfiguration represents a declarative configuration of the VolumeAttachment type for use // with apply. type VolumeAttachmentApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *VolumeAttachmentSpecApplyConfiguration `json:"spec,omitempty"` Status *VolumeAttachmentStatusApplyConfiguration `json:"status,omitempty"` } // VolumeAttachment constructs a declarative configuration of the VolumeAttachment type for use with // apply. func VolumeAttachment(name string) *VolumeAttachmentApplyConfiguration { b := &VolumeAttachmentApplyConfiguration{} b.WithName(name) b.WithKind("VolumeAttachment") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b } // ExtractVolumeAttachment extracts the applied configuration owned by fieldManager from // volumeAttachment. If no managedFields are found in volumeAttachment for fieldManager, a // VolumeAttachmentApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // volumeAttachment must be a unmodified VolumeAttachment API object that was retrieved from the Kubernetes API. // ExtractVolumeAttachment provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractVolumeAttachment(volumeAttachment *storagev1alpha1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) { return extractVolumeAttachment(volumeAttachment, fieldManager, "") } // ExtractVolumeAttachmentStatus is the same as ExtractVolumeAttachment except // that it extracts the status subresource applied configuration. // Experimental! func ExtractVolumeAttachmentStatus(volumeAttachment *storagev1alpha1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) { return extractVolumeAttachment(volumeAttachment, fieldManager, "status") } func extractVolumeAttachment(volumeAttachment *storagev1alpha1.VolumeAttachment, fieldManager string, subresource string) (*VolumeAttachmentApplyConfiguration, error) { b := &VolumeAttachmentApplyConfiguration{} err := managedfields.ExtractInto(volumeAttachment, internal.Parser().Type("io.k8s.api.storage.v1alpha1.VolumeAttachment"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(volumeAttachment.Name) b.WithKind("VolumeAttachment") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithKind(value string) *VolumeAttachmentApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithAPIVersion(value string) *VolumeAttachmentApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithName(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithGenerateName(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithUID(value types.UID) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithResourceVersion(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithGeneration(value int64) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *VolumeAttachmentApplyConfiguration) WithLabels(entries map[string]string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *VolumeAttachmentApplyConfiguration) WithAnnotations(entries map[string]string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *VolumeAttachmentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithSpec(value *VolumeAttachmentSpecApplyConfiguration) *VolumeAttachmentApplyConfiguration { 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 *VolumeAttachmentApplyConfiguration) WithStatus(value *VolumeAttachmentStatusApplyConfiguration) *VolumeAttachmentApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *VolumeAttachmentApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentstatus.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentstatus.go
/* 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 v1alpha1 // VolumeAttachmentStatusApplyConfiguration represents a declarative configuration of the VolumeAttachmentStatus type for use // with apply. type VolumeAttachmentStatusApplyConfiguration struct { Attached *bool `json:"attached,omitempty"` AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty"` AttachError *VolumeErrorApplyConfiguration `json:"attachError,omitempty"` DetachError *VolumeErrorApplyConfiguration `json:"detachError,omitempty"` } // VolumeAttachmentStatusApplyConfiguration constructs a declarative configuration of the VolumeAttachmentStatus type for use with // apply. func VolumeAttachmentStatus() *VolumeAttachmentStatusApplyConfiguration { return &VolumeAttachmentStatusApplyConfiguration{} } // WithAttached sets the Attached 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 Attached field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttached(value bool) *VolumeAttachmentStatusApplyConfiguration { b.Attached = &value return b } // WithAttachmentMetadata puts the entries into the AttachmentMetadata field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the AttachmentMetadata field, // overwriting an existing map entries in AttachmentMetadata field with the same key. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachmentMetadata(entries map[string]string) *VolumeAttachmentStatusApplyConfiguration { if b.AttachmentMetadata == nil && len(entries) > 0 { b.AttachmentMetadata = make(map[string]string, len(entries)) } for k, v := range entries { b.AttachmentMetadata[k] = v } return b } // WithAttachError sets the AttachError 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 AttachError field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration { b.AttachError = value return b } // WithDetachError sets the DetachError 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 DetachError field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithDetachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration { b.DetachError = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentsource.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachmentsource.go
/* 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 v1alpha1 import ( v1 "k8s.io/client-go/applyconfigurations/core/v1" ) // VolumeAttachmentSourceApplyConfiguration represents a declarative configuration of the VolumeAttachmentSource type for use // with apply. type VolumeAttachmentSourceApplyConfiguration struct { PersistentVolumeName *string `json:"persistentVolumeName,omitempty"` InlineVolumeSpec *v1.PersistentVolumeSpecApplyConfiguration `json:"inlineVolumeSpec,omitempty"` } // VolumeAttachmentSourceApplyConfiguration constructs a declarative configuration of the VolumeAttachmentSource type for use with // apply. func VolumeAttachmentSource() *VolumeAttachmentSourceApplyConfiguration { return &VolumeAttachmentSourceApplyConfiguration{} } // WithPersistentVolumeName sets the PersistentVolumeName 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 PersistentVolumeName field is set to the value of the last call. func (b *VolumeAttachmentSourceApplyConfiguration) WithPersistentVolumeName(value string) *VolumeAttachmentSourceApplyConfiguration { b.PersistentVolumeName = &value return b } // WithInlineVolumeSpec sets the InlineVolumeSpec 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 InlineVolumeSpec field is set to the value of the last call. func (b *VolumeAttachmentSourceApplyConfiguration) WithInlineVolumeSpec(value *v1.PersistentVolumeSpecApplyConfiguration) *VolumeAttachmentSourceApplyConfiguration { b.InlineVolumeSpec = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattributesclass.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattributesclass.go
/* 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 v1alpha1 import ( storagev1alpha1 "k8s.io/api/storage/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // VolumeAttributesClassApplyConfiguration represents a declarative configuration of the VolumeAttributesClass type for use // with apply. type VolumeAttributesClassApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` DriverName *string `json:"driverName,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` } // VolumeAttributesClass constructs a declarative configuration of the VolumeAttributesClass type for use with // apply. func VolumeAttributesClass(name string) *VolumeAttributesClassApplyConfiguration { b := &VolumeAttributesClassApplyConfiguration{} b.WithName(name) b.WithKind("VolumeAttributesClass") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b } // ExtractVolumeAttributesClass extracts the applied configuration owned by fieldManager from // volumeAttributesClass. If no managedFields are found in volumeAttributesClass for fieldManager, a // VolumeAttributesClassApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // volumeAttributesClass must be a unmodified VolumeAttributesClass API object that was retrieved from the Kubernetes API. // ExtractVolumeAttributesClass provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractVolumeAttributesClass(volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, fieldManager string) (*VolumeAttributesClassApplyConfiguration, error) { return extractVolumeAttributesClass(volumeAttributesClass, fieldManager, "") } // ExtractVolumeAttributesClassStatus is the same as ExtractVolumeAttributesClass except // that it extracts the status subresource applied configuration. // Experimental! func ExtractVolumeAttributesClassStatus(volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, fieldManager string) (*VolumeAttributesClassApplyConfiguration, error) { return extractVolumeAttributesClass(volumeAttributesClass, fieldManager, "status") } func extractVolumeAttributesClass(volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, fieldManager string, subresource string) (*VolumeAttributesClassApplyConfiguration, error) { b := &VolumeAttributesClassApplyConfiguration{} err := managedfields.ExtractInto(volumeAttributesClass, internal.Parser().Type("io.k8s.api.storage.v1alpha1.VolumeAttributesClass"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(volumeAttributesClass.Name) b.WithKind("VolumeAttributesClass") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithKind(value string) *VolumeAttributesClassApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithAPIVersion(value string) *VolumeAttributesClassApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithName(value string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithGenerateName(value string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithNamespace(value string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithUID(value types.UID) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithResourceVersion(value string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithGeneration(value int64) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *VolumeAttributesClassApplyConfiguration) WithLabels(entries map[string]string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *VolumeAttributesClassApplyConfiguration) WithAnnotations(entries map[string]string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *VolumeAttributesClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *VolumeAttributesClassApplyConfiguration) WithFinalizers(values ...string) *VolumeAttributesClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *VolumeAttributesClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call. func (b *VolumeAttributesClassApplyConfiguration) WithDriverName(value string) *VolumeAttributesClassApplyConfiguration { b.DriverName = &value return b } // WithParameters puts the entries into the Parameters field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Parameters field, // overwriting an existing map entries in Parameters field with the same key. func (b *VolumeAttributesClassApplyConfiguration) WithParameters(entries map[string]string) *VolumeAttributesClassApplyConfiguration { if b.Parameters == nil && len(entries) > 0 { b.Parameters = make(map[string]string, len(entries)) } for k, v := range entries { b.Parameters[k] = v } return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *VolumeAttributesClassApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go
/* 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 v1alpha1 import ( storagev1alpha1 "k8s.io/api/storage/v1alpha1" resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CSIStorageCapacityApplyConfiguration represents a declarative configuration of the CSIStorageCapacity type for use // with apply. type CSIStorageCapacityApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` NodeTopology *v1.LabelSelectorApplyConfiguration `json:"nodeTopology,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` Capacity *resource.Quantity `json:"capacity,omitempty"` MaximumVolumeSize *resource.Quantity `json:"maximumVolumeSize,omitempty"` } // CSIStorageCapacity constructs a declarative configuration of the CSIStorageCapacity type for use with // apply. func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfiguration { b := &CSIStorageCapacityApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("CSIStorageCapacity") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b } // ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from // cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a // CSIStorageCapacityApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API. // ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCSIStorageCapacity(cSIStorageCapacity *storagev1alpha1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "") } // ExtractCSIStorageCapacityStatus is the same as ExtractCSIStorageCapacity except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCSIStorageCapacityStatus(cSIStorageCapacity *storagev1alpha1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "status") } func extractCSIStorageCapacity(cSIStorageCapacity *storagev1alpha1.CSIStorageCapacity, fieldManager string, subresource string) (*CSIStorageCapacityApplyConfiguration, error) { b := &CSIStorageCapacityApplyConfiguration{} err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1alpha1.CSIStorageCapacity"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cSIStorageCapacity.Name) b.WithNamespace(cSIStorageCapacity.Namespace) b.WithKind("CSIStorageCapacity") b.WithAPIVersion("storage.k8s.io/v1alpha1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithKind(value string) *CSIStorageCapacityApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithAPIVersion(value string) *CSIStorageCapacityApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithName(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithGenerateName(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithUID(value types.UID) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithResourceVersion(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithGeneration(value int64) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CSIStorageCapacityApplyConfiguration) WithLabels(entries map[string]string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CSIStorageCapacityApplyConfiguration) WithAnnotations(entries map[string]string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CSIStorageCapacityApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } // WithNodeTopology sets the NodeTopology 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 NodeTopology field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithNodeTopology(value *v1.LabelSelectorApplyConfiguration) *CSIStorageCapacityApplyConfiguration { b.NodeTopology = value return b } // WithStorageClassName sets the StorageClassName 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 StorageClassName field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithStorageClassName(value string) *CSIStorageCapacityApplyConfiguration { b.StorageClassName = &value return b } // WithCapacity sets the Capacity 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 Capacity field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithCapacity(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { b.Capacity = &value return b } // WithMaximumVolumeSize sets the MaximumVolumeSize 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 MaximumVolumeSize field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithMaximumVolumeSize(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { b.MaximumVolumeSize = &value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CSIStorageCapacityApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinodedriver.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinodedriver.go
/* 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 // CSINodeDriverApplyConfiguration represents a declarative configuration of the CSINodeDriver type for use // with apply. type CSINodeDriverApplyConfiguration struct { Name *string `json:"name,omitempty"` NodeID *string `json:"nodeID,omitempty"` TopologyKeys []string `json:"topologyKeys,omitempty"` Allocatable *VolumeNodeResourcesApplyConfiguration `json:"allocatable,omitempty"` } // CSINodeDriverApplyConfiguration constructs a declarative configuration of the CSINodeDriver type for use with // apply. func CSINodeDriver() *CSINodeDriverApplyConfiguration { return &CSINodeDriverApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithName(value string) *CSINodeDriverApplyConfiguration { b.Name = &value return b } // WithNodeID sets the NodeID 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 NodeID field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithNodeID(value string) *CSINodeDriverApplyConfiguration { b.NodeID = &value return b } // WithTopologyKeys adds the given value to the TopologyKeys 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 TopologyKeys field. func (b *CSINodeDriverApplyConfiguration) WithTopologyKeys(values ...string) *CSINodeDriverApplyConfiguration { for i := range values { b.TopologyKeys = append(b.TopologyKeys, values[i]) } return b } // WithAllocatable sets the Allocatable 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 Allocatable field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithAllocatable(value *VolumeNodeResourcesApplyConfiguration) *CSINodeDriverApplyConfiguration { b.Allocatable = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentspec.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentspec.go
/* 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 // VolumeAttachmentSpecApplyConfiguration represents a declarative configuration of the VolumeAttachmentSpec type for use // with apply. type VolumeAttachmentSpecApplyConfiguration struct { Attacher *string `json:"attacher,omitempty"` Source *VolumeAttachmentSourceApplyConfiguration `json:"source,omitempty"` NodeName *string `json:"nodeName,omitempty"` } // VolumeAttachmentSpecApplyConfiguration constructs a declarative configuration of the VolumeAttachmentSpec type for use with // apply. func VolumeAttachmentSpec() *VolumeAttachmentSpecApplyConfiguration { return &VolumeAttachmentSpecApplyConfiguration{} } // WithAttacher sets the Attacher 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 Attacher field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithAttacher(value string) *VolumeAttachmentSpecApplyConfiguration { b.Attacher = &value return b } // WithSource sets the Source 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 Source field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithSource(value *VolumeAttachmentSourceApplyConfiguration) *VolumeAttachmentSpecApplyConfiguration { b.Source = value return b } // WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithNodeName(value string) *VolumeAttachmentSpecApplyConfiguration { b.NodeName = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinodespec.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinodespec.go
/* 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 // CSINodeSpecApplyConfiguration represents a declarative configuration of the CSINodeSpec type for use // with apply. type CSINodeSpecApplyConfiguration struct { Drivers []CSINodeDriverApplyConfiguration `json:"drivers,omitempty"` } // CSINodeSpecApplyConfiguration constructs a declarative configuration of the CSINodeSpec type for use with // apply. func CSINodeSpec() *CSINodeSpecApplyConfiguration { return &CSINodeSpecApplyConfiguration{} } // WithDrivers adds the given value to the Drivers 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 Drivers field. func (b *CSINodeSpecApplyConfiguration) WithDrivers(values ...*CSINodeDriverApplyConfiguration) *CSINodeSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithDrivers") } b.Drivers = append(b.Drivers, *values[i]) } return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeerror.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeerror.go
/* 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 ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // VolumeErrorApplyConfiguration represents a declarative configuration of the VolumeError type for use // with apply. type VolumeErrorApplyConfiguration struct { Time *metav1.Time `json:"time,omitempty"` Message *string `json:"message,omitempty"` } // VolumeErrorApplyConfiguration constructs a declarative configuration of the VolumeError type for use with // apply. func VolumeError() *VolumeErrorApplyConfiguration { return &VolumeErrorApplyConfiguration{} } // WithTime sets the Time 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 Time field is set to the value of the last call. func (b *VolumeErrorApplyConfiguration) WithTime(value metav1.Time) *VolumeErrorApplyConfiguration { b.Time = &value return b } // WithMessage sets the Message 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 Message field is set to the value of the last call. func (b *VolumeErrorApplyConfiguration) WithMessage(value string) *VolumeErrorApplyConfiguration { b.Message = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go
/* 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 ( storagev1 "k8s.io/api/storage/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CSIDriverApplyConfiguration represents a declarative configuration of the CSIDriver type for use // with apply. type CSIDriverApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CSIDriverSpecApplyConfiguration `json:"spec,omitempty"` } // CSIDriver constructs a declarative configuration of the CSIDriver type for use with // apply. func CSIDriver(name string) *CSIDriverApplyConfiguration { b := &CSIDriverApplyConfiguration{} b.WithName(name) b.WithKind("CSIDriver") b.WithAPIVersion("storage.k8s.io/v1") return b } // ExtractCSIDriver extracts the applied configuration owned by fieldManager from // cSIDriver. If no managedFields are found in cSIDriver for fieldManager, a // CSIDriverApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cSIDriver must be a unmodified CSIDriver API object that was retrieved from the Kubernetes API. // ExtractCSIDriver provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCSIDriver(cSIDriver *storagev1.CSIDriver, fieldManager string) (*CSIDriverApplyConfiguration, error) { return extractCSIDriver(cSIDriver, fieldManager, "") } // ExtractCSIDriverStatus is the same as ExtractCSIDriver except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCSIDriverStatus(cSIDriver *storagev1.CSIDriver, fieldManager string) (*CSIDriverApplyConfiguration, error) { return extractCSIDriver(cSIDriver, fieldManager, "status") } func extractCSIDriver(cSIDriver *storagev1.CSIDriver, fieldManager string, subresource string) (*CSIDriverApplyConfiguration, error) { b := &CSIDriverApplyConfiguration{} err := managedfields.ExtractInto(cSIDriver, internal.Parser().Type("io.k8s.api.storage.v1.CSIDriver"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cSIDriver.Name) b.WithKind("CSIDriver") b.WithAPIVersion("storage.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithKind(value string) *CSIDriverApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithAPIVersion(value string) *CSIDriverApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithName(value string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithGenerateName(value string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithNamespace(value string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithUID(value types.UID) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithResourceVersion(value string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithGeneration(value int64) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CSIDriverApplyConfiguration) WithLabels(entries map[string]string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CSIDriverApplyConfiguration) WithAnnotations(entries map[string]string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CSIDriverApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CSIDriverApplyConfiguration) WithFinalizers(values ...string) *CSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *CSIDriverApplyConfiguration) WithSpec(value *CSIDriverSpecApplyConfiguration) *CSIDriverApplyConfiguration { b.Spec = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CSIDriverApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go
/* 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 ( corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // StorageClassApplyConfiguration represents a declarative configuration of the StorageClass type for use // with apply. type StorageClassApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Provisioner *string `json:"provisioner,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` ReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"reclaimPolicy,omitempty"` MountOptions []string `json:"mountOptions,omitempty"` AllowVolumeExpansion *bool `json:"allowVolumeExpansion,omitempty"` VolumeBindingMode *storagev1.VolumeBindingMode `json:"volumeBindingMode,omitempty"` AllowedTopologies []applyconfigurationscorev1.TopologySelectorTermApplyConfiguration `json:"allowedTopologies,omitempty"` } // StorageClass constructs a declarative configuration of the StorageClass type for use with // apply. func StorageClass(name string) *StorageClassApplyConfiguration { b := &StorageClassApplyConfiguration{} b.WithName(name) b.WithKind("StorageClass") b.WithAPIVersion("storage.k8s.io/v1") return b } // ExtractStorageClass extracts the applied configuration owned by fieldManager from // storageClass. If no managedFields are found in storageClass for fieldManager, a // StorageClassApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // storageClass must be a unmodified StorageClass API object that was retrieved from the Kubernetes API. // ExtractStorageClass provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractStorageClass(storageClass *storagev1.StorageClass, fieldManager string) (*StorageClassApplyConfiguration, error) { return extractStorageClass(storageClass, fieldManager, "") } // ExtractStorageClassStatus is the same as ExtractStorageClass except // that it extracts the status subresource applied configuration. // Experimental! func ExtractStorageClassStatus(storageClass *storagev1.StorageClass, fieldManager string) (*StorageClassApplyConfiguration, error) { return extractStorageClass(storageClass, fieldManager, "status") } func extractStorageClass(storageClass *storagev1.StorageClass, fieldManager string, subresource string) (*StorageClassApplyConfiguration, error) { b := &StorageClassApplyConfiguration{} err := managedfields.ExtractInto(storageClass, internal.Parser().Type("io.k8s.api.storage.v1.StorageClass"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(storageClass.Name) b.WithKind("StorageClass") b.WithAPIVersion("storage.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithKind(value string) *StorageClassApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithAPIVersion(value string) *StorageClassApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithName(value string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithGenerateName(value string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithNamespace(value string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithUID(value types.UID) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithResourceVersion(value string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithGeneration(value int64) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *StorageClassApplyConfiguration) WithLabels(entries map[string]string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *StorageClassApplyConfiguration) WithAnnotations(entries map[string]string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *StorageClassApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *StorageClassApplyConfiguration) WithFinalizers(values ...string) *StorageClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *StorageClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithProvisioner sets the Provisioner 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 Provisioner field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithProvisioner(value string) *StorageClassApplyConfiguration { b.Provisioner = &value return b } // WithParameters puts the entries into the Parameters field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Parameters field, // overwriting an existing map entries in Parameters field with the same key. func (b *StorageClassApplyConfiguration) WithParameters(entries map[string]string) *StorageClassApplyConfiguration { if b.Parameters == nil && len(entries) > 0 { b.Parameters = make(map[string]string, len(entries)) } for k, v := range entries { b.Parameters[k] = v } return b } // WithReclaimPolicy sets the ReclaimPolicy 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 ReclaimPolicy field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithReclaimPolicy(value corev1.PersistentVolumeReclaimPolicy) *StorageClassApplyConfiguration { b.ReclaimPolicy = &value return b } // WithMountOptions adds the given value to the MountOptions 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 MountOptions field. func (b *StorageClassApplyConfiguration) WithMountOptions(values ...string) *StorageClassApplyConfiguration { for i := range values { b.MountOptions = append(b.MountOptions, values[i]) } return b } // WithAllowVolumeExpansion sets the AllowVolumeExpansion 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 AllowVolumeExpansion field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithAllowVolumeExpansion(value bool) *StorageClassApplyConfiguration { b.AllowVolumeExpansion = &value return b } // WithVolumeBindingMode sets the VolumeBindingMode 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 VolumeBindingMode field is set to the value of the last call. func (b *StorageClassApplyConfiguration) WithVolumeBindingMode(value storagev1.VolumeBindingMode) *StorageClassApplyConfiguration { b.VolumeBindingMode = &value return b } // WithAllowedTopologies adds the given value to the AllowedTopologies 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 AllowedTopologies field. func (b *StorageClassApplyConfiguration) WithAllowedTopologies(values ...*applyconfigurationscorev1.TopologySelectorTermApplyConfiguration) *StorageClassApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithAllowedTopologies") } b.AllowedTopologies = append(b.AllowedTopologies, *values[i]) } return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *StorageClassApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go
/* 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 ( storagev1 "k8s.io/api/storage/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // VolumeAttachmentApplyConfiguration represents a declarative configuration of the VolumeAttachment type for use // with apply. type VolumeAttachmentApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *VolumeAttachmentSpecApplyConfiguration `json:"spec,omitempty"` Status *VolumeAttachmentStatusApplyConfiguration `json:"status,omitempty"` } // VolumeAttachment constructs a declarative configuration of the VolumeAttachment type for use with // apply. func VolumeAttachment(name string) *VolumeAttachmentApplyConfiguration { b := &VolumeAttachmentApplyConfiguration{} b.WithName(name) b.WithKind("VolumeAttachment") b.WithAPIVersion("storage.k8s.io/v1") return b } // ExtractVolumeAttachment extracts the applied configuration owned by fieldManager from // volumeAttachment. If no managedFields are found in volumeAttachment for fieldManager, a // VolumeAttachmentApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // volumeAttachment must be a unmodified VolumeAttachment API object that was retrieved from the Kubernetes API. // ExtractVolumeAttachment provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractVolumeAttachment(volumeAttachment *storagev1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) { return extractVolumeAttachment(volumeAttachment, fieldManager, "") } // ExtractVolumeAttachmentStatus is the same as ExtractVolumeAttachment except // that it extracts the status subresource applied configuration. // Experimental! func ExtractVolumeAttachmentStatus(volumeAttachment *storagev1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) { return extractVolumeAttachment(volumeAttachment, fieldManager, "status") } func extractVolumeAttachment(volumeAttachment *storagev1.VolumeAttachment, fieldManager string, subresource string) (*VolumeAttachmentApplyConfiguration, error) { b := &VolumeAttachmentApplyConfiguration{} err := managedfields.ExtractInto(volumeAttachment, internal.Parser().Type("io.k8s.api.storage.v1.VolumeAttachment"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(volumeAttachment.Name) b.WithKind("VolumeAttachment") b.WithAPIVersion("storage.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithKind(value string) *VolumeAttachmentApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithAPIVersion(value string) *VolumeAttachmentApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithName(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithGenerateName(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithUID(value types.UID) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithResourceVersion(value string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithGeneration(value int64) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *VolumeAttachmentApplyConfiguration) WithLabels(entries map[string]string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *VolumeAttachmentApplyConfiguration) WithAnnotations(entries map[string]string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *VolumeAttachmentApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *VolumeAttachmentApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *VolumeAttachmentApplyConfiguration) WithSpec(value *VolumeAttachmentSpecApplyConfiguration) *VolumeAttachmentApplyConfiguration { 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 *VolumeAttachmentApplyConfiguration) WithStatus(value *VolumeAttachmentStatusApplyConfiguration) *VolumeAttachmentApplyConfiguration { b.Status = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *VolumeAttachmentApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentstatus.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentstatus.go
/* 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 // VolumeAttachmentStatusApplyConfiguration represents a declarative configuration of the VolumeAttachmentStatus type for use // with apply. type VolumeAttachmentStatusApplyConfiguration struct { Attached *bool `json:"attached,omitempty"` AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty"` AttachError *VolumeErrorApplyConfiguration `json:"attachError,omitempty"` DetachError *VolumeErrorApplyConfiguration `json:"detachError,omitempty"` } // VolumeAttachmentStatusApplyConfiguration constructs a declarative configuration of the VolumeAttachmentStatus type for use with // apply. func VolumeAttachmentStatus() *VolumeAttachmentStatusApplyConfiguration { return &VolumeAttachmentStatusApplyConfiguration{} } // WithAttached sets the Attached 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 Attached field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttached(value bool) *VolumeAttachmentStatusApplyConfiguration { b.Attached = &value return b } // WithAttachmentMetadata puts the entries into the AttachmentMetadata field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the AttachmentMetadata field, // overwriting an existing map entries in AttachmentMetadata field with the same key. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachmentMetadata(entries map[string]string) *VolumeAttachmentStatusApplyConfiguration { if b.AttachmentMetadata == nil && len(entries) > 0 { b.AttachmentMetadata = make(map[string]string, len(entries)) } for k, v := range entries { b.AttachmentMetadata[k] = v } return b } // WithAttachError sets the AttachError 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 AttachError field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration { b.AttachError = value return b } // WithDetachError sets the DetachError 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 DetachError field is set to the value of the last call. func (b *VolumeAttachmentStatusApplyConfiguration) WithDetachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration { b.DetachError = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/tokenrequest.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/tokenrequest.go
/* 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 // TokenRequestApplyConfiguration represents a declarative configuration of the TokenRequest type for use // with apply. type TokenRequestApplyConfiguration struct { Audience *string `json:"audience,omitempty"` ExpirationSeconds *int64 `json:"expirationSeconds,omitempty"` } // TokenRequestApplyConfiguration constructs a declarative configuration of the TokenRequest type for use with // apply. func TokenRequest() *TokenRequestApplyConfiguration { return &TokenRequestApplyConfiguration{} } // WithAudience sets the Audience 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 Audience field is set to the value of the last call. func (b *TokenRequestApplyConfiguration) WithAudience(value string) *TokenRequestApplyConfiguration { b.Audience = &value return b } // WithExpirationSeconds sets the ExpirationSeconds 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 ExpirationSeconds field is set to the value of the last call. func (b *TokenRequestApplyConfiguration) WithExpirationSeconds(value int64) *TokenRequestApplyConfiguration { b.ExpirationSeconds = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentsource.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachmentsource.go
/* 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 ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" ) // VolumeAttachmentSourceApplyConfiguration represents a declarative configuration of the VolumeAttachmentSource type for use // with apply. type VolumeAttachmentSourceApplyConfiguration struct { PersistentVolumeName *string `json:"persistentVolumeName,omitempty"` InlineVolumeSpec *corev1.PersistentVolumeSpecApplyConfiguration `json:"inlineVolumeSpec,omitempty"` } // VolumeAttachmentSourceApplyConfiguration constructs a declarative configuration of the VolumeAttachmentSource type for use with // apply. func VolumeAttachmentSource() *VolumeAttachmentSourceApplyConfiguration { return &VolumeAttachmentSourceApplyConfiguration{} } // WithPersistentVolumeName sets the PersistentVolumeName 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 PersistentVolumeName field is set to the value of the last call. func (b *VolumeAttachmentSourceApplyConfiguration) WithPersistentVolumeName(value string) *VolumeAttachmentSourceApplyConfiguration { b.PersistentVolumeName = &value return b } // WithInlineVolumeSpec sets the InlineVolumeSpec 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 InlineVolumeSpec field is set to the value of the last call. func (b *VolumeAttachmentSourceApplyConfiguration) WithInlineVolumeSpec(value *corev1.PersistentVolumeSpecApplyConfiguration) *VolumeAttachmentSourceApplyConfiguration { b.InlineVolumeSpec = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumenoderesources.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumenoderesources.go
/* 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 // VolumeNodeResourcesApplyConfiguration represents a declarative configuration of the VolumeNodeResources type for use // with apply. type VolumeNodeResourcesApplyConfiguration struct { Count *int32 `json:"count,omitempty"` } // VolumeNodeResourcesApplyConfiguration constructs a declarative configuration of the VolumeNodeResources type for use with // apply. func VolumeNodeResources() *VolumeNodeResourcesApplyConfiguration { return &VolumeNodeResourcesApplyConfiguration{} } // WithCount sets the Count 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 Count field is set to the value of the last call. func (b *VolumeNodeResourcesApplyConfiguration) WithCount(value int32) *VolumeNodeResourcesApplyConfiguration { b.Count = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go
/* 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 ( storagev1 "k8s.io/api/storage/v1" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CSINodeApplyConfiguration represents a declarative configuration of the CSINode type for use // with apply. type CSINodeApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` Spec *CSINodeSpecApplyConfiguration `json:"spec,omitempty"` } // CSINode constructs a declarative configuration of the CSINode type for use with // apply. func CSINode(name string) *CSINodeApplyConfiguration { b := &CSINodeApplyConfiguration{} b.WithName(name) b.WithKind("CSINode") b.WithAPIVersion("storage.k8s.io/v1") return b } // ExtractCSINode extracts the applied configuration owned by fieldManager from // cSINode. If no managedFields are found in cSINode for fieldManager, a // CSINodeApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cSINode must be a unmodified CSINode API object that was retrieved from the Kubernetes API. // ExtractCSINode provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCSINode(cSINode *storagev1.CSINode, fieldManager string) (*CSINodeApplyConfiguration, error) { return extractCSINode(cSINode, fieldManager, "") } // ExtractCSINodeStatus is the same as ExtractCSINode except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCSINodeStatus(cSINode *storagev1.CSINode, fieldManager string) (*CSINodeApplyConfiguration, error) { return extractCSINode(cSINode, fieldManager, "status") } func extractCSINode(cSINode *storagev1.CSINode, fieldManager string, subresource string) (*CSINodeApplyConfiguration, error) { b := &CSINodeApplyConfiguration{} err := managedfields.ExtractInto(cSINode, internal.Parser().Type("io.k8s.api.storage.v1.CSINode"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cSINode.Name) b.WithKind("CSINode") b.WithAPIVersion("storage.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithKind(value string) *CSINodeApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithAPIVersion(value string) *CSINodeApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithName(value string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithGenerateName(value string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithNamespace(value string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithUID(value types.UID) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithResourceVersion(value string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithGeneration(value int64) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CSINodeApplyConfiguration) WithLabels(entries map[string]string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CSINodeApplyConfiguration) WithAnnotations(entries map[string]string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CSINodeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CSINodeApplyConfiguration) WithFinalizers(values ...string) *CSINodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CSINodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithSpec sets the Spec 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 Spec field is set to the value of the last call. func (b *CSINodeApplyConfiguration) WithSpec(value *CSINodeSpecApplyConfiguration) *CSINodeApplyConfiguration { b.Spec = value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CSINodeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csistoragecapacity.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csistoragecapacity.go
/* 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 ( storagev1 "k8s.io/api/storage/v1" resource "k8s.io/apimachinery/pkg/api/resource" apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CSIStorageCapacityApplyConfiguration represents a declarative configuration of the CSIStorageCapacity type for use // with apply. type CSIStorageCapacityApplyConfiguration struct { metav1.TypeMetaApplyConfiguration `json:",inline"` *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` NodeTopology *metav1.LabelSelectorApplyConfiguration `json:"nodeTopology,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` Capacity *resource.Quantity `json:"capacity,omitempty"` MaximumVolumeSize *resource.Quantity `json:"maximumVolumeSize,omitempty"` } // CSIStorageCapacity constructs a declarative configuration of the CSIStorageCapacity type for use with // apply. func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfiguration { b := &CSIStorageCapacityApplyConfiguration{} b.WithName(name) b.WithNamespace(namespace) b.WithKind("CSIStorageCapacity") b.WithAPIVersion("storage.k8s.io/v1") return b } // ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from // cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a // CSIStorageCapacityApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. // cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API. // ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! func ExtractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "") } // ExtractCSIStorageCapacityStatus is the same as ExtractCSIStorageCapacity except // that it extracts the status subresource applied configuration. // Experimental! func ExtractCSIStorageCapacityStatus(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "status") } func extractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string, subresource string) (*CSIStorageCapacityApplyConfiguration, error) { b := &CSIStorageCapacityApplyConfiguration{} err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1.CSIStorageCapacity"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(cSIStorageCapacity.Name) b.WithNamespace(cSIStorageCapacity.Namespace) b.WithKind("CSIStorageCapacity") b.WithAPIVersion("storage.k8s.io/v1") return b, nil } // WithKind sets the Kind 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 Kind field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithKind(value string) *CSIStorageCapacityApplyConfiguration { b.TypeMetaApplyConfiguration.Kind = &value return b } // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithAPIVersion(value string) *CSIStorageCapacityApplyConfiguration { b.TypeMetaApplyConfiguration.APIVersion = &value return b } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithName(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Name = &value return b } // WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithGenerateName(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.GenerateName = &value return b } // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Namespace = &value return b } // WithUID sets the UID 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 UID field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithUID(value types.UID) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.UID = &value return b } // WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithResourceVersion(value string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } // WithGeneration sets the Generation 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 Generation field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithGeneration(value int64) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } // WithLabels puts the entries into the Labels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. func (b *CSIStorageCapacityApplyConfiguration) WithLabels(entries map[string]string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } // WithAnnotations puts the entries into the Annotations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. func (b *CSIStorageCapacityApplyConfiguration) WithAnnotations(entries map[string]string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } // WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. func (b *CSIStorageCapacityApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } // WithFinalizers adds the given value to the Finalizers 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 Finalizers field. func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) *CSIStorageCapacityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } // WithNodeTopology sets the NodeTopology 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 NodeTopology field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithNodeTopology(value *metav1.LabelSelectorApplyConfiguration) *CSIStorageCapacityApplyConfiguration { b.NodeTopology = value return b } // WithStorageClassName sets the StorageClassName 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 StorageClassName field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithStorageClassName(value string) *CSIStorageCapacityApplyConfiguration { b.StorageClassName = &value return b } // WithCapacity sets the Capacity 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 Capacity field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithCapacity(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { b.Capacity = &value return b } // WithMaximumVolumeSize sets the MaximumVolumeSize 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 MaximumVolumeSize field is set to the value of the last call. func (b *CSIStorageCapacityApplyConfiguration) WithMaximumVolumeSize(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { b.MaximumVolumeSize = &value return b } // GetName retrieves the value of the Name field in the declarative configuration. func (b *CSIStorageCapacityApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriverspec.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriverspec.go
/* 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 ( storagev1 "k8s.io/api/storage/v1" ) // CSIDriverSpecApplyConfiguration represents a declarative configuration of the CSIDriverSpec type for use // with apply. type CSIDriverSpecApplyConfiguration struct { AttachRequired *bool `json:"attachRequired,omitempty"` PodInfoOnMount *bool `json:"podInfoOnMount,omitempty"` VolumeLifecycleModes []storagev1.VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty"` StorageCapacity *bool `json:"storageCapacity,omitempty"` FSGroupPolicy *storagev1.FSGroupPolicy `json:"fsGroupPolicy,omitempty"` TokenRequests []TokenRequestApplyConfiguration `json:"tokenRequests,omitempty"` RequiresRepublish *bool `json:"requiresRepublish,omitempty"` SELinuxMount *bool `json:"seLinuxMount,omitempty"` } // CSIDriverSpecApplyConfiguration constructs a declarative configuration of the CSIDriverSpec type for use with // apply. func CSIDriverSpec() *CSIDriverSpecApplyConfiguration { return &CSIDriverSpecApplyConfiguration{} } // WithAttachRequired sets the AttachRequired 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 AttachRequired field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithAttachRequired(value bool) *CSIDriverSpecApplyConfiguration { b.AttachRequired = &value return b } // WithPodInfoOnMount sets the PodInfoOnMount 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 PodInfoOnMount field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithPodInfoOnMount(value bool) *CSIDriverSpecApplyConfiguration { b.PodInfoOnMount = &value return b } // WithVolumeLifecycleModes adds the given value to the VolumeLifecycleModes 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 VolumeLifecycleModes field. func (b *CSIDriverSpecApplyConfiguration) WithVolumeLifecycleModes(values ...storagev1.VolumeLifecycleMode) *CSIDriverSpecApplyConfiguration { for i := range values { b.VolumeLifecycleModes = append(b.VolumeLifecycleModes, values[i]) } return b } // WithStorageCapacity sets the StorageCapacity 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 StorageCapacity field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithStorageCapacity(value bool) *CSIDriverSpecApplyConfiguration { b.StorageCapacity = &value return b } // WithFSGroupPolicy sets the FSGroupPolicy 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 FSGroupPolicy field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithFSGroupPolicy(value storagev1.FSGroupPolicy) *CSIDriverSpecApplyConfiguration { b.FSGroupPolicy = &value return b } // WithTokenRequests adds the given value to the TokenRequests 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 TokenRequests field. func (b *CSIDriverSpecApplyConfiguration) WithTokenRequests(values ...*TokenRequestApplyConfiguration) *CSIDriverSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithTokenRequests") } b.TokenRequests = append(b.TokenRequests, *values[i]) } return b } // WithRequiresRepublish sets the RequiresRepublish 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 RequiresRepublish field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithRequiresRepublish(value bool) *CSIDriverSpecApplyConfiguration { b.RequiresRepublish = &value return b } // WithSELinuxMount sets the SELinuxMount 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 SELinuxMount field is set to the value of the last call. func (b *CSIDriverSpecApplyConfiguration) WithSELinuxMount(value bool) *CSIDriverSpecApplyConfiguration { b.SELinuxMount = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinodedriver.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinodedriver.go
/* 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 // CSINodeDriverApplyConfiguration represents a declarative configuration of the CSINodeDriver type for use // with apply. type CSINodeDriverApplyConfiguration struct { Name *string `json:"name,omitempty"` NodeID *string `json:"nodeID,omitempty"` TopologyKeys []string `json:"topologyKeys,omitempty"` Allocatable *VolumeNodeResourcesApplyConfiguration `json:"allocatable,omitempty"` } // CSINodeDriverApplyConfiguration constructs a declarative configuration of the CSINodeDriver type for use with // apply. func CSINodeDriver() *CSINodeDriverApplyConfiguration { return &CSINodeDriverApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithName(value string) *CSINodeDriverApplyConfiguration { b.Name = &value return b } // WithNodeID sets the NodeID 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 NodeID field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithNodeID(value string) *CSINodeDriverApplyConfiguration { b.NodeID = &value return b } // WithTopologyKeys adds the given value to the TopologyKeys 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 TopologyKeys field. func (b *CSINodeDriverApplyConfiguration) WithTopologyKeys(values ...string) *CSINodeDriverApplyConfiguration { for i := range values { b.TopologyKeys = append(b.TopologyKeys, values[i]) } return b } // WithAllocatable sets the Allocatable 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 Allocatable field is set to the value of the last call. func (b *CSINodeDriverApplyConfiguration) WithAllocatable(value *VolumeNodeResourcesApplyConfiguration) *CSINodeDriverApplyConfiguration { b.Allocatable = value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachmentspec.go
vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachmentspec.go
/* 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 // VolumeAttachmentSpecApplyConfiguration represents a declarative configuration of the VolumeAttachmentSpec type for use // with apply. type VolumeAttachmentSpecApplyConfiguration struct { Attacher *string `json:"attacher,omitempty"` Source *VolumeAttachmentSourceApplyConfiguration `json:"source,omitempty"` NodeName *string `json:"nodeName,omitempty"` } // VolumeAttachmentSpecApplyConfiguration constructs a declarative configuration of the VolumeAttachmentSpec type for use with // apply. func VolumeAttachmentSpec() *VolumeAttachmentSpecApplyConfiguration { return &VolumeAttachmentSpecApplyConfiguration{} } // WithAttacher sets the Attacher 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 Attacher field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithAttacher(value string) *VolumeAttachmentSpecApplyConfiguration { b.Attacher = &value return b } // WithSource sets the Source 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 Source field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithSource(value *VolumeAttachmentSourceApplyConfiguration) *VolumeAttachmentSpecApplyConfiguration { b.Source = value return b } // WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call. func (b *VolumeAttachmentSpecApplyConfiguration) WithNodeName(value string) *VolumeAttachmentSpecApplyConfiguration { b.NodeName = &value return b }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false