mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 15:39:39 +00:00
Merge pull request #123516 from pohly/dra-structured-parameters
DRA: structured parameters Kubernetes-commit: 7ea3d0245a63fbbba698f1cb939831fe8143db3e
This commit is contained in:
commit
84dfaee610
@ -11966,6 +11966,119 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: shareable
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: io.k8s.api.resource.v1alpha2.DriverAllocationResult
|
||||
map:
|
||||
fields:
|
||||
- name: namedResources
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult
|
||||
- name: vendorRequestParameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.resource.v1alpha2.DriverRequests
|
||||
map:
|
||||
fields:
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
- name: requests
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceRequest
|
||||
elementRelationship: atomic
|
||||
- name: vendorParameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult
|
||||
map:
|
||||
fields:
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute
|
||||
map:
|
||||
fields:
|
||||
- name: bool
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: int
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: intSlice
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: quantity
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: string
|
||||
type:
|
||||
scalar: string
|
||||
- name: stringSlice
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice
|
||||
- name: version
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesFilter
|
||||
map:
|
||||
fields:
|
||||
- name: selector
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesInstance
|
||||
map:
|
||||
fields:
|
||||
- name: attributes
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute
|
||||
elementRelationship: atomic
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice
|
||||
map:
|
||||
fields:
|
||||
- name: ints
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: numeric
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesRequest
|
||||
map:
|
||||
fields:
|
||||
- name: selector
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesResources
|
||||
map:
|
||||
fields:
|
||||
- name: instances
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesInstance
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice
|
||||
map:
|
||||
fields:
|
||||
- name: strings
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha2.PodSchedulingContext
|
||||
map:
|
||||
fields:
|
||||
@ -12049,6 +12162,31 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceClaimParameters
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: driverRequests
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.DriverRequests
|
||||
elementRelationship: atomic
|
||||
- name: generatedFrom
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
- name: metadata
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||
default: {}
|
||||
- name: shareable
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
|
||||
map:
|
||||
fields:
|
||||
@ -12156,9 +12294,40 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: parametersRef
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
|
||||
- name: structuredParameters
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: suitableNodes
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeSelector
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceClassParameters
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: filters
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceFilter
|
||||
elementRelationship: atomic
|
||||
- name: generatedFrom
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
- name: metadata
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||
default: {}
|
||||
- name: vendorParameters
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.VendorParameters
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
|
||||
map:
|
||||
fields:
|
||||
@ -12176,6 +12345,15 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: namespace
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceFilter
|
||||
map:
|
||||
fields:
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
- name: namedResources
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesFilter
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceHandle
|
||||
map:
|
||||
fields:
|
||||
@ -12185,6 +12363,68 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
- name: structuredData
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceRequest
|
||||
map:
|
||||
fields:
|
||||
- name: namedResources
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesRequest
|
||||
- name: vendorParameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.resource.v1alpha2.ResourceSlice
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
- name: metadata
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||
default: {}
|
||||
- name: namedResources
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.NamedResourcesResources
|
||||
- name: nodeName
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha2.StructuredResourceHandle
|
||||
map:
|
||||
fields:
|
||||
- name: nodeName
|
||||
type:
|
||||
scalar: string
|
||||
- name: results
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha2.DriverAllocationResult
|
||||
elementRelationship: atomic
|
||||
- name: vendorClaimParameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: vendorClassParameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.resource.v1alpha2.VendorParameters
|
||||
map:
|
||||
fields:
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
- name: parameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.scheduling.v1.PriorityClass
|
||||
map:
|
||||
fields:
|
||||
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// AllocationResultModelApplyConfiguration represents an declarative configuration of the AllocationResultModel type for use
|
||||
// with apply.
|
||||
type AllocationResultModelApplyConfiguration struct {
|
||||
NamedResources *NamedResourcesAllocationResultApplyConfiguration `json:"namedResources,omitempty"`
|
||||
}
|
||||
|
||||
// AllocationResultModelApplyConfiguration constructs an declarative configuration of the AllocationResultModel type for use with
|
||||
// apply.
|
||||
func AllocationResultModel() *AllocationResultModelApplyConfiguration {
|
||||
return &AllocationResultModelApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *AllocationResultModelApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *AllocationResultModelApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DriverAllocationResultApplyConfiguration represents an declarative configuration of the DriverAllocationResult type for use
|
||||
// with apply.
|
||||
type DriverAllocationResultApplyConfiguration struct {
|
||||
VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"`
|
||||
AllocationResultModelApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// DriverAllocationResultApplyConfiguration constructs an declarative configuration of the DriverAllocationResult type for use with
|
||||
// apply.
|
||||
func DriverAllocationResult() *DriverAllocationResultApplyConfiguration {
|
||||
return &DriverAllocationResultApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVendorRequestParameters sets the VendorRequestParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VendorRequestParameters field is set to the value of the last call.
|
||||
func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration {
|
||||
b.VendorRequestParameters = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *DriverAllocationResultApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *DriverAllocationResultApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
66
applyconfigurations/resource/v1alpha2/driverrequests.go
Normal file
66
applyconfigurations/resource/v1alpha2/driverrequests.go
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DriverRequestsApplyConfiguration represents an declarative configuration of the DriverRequests type for use
|
||||
// with apply.
|
||||
type DriverRequestsApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"`
|
||||
Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// DriverRequestsApplyConfiguration constructs an declarative configuration of the DriverRequests type for use with
|
||||
// apply.
|
||||
func DriverRequests() *DriverRequestsApplyConfiguration {
|
||||
return &DriverRequestsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration {
|
||||
b.DriverName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VendorParameters field is set to the value of the last call.
|
||||
func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration {
|
||||
b.VendorParameters = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequests adds the given value to the Requests 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 Requests field.
|
||||
func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRequests")
|
||||
}
|
||||
b.Requests = append(b.Requests, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesAllocationResultApplyConfiguration represents an declarative configuration of the NamedResourcesAllocationResult type for use
|
||||
// with apply.
|
||||
type NamedResourcesAllocationResultApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesAllocationResultApplyConfiguration constructs an declarative configuration of the NamedResourcesAllocationResult type for use with
|
||||
// apply.
|
||||
func NamedResourcesAllocationResult() *NamedResourcesAllocationResultApplyConfiguration {
|
||||
return &NamedResourcesAllocationResultApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *NamedResourcesAllocationResultApplyConfiguration) WithName(value string) *NamedResourcesAllocationResultApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
100
applyconfigurations/resource/v1alpha2/namedresourcesattribute.go
Normal file
100
applyconfigurations/resource/v1alpha2/namedresourcesattribute.go
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// NamedResourcesAttributeApplyConfiguration represents an declarative configuration of the NamedResourcesAttribute type for use
|
||||
// with apply.
|
||||
type NamedResourcesAttributeApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
NamedResourcesAttributeValueApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// NamedResourcesAttributeApplyConfiguration constructs an declarative configuration of the NamedResourcesAttribute type for use with
|
||||
// apply.
|
||||
func NamedResourcesAttribute() *NamedResourcesAttributeApplyConfiguration {
|
||||
return &NamedResourcesAttributeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *NamedResourcesAttributeApplyConfiguration) WithName(value string) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the QuantityValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.QuantityValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBoolValue sets the BoolValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BoolValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.BoolValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIntValue sets the IntValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IntValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.IntValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IntSliceValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.IntSliceValue = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStringValue sets the StringValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StringValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.StringValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StringSliceValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.StringSliceValue = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersionValue sets the VersionValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VersionValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeApplyConfiguration {
|
||||
b.VersionValue = &value
|
||||
return b
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// NamedResourcesAttributeValueApplyConfiguration represents an declarative configuration of the NamedResourcesAttributeValue type for use
|
||||
// with apply.
|
||||
type NamedResourcesAttributeValueApplyConfiguration struct {
|
||||
QuantityValue *resource.Quantity `json:"quantity,omitempty"`
|
||||
BoolValue *bool `json:"bool,omitempty"`
|
||||
IntValue *int64 `json:"int,omitempty"`
|
||||
IntSliceValue *NamedResourcesIntSliceApplyConfiguration `json:"intSlice,omitempty"`
|
||||
StringValue *string `json:"string,omitempty"`
|
||||
StringSliceValue *NamedResourcesStringSliceApplyConfiguration `json:"stringSlice,omitempty"`
|
||||
VersionValue *string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesAttributeValueApplyConfiguration constructs an declarative configuration of the NamedResourcesAttributeValue type for use with
|
||||
// apply.
|
||||
func NamedResourcesAttributeValue() *NamedResourcesAttributeValueApplyConfiguration {
|
||||
return &NamedResourcesAttributeValueApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the QuantityValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.QuantityValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBoolValue sets the BoolValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BoolValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.BoolValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIntValue sets the IntValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IntValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.IntValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IntSliceValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.IntSliceValue = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStringValue sets the StringValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StringValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.StringValue = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StringSliceValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.StringSliceValue = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVersionValue sets the VersionValue field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VersionValue field is set to the value of the last call.
|
||||
func (b *NamedResourcesAttributeValueApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeValueApplyConfiguration {
|
||||
b.VersionValue = &value
|
||||
return b
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesFilterApplyConfiguration represents an declarative configuration of the NamedResourcesFilter type for use
|
||||
// with apply.
|
||||
type NamedResourcesFilterApplyConfiguration struct {
|
||||
Selector *string `json:"selector,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesFilterApplyConfiguration constructs an declarative configuration of the NamedResourcesFilter type for use with
|
||||
// apply.
|
||||
func NamedResourcesFilter() *NamedResourcesFilterApplyConfiguration {
|
||||
return &NamedResourcesFilterApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *NamedResourcesFilterApplyConfiguration) WithSelector(value string) *NamedResourcesFilterApplyConfiguration {
|
||||
b.Selector = &value
|
||||
return b
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesInstanceApplyConfiguration represents an declarative configuration of the NamedResourcesInstance type for use
|
||||
// with apply.
|
||||
type NamedResourcesInstanceApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Attributes []NamedResourcesAttributeApplyConfiguration `json:"attributes,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesInstanceApplyConfiguration constructs an declarative configuration of the NamedResourcesInstance type for use with
|
||||
// apply.
|
||||
func NamedResourcesInstance() *NamedResourcesInstanceApplyConfiguration {
|
||||
return &NamedResourcesInstanceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *NamedResourcesInstanceApplyConfiguration) WithName(value string) *NamedResourcesInstanceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAttributes adds the given value to the Attributes 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 Attributes field.
|
||||
func (b *NamedResourcesInstanceApplyConfiguration) WithAttributes(values ...*NamedResourcesAttributeApplyConfiguration) *NamedResourcesInstanceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithAttributes")
|
||||
}
|
||||
b.Attributes = append(b.Attributes, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesIntSliceApplyConfiguration represents an declarative configuration of the NamedResourcesIntSlice type for use
|
||||
// with apply.
|
||||
type NamedResourcesIntSliceApplyConfiguration struct {
|
||||
Ints []int64 `json:"ints,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesIntSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesIntSlice type for use with
|
||||
// apply.
|
||||
func NamedResourcesIntSlice() *NamedResourcesIntSliceApplyConfiguration {
|
||||
return &NamedResourcesIntSliceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithInts adds the given value to the Ints 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 Ints field.
|
||||
func (b *NamedResourcesIntSliceApplyConfiguration) WithInts(values ...int64) *NamedResourcesIntSliceApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Ints = append(b.Ints, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesRequestApplyConfiguration represents an declarative configuration of the NamedResourcesRequest type for use
|
||||
// with apply.
|
||||
type NamedResourcesRequestApplyConfiguration struct {
|
||||
Selector *string `json:"selector,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesRequestApplyConfiguration constructs an declarative configuration of the NamedResourcesRequest type for use with
|
||||
// apply.
|
||||
func NamedResourcesRequest() *NamedResourcesRequestApplyConfiguration {
|
||||
return &NamedResourcesRequestApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *NamedResourcesRequestApplyConfiguration) WithSelector(value string) *NamedResourcesRequestApplyConfiguration {
|
||||
b.Selector = &value
|
||||
return b
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesResourcesApplyConfiguration represents an declarative configuration of the NamedResourcesResources type for use
|
||||
// with apply.
|
||||
type NamedResourcesResourcesApplyConfiguration struct {
|
||||
Instances []NamedResourcesInstanceApplyConfiguration `json:"instances,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesResourcesApplyConfiguration constructs an declarative configuration of the NamedResourcesResources type for use with
|
||||
// apply.
|
||||
func NamedResourcesResources() *NamedResourcesResourcesApplyConfiguration {
|
||||
return &NamedResourcesResourcesApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithInstances adds the given value to the Instances 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 Instances field.
|
||||
func (b *NamedResourcesResourcesApplyConfiguration) WithInstances(values ...*NamedResourcesInstanceApplyConfiguration) *NamedResourcesResourcesApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithInstances")
|
||||
}
|
||||
b.Instances = append(b.Instances, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NamedResourcesStringSliceApplyConfiguration represents an declarative configuration of the NamedResourcesStringSlice type for use
|
||||
// with apply.
|
||||
type NamedResourcesStringSliceApplyConfiguration struct {
|
||||
Strings []string `json:"strings,omitempty"`
|
||||
}
|
||||
|
||||
// NamedResourcesStringSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesStringSlice type for use with
|
||||
// apply.
|
||||
func NamedResourcesStringSlice() *NamedResourcesStringSliceApplyConfiguration {
|
||||
return &NamedResourcesStringSliceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithStrings adds the given value to the Strings 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 Strings field.
|
||||
func (b *NamedResourcesStringSliceApplyConfiguration) WithStrings(values ...string) *NamedResourcesStringSliceApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Strings = append(b.Strings, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
39
applyconfigurations/resource/v1alpha2/noderesourcemodel.go
Normal file
39
applyconfigurations/resource/v1alpha2/noderesourcemodel.go
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// NodeResourceModelApplyConfiguration represents an declarative configuration of the NodeResourceModel type for use
|
||||
// with apply.
|
||||
type NodeResourceModelApplyConfiguration struct {
|
||||
NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"`
|
||||
}
|
||||
|
||||
// NodeResourceModelApplyConfiguration constructs an declarative configuration of the NodeResourceModel type for use with
|
||||
// apply.
|
||||
func NodeResourceModel() *NodeResourceModelApplyConfiguration {
|
||||
return &NodeResourceModelApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *NodeResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *NodeResourceModelApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
272
applyconfigurations/resource/v1alpha2/resourceclaimparameters.go
Normal file
272
applyconfigurations/resource/v1alpha2/resourceclaimparameters.go
Normal file
@ -0,0 +1,272 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
)
|
||||
|
||||
// ResourceClaimParametersApplyConfiguration represents an declarative configuration of the ResourceClaimParameters type for use
|
||||
// with apply.
|
||||
type ResourceClaimParametersApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"`
|
||||
Shareable *bool `json:"shareable,omitempty"`
|
||||
DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClaimParameters constructs an declarative configuration of the ResourceClaimParameters type for use with
|
||||
// apply.
|
||||
func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration {
|
||||
b := &ResourceClaimParametersApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("ResourceClaimParameters")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from
|
||||
// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a
|
||||
// ResourceClaimParametersApplyConfiguration 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.
|
||||
// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API.
|
||||
// ExtractResourceClaimParameters 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 ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) {
|
||||
return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) {
|
||||
return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) {
|
||||
b := &ResourceClaimParametersApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimParameters"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(resourceClaimParameters.Name)
|
||||
b.WithNamespace(resourceClaimParameters.Namespace)
|
||||
|
||||
b.WithKind("ResourceClaimParameters")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
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 *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.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 *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GeneratedFrom field is set to the value of the last call.
|
||||
func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
|
||||
b.GeneratedFrom = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareable sets the Shareable field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Shareable field is set to the value of the last call.
|
||||
func (b *ResourceClaimParametersApplyConfiguration) WithShareable(value bool) *ResourceClaimParametersApplyConfiguration {
|
||||
b.Shareable = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDriverRequests adds the given value to the DriverRequests 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 DriverRequests field.
|
||||
func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithDriverRequests")
|
||||
}
|
||||
b.DriverRequests = append(b.DriverRequests, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -36,6 +36,7 @@ type ResourceClassApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
|
||||
SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"`
|
||||
StructuredParameters *bool `json:"structuredParameters,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClass constructs an declarative configuration of the ResourceClass type for use with
|
||||
@ -264,3 +265,11 @@ func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSe
|
||||
b.SuitableNodes = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStructuredParameters sets the StructuredParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StructuredParameters field is set to the value of the last call.
|
||||
func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration {
|
||||
b.StructuredParameters = &value
|
||||
return b
|
||||
}
|
||||
|
277
applyconfigurations/resource/v1alpha2/resourceclassparameters.go
Normal file
277
applyconfigurations/resource/v1alpha2/resourceclassparameters.go
Normal file
@ -0,0 +1,277 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
)
|
||||
|
||||
// ResourceClassParametersApplyConfiguration represents an declarative configuration of the ResourceClassParameters type for use
|
||||
// with apply.
|
||||
type ResourceClassParametersApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"`
|
||||
VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"`
|
||||
Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClassParameters constructs an declarative configuration of the ResourceClassParameters type for use with
|
||||
// apply.
|
||||
func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration {
|
||||
b := &ResourceClassParametersApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("ResourceClassParameters")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from
|
||||
// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a
|
||||
// ResourceClassParametersApplyConfiguration 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.
|
||||
// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API.
|
||||
// ExtractResourceClassParameters 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 ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) {
|
||||
return extractResourceClassParameters(resourceClassParameters, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) {
|
||||
return extractResourceClassParameters(resourceClassParameters, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) {
|
||||
b := &ResourceClassParametersApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClassParameters"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(resourceClassParameters.Name)
|
||||
b.WithNamespace(resourceClassParameters.Namespace)
|
||||
|
||||
b.WithKind("ResourceClassParameters")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
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 *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.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 *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GeneratedFrom field is set to the value of the last call.
|
||||
func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration {
|
||||
b.GeneratedFrom = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVendorParameters adds the given value to the VendorParameters 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 VendorParameters field.
|
||||
func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithVendorParameters")
|
||||
}
|
||||
b.VendorParameters = append(b.VendorParameters, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFilters adds the given value to the Filters 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 Filters field.
|
||||
func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithFilters")
|
||||
}
|
||||
b.Filters = append(b.Filters, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
48
applyconfigurations/resource/v1alpha2/resourcefilter.go
Normal file
48
applyconfigurations/resource/v1alpha2/resourcefilter.go
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// ResourceFilterApplyConfiguration represents an declarative configuration of the ResourceFilter type for use
|
||||
// with apply.
|
||||
type ResourceFilterApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
ResourceFilterModelApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// ResourceFilterApplyConfiguration constructs an declarative configuration of the ResourceFilter type for use with
|
||||
// apply.
|
||||
func ResourceFilter() *ResourceFilterApplyConfiguration {
|
||||
return &ResourceFilterApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration {
|
||||
b.DriverName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *ResourceFilterApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
39
applyconfigurations/resource/v1alpha2/resourcefiltermodel.go
Normal file
39
applyconfigurations/resource/v1alpha2/resourcefiltermodel.go
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// ResourceFilterModelApplyConfiguration represents an declarative configuration of the ResourceFilterModel type for use
|
||||
// with apply.
|
||||
type ResourceFilterModelApplyConfiguration struct {
|
||||
NamedResources *NamedResourcesFilterApplyConfiguration `json:"namedResources,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceFilterModelApplyConfiguration constructs an declarative configuration of the ResourceFilterModel type for use with
|
||||
// apply.
|
||||
func ResourceFilterModel() *ResourceFilterModelApplyConfiguration {
|
||||
return &ResourceFilterModelApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *ResourceFilterModelApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterModelApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
@ -21,8 +21,9 @@ package v1alpha2
|
||||
// ResourceHandleApplyConfiguration represents an declarative configuration of the ResourceHandle type for use
|
||||
// with apply.
|
||||
type ResourceHandleApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
Data *string `json:"data,omitempty"`
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
Data *string `json:"data,omitempty"`
|
||||
StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceHandleApplyConfiguration constructs an declarative configuration of the ResourceHandle type for use with
|
||||
@ -46,3 +47,11 @@ func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandl
|
||||
b.Data = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStructuredData sets the StructuredData field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StructuredData field is set to the value of the last call.
|
||||
func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration {
|
||||
b.StructuredData = value
|
||||
return b
|
||||
}
|
||||
|
52
applyconfigurations/resource/v1alpha2/resourcerequest.go
Normal file
52
applyconfigurations/resource/v1alpha2/resourcerequest.go
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// ResourceRequestApplyConfiguration represents an declarative configuration of the ResourceRequest type for use
|
||||
// with apply.
|
||||
type ResourceRequestApplyConfiguration struct {
|
||||
VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"`
|
||||
ResourceRequestModelApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// ResourceRequestApplyConfiguration constructs an declarative configuration of the ResourceRequest type for use with
|
||||
// apply.
|
||||
func ResourceRequest() *ResourceRequestApplyConfiguration {
|
||||
return &ResourceRequestApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VendorParameters field is set to the value of the last call.
|
||||
func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration {
|
||||
b.VendorParameters = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *ResourceRequestApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
// ResourceRequestModelApplyConfiguration represents an declarative configuration of the ResourceRequestModel type for use
|
||||
// with apply.
|
||||
type ResourceRequestModelApplyConfiguration struct {
|
||||
NamedResources *NamedResourcesRequestApplyConfiguration `json:"namedResources,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceRequestModelApplyConfiguration constructs an declarative configuration of the ResourceRequestModel type for use with
|
||||
// apply.
|
||||
func ResourceRequestModel() *ResourceRequestModelApplyConfiguration {
|
||||
return &ResourceRequestModelApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *ResourceRequestModelApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestModelApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
265
applyconfigurations/resource/v1alpha2/resourceslice.go
Normal file
265
applyconfigurations/resource/v1alpha2/resourceslice.go
Normal file
@ -0,0 +1,265 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
)
|
||||
|
||||
// ResourceSliceApplyConfiguration represents an declarative configuration of the ResourceSlice type for use
|
||||
// with apply.
|
||||
type ResourceSliceApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
NodeName *string `json:"nodeName,omitempty"`
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
NodeResourceModelApplyConfiguration `json:",inline"`
|
||||
}
|
||||
|
||||
// ResourceSlice constructs an declarative configuration of the ResourceSlice type for use with
|
||||
// apply.
|
||||
func ResourceSlice(name string) *ResourceSliceApplyConfiguration {
|
||||
b := &ResourceSliceApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("ResourceSlice")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractResourceSlice extracts the applied configuration owned by fieldManager from
|
||||
// resourceSlice. If no managedFields are found in resourceSlice for fieldManager, a
|
||||
// ResourceSliceApplyConfiguration 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.
|
||||
// resourceSlice must be a unmodified ResourceSlice API object that was retrieved from the Kubernetes API.
|
||||
// ExtractResourceSlice 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 ExtractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
|
||||
return extractResourceSlice(resourceSlice, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractResourceSliceStatus is the same as ExtractResourceSlice except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
|
||||
return extractResourceSlice(resourceSlice, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) {
|
||||
b := &ResourceSliceApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceSlice"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(resourceSlice.Name)
|
||||
|
||||
b.WithKind("ResourceSlice")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha2")
|
||||
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 *ResourceSliceApplyConfiguration) WithKind(value string) *ResourceSliceApplyConfiguration {
|
||||
b.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 *ResourceSliceApplyConfiguration) WithAPIVersion(value string) *ResourceSliceApplyConfiguration {
|
||||
b.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 *ResourceSliceApplyConfiguration) WithName(value string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithGenerateName(value string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithNamespace(value string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithUID(value types.UID) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithResourceVersion(value string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithGeneration(value int64) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.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 *ResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.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 *ResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.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 *ResourceSliceApplyConfiguration) WithFinalizers(values ...string) *ResourceSliceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// 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 *ResourceSliceApplyConfiguration) WithNodeName(value string) *ResourceSliceApplyConfiguration {
|
||||
b.NodeName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// 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 *ResourceSliceApplyConfiguration) WithDriverName(value string) *ResourceSliceApplyConfiguration {
|
||||
b.DriverName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NamedResources field is set to the value of the last call.
|
||||
func (b *ResourceSliceApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceSliceApplyConfiguration {
|
||||
b.NamedResources = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// StructuredResourceHandleApplyConfiguration represents an declarative configuration of the StructuredResourceHandle type for use
|
||||
// with apply.
|
||||
type StructuredResourceHandleApplyConfiguration struct {
|
||||
VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"`
|
||||
VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"`
|
||||
NodeName *string `json:"nodeName,omitempty"`
|
||||
Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"`
|
||||
}
|
||||
|
||||
// StructuredResourceHandleApplyConfiguration constructs an declarative configuration of the StructuredResourceHandle type for use with
|
||||
// apply.
|
||||
func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration {
|
||||
return &StructuredResourceHandleApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVendorClassParameters sets the VendorClassParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VendorClassParameters field is set to the value of the last call.
|
||||
func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration {
|
||||
b.VendorClassParameters = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVendorClaimParameters sets the VendorClaimParameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the VendorClaimParameters field is set to the value of the last call.
|
||||
func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration {
|
||||
b.VendorClaimParameters = &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 *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration {
|
||||
b.NodeName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResults adds the given value to the Results 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 Results field.
|
||||
func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResults")
|
||||
}
|
||||
b.Results = append(b.Results, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
52
applyconfigurations/resource/v1alpha2/vendorparameters.go
Normal file
52
applyconfigurations/resource/v1alpha2/vendorparameters.go
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 v1alpha2
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// VendorParametersApplyConfiguration represents an declarative configuration of the VendorParameters type for use
|
||||
// with apply.
|
||||
type VendorParametersApplyConfiguration struct {
|
||||
DriverName *string `json:"driverName,omitempty"`
|
||||
Parameters *runtime.RawExtension `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// VendorParametersApplyConfiguration constructs an declarative configuration of the VendorParameters type for use with
|
||||
// apply.
|
||||
func VendorParameters() *VendorParametersApplyConfiguration {
|
||||
return &VendorParametersApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration {
|
||||
b.DriverName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithParameters sets the Parameters field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Parameters field is set to the value of the last call.
|
||||
func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration {
|
||||
b.Parameters = &value
|
||||
return b
|
||||
}
|
@ -1527,6 +1527,32 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
// Group=resource.k8s.io, Version=v1alpha2
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||
return &resourcev1alpha2.AllocationResultApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("AllocationResultModel"):
|
||||
return &resourcev1alpha2.AllocationResultModelApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("DriverAllocationResult"):
|
||||
return &resourcev1alpha2.DriverAllocationResultApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("DriverRequests"):
|
||||
return &resourcev1alpha2.DriverRequestsApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAllocationResult"):
|
||||
return &resourcev1alpha2.NamedResourcesAllocationResultApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAttribute"):
|
||||
return &resourcev1alpha2.NamedResourcesAttributeApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAttributeValue"):
|
||||
return &resourcev1alpha2.NamedResourcesAttributeValueApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesFilter"):
|
||||
return &resourcev1alpha2.NamedResourcesFilterApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesInstance"):
|
||||
return &resourcev1alpha2.NamedResourcesInstanceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesIntSlice"):
|
||||
return &resourcev1alpha2.NamedResourcesIntSliceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesRequest"):
|
||||
return &resourcev1alpha2.NamedResourcesRequestApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesResources"):
|
||||
return &resourcev1alpha2.NamedResourcesResourcesApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"):
|
||||
return &resourcev1alpha2.NamedResourcesStringSliceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("NodeResourceModel"):
|
||||
return &resourcev1alpha2.NodeResourceModelApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"):
|
||||
return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"):
|
||||
@ -1537,6 +1563,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha2.ResourceClaimApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
|
||||
return &resourcev1alpha2.ResourceClaimConsumerReferenceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters"):
|
||||
return &resourcev1alpha2.ResourceClaimParametersApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"):
|
||||
return &resourcev1alpha2.ResourceClaimParametersReferenceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
|
||||
@ -1551,10 +1579,26 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha2.ResourceClaimTemplateSpecApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClass"):
|
||||
return &resourcev1alpha2.ResourceClassApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters"):
|
||||
return &resourcev1alpha2.ResourceClassParametersApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
|
||||
return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceFilter"):
|
||||
return &resourcev1alpha2.ResourceFilterApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceFilterModel"):
|
||||
return &resourcev1alpha2.ResourceFilterModelApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"):
|
||||
return &resourcev1alpha2.ResourceHandleApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequest"):
|
||||
return &resourcev1alpha2.ResourceRequestApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequestModel"):
|
||||
return &resourcev1alpha2.ResourceRequestModelApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("ResourceSlice"):
|
||||
return &resourcev1alpha2.ResourceSliceApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("StructuredResourceHandle"):
|
||||
return &resourcev1alpha2.StructuredResourceHandleApplyConfiguration{}
|
||||
case v1alpha2.SchemeGroupVersion.WithKind("VendorParameters"):
|
||||
return &resourcev1alpha2.VendorParametersApplyConfiguration{}
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1
|
||||
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):
|
||||
|
4
go.mod
4
go.mod
@ -24,7 +24,7 @@ require (
|
||||
golang.org/x/term v0.17.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
k8s.io/api v0.0.0-20240307235618-1cabcc10ad5a
|
||||
k8s.io/api v0.0.0-20240308035331-170523fbf722
|
||||
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
||||
@ -61,6 +61,6 @@ require (
|
||||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20240307235618-1cabcc10ad5a
|
||||
k8s.io/api => k8s.io/api v0.0.0-20240308035331-170523fbf722
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@ -153,8 +153,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.0.0-20240307235618-1cabcc10ad5a h1:Whyv7ab6OoILUe9IF6qIPx9JNnQX0CBUL3RqZ0sWDYY=
|
||||
k8s.io/api v0.0.0-20240307235618-1cabcc10ad5a/go.mod h1:RzL8aPQw9ZdVXCdY+Iz3AXnVX+jFyQNqcmzmS+2/Ur0=
|
||||
k8s.io/api v0.0.0-20240308035331-170523fbf722 h1:swjp6yzL9EF0cshDk/jlg1EHNO3Iue//QmzbLZ69czQ=
|
||||
k8s.io/api v0.0.0-20240308035331-170523fbf722/go.mod h1:RzL8aPQw9ZdVXCdY+Iz3AXnVX+jFyQNqcmzmS+2/Ur0=
|
||||
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a h1:0OAuWcxW23YggVeW/f7sDWuEF2U4HDVSN+CQNMxwimI=
|
||||
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a/go.mod h1:wEJvNDlfxMRaMhyv38SIHIEC9hah/xuzqUUhxIyUv7Y=
|
||||
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
|
||||
|
@ -366,10 +366,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimParameters().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClassParameters().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceslices"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceSlices().Informer()}, nil
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1
|
||||
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):
|
||||
|
@ -28,10 +28,16 @@ type Interface interface {
|
||||
PodSchedulingContexts() PodSchedulingContextInformer
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
ResourceClaims() ResourceClaimInformer
|
||||
// ResourceClaimParameters returns a ResourceClaimParametersInformer.
|
||||
ResourceClaimParameters() ResourceClaimParametersInformer
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
ResourceClaimTemplates() ResourceClaimTemplateInformer
|
||||
// ResourceClasses returns a ResourceClassInformer.
|
||||
ResourceClasses() ResourceClassInformer
|
||||
// ResourceClassParameters returns a ResourceClassParametersInformer.
|
||||
ResourceClassParameters() ResourceClassParametersInformer
|
||||
// ResourceSlices returns a ResourceSliceInformer.
|
||||
ResourceSlices() ResourceSliceInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -55,6 +61,11 @@ func (v *version) ResourceClaims() ResourceClaimInformer {
|
||||
return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClaimParameters returns a ResourceClaimParametersInformer.
|
||||
func (v *version) ResourceClaimParameters() ResourceClaimParametersInformer {
|
||||
return &resourceClaimParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer {
|
||||
return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
@ -64,3 +75,13 @@ func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer {
|
||||
func (v *version) ResourceClasses() ResourceClassInformer {
|
||||
return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClassParameters returns a ResourceClassParametersInformer.
|
||||
func (v *version) ResourceClassParameters() ResourceClassParametersInformer {
|
||||
return &resourceClassParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceSlices returns a ResourceSliceInformer.
|
||||
func (v *version) ResourceSlices() ResourceSliceInformer {
|
||||
return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
90
informers/resource/v1alpha2/resourceclaimparameters.go
Normal file
90
informers/resource/v1alpha2/resourceclaimparameters.go
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
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"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha2 "k8s.io/api/resource/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"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceClaimParametersInformer provides access to a shared informer and lister for
|
||||
// ResourceClaimParameters.
|
||||
type ResourceClaimParametersInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.ResourceClaimParametersLister
|
||||
}
|
||||
|
||||
type resourceClaimParametersInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters 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 NewResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceClaimParametersInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters 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 NewFilteredResourceClaimParametersInformer(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.ResourceV1alpha2().ResourceClaimParameters(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha2().ResourceClaimParameters(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha2.ResourceClaimParameters{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceClaimParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimParameters{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceClaimParametersInformer) Lister() v1alpha2.ResourceClaimParametersLister {
|
||||
return v1alpha2.NewResourceClaimParametersLister(f.Informer().GetIndexer())
|
||||
}
|
90
informers/resource/v1alpha2/resourceclassparameters.go
Normal file
90
informers/resource/v1alpha2/resourceclassparameters.go
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
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"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha2 "k8s.io/api/resource/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"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceClassParametersInformer provides access to a shared informer and lister for
|
||||
// ResourceClassParameters.
|
||||
type ResourceClassParametersInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.ResourceClassParametersLister
|
||||
}
|
||||
|
||||
type resourceClassParametersInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewResourceClassParametersInformer constructs a new informer for ResourceClassParameters 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 NewResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceClassParametersInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredResourceClassParametersInformer constructs a new informer for ResourceClassParameters 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 NewFilteredResourceClassParametersInformer(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.ResourceV1alpha2().ResourceClassParameters(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha2().ResourceClassParameters(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha2.ResourceClassParameters{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceClassParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceClassParameters{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceClassParametersInformer) Lister() v1alpha2.ResourceClassParametersLister {
|
||||
return v1alpha2.NewResourceClassParametersLister(f.Informer().GetIndexer())
|
||||
}
|
89
informers/resource/v1alpha2/resourceslice.go
Normal file
89
informers/resource/v1alpha2/resourceslice.go
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
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"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha2 "k8s.io/api/resource/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"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceSliceInformer provides access to a shared informer and lister for
|
||||
// ResourceSlices.
|
||||
type ResourceSliceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.ResourceSliceLister
|
||||
}
|
||||
|
||||
type resourceSliceInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewResourceSliceInformer constructs a new informer for ResourceSlice 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 NewResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceSliceInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredResourceSliceInformer constructs a new informer for ResourceSlice 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 NewFilteredResourceSliceInformer(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.ResourceV1alpha2().ResourceSlices().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha2().ResourceSlices().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha2.ResourceSlice{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *resourceSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredResourceSliceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceSlice{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceSliceInformer) Lister() v1alpha2.ResourceSliceLister {
|
||||
return v1alpha2.NewResourceSliceLister(f.Informer().GetIndexer())
|
||||
}
|
@ -36,6 +36,10 @@ func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.Resourc
|
||||
return &FakeResourceClaims{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha2) ResourceClaimParameters(namespace string) v1alpha2.ResourceClaimParametersInterface {
|
||||
return &FakeResourceClaimParameters{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface {
|
||||
return &FakeResourceClaimTemplates{c, namespace}
|
||||
}
|
||||
@ -44,6 +48,14 @@ func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface
|
||||
return &FakeResourceClasses{c}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha2) ResourceClassParameters(namespace string) v1alpha2.ResourceClassParametersInterface {
|
||||
return &FakeResourceClassParameters{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha2) ResourceSlices() v1alpha2.ResourceSliceInterface {
|
||||
return &FakeResourceSlices{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeResourceV1alpha2) RESTClient() rest.Interface {
|
||||
|
@ -0,0 +1,154 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceClaimParameters implements ResourceClaimParametersInterface
|
||||
type FakeResourceClaimParameters struct {
|
||||
Fake *FakeResourceV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourceclaimparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters")
|
||||
|
||||
var resourceclaimparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters")
|
||||
|
||||
// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any.
|
||||
func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(resourceclaimparametersResource, c.ns, name), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors.
|
||||
func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), &v1alpha2.ResourceClaimParametersList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ResourceClaimParametersList{ListMeta: obj.(*v1alpha2.ResourceClaimParametersList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceClaimParametersList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceClaimParameters.
|
||||
func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(resourceclaimparametersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
|
||||
func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
|
||||
func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), err
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(resourceclaimparametersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimParametersList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClaimParameters.
|
||||
func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters.
|
||||
func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
if resourceClaimParameters == nil {
|
||||
return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(resourceClaimParameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceClaimParameters.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaimParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), err
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceClassParameters implements ResourceClassParametersInterface
|
||||
type FakeResourceClassParameters struct {
|
||||
Fake *FakeResourceV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourceclassparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters")
|
||||
|
||||
var resourceclassparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters")
|
||||
|
||||
// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any.
|
||||
func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(resourceclassparametersResource, c.ns, name), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors.
|
||||
func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), &v1alpha2.ResourceClassParametersList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ResourceClassParametersList{ListMeta: obj.(*v1alpha2.ResourceClassParametersList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceClassParametersList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceClassParameters.
|
||||
func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(resourceclassparametersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
|
||||
func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
|
||||
func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), err
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(resourceclassparametersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassParametersList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClassParameters.
|
||||
func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters.
|
||||
func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
if resourceClassParameters == nil {
|
||||
return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(resourceClassParameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceClassParameters.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClassParameters{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), err
|
||||
}
|
145
kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go
Normal file
145
kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go
Normal file
@ -0,0 +1,145 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceSlices implements ResourceSliceInterface
|
||||
type FakeResourceSlices struct {
|
||||
Fake *FakeResourceV1alpha2
|
||||
}
|
||||
|
||||
var resourceslicesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceslices")
|
||||
|
||||
var resourceslicesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceSlice")
|
||||
|
||||
// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any.
|
||||
func (c *FakeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(resourceslicesResource, name), &v1alpha2.ResourceSlice{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors.
|
||||
func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(resourceslicesResource, resourceslicesKind, opts), &v1alpha2.ResourceSliceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.ResourceSliceList{ListMeta: obj.(*v1alpha2.ResourceSliceList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceSliceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceSlices.
|
||||
func (c *FakeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(resourceslicesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
|
||||
func (c *FakeResourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(resourceslicesResource, resourceSlice), &v1alpha2.ResourceSlice{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
|
||||
func (c *FakeResourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(resourceslicesResource, resourceSlice), &v1alpha2.ResourceSlice{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), err
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(resourceslicesResource, name, opts), &v1alpha2.ResourceSlice{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(resourceslicesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.ResourceSliceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceSlice.
|
||||
func (c *FakeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceslicesResource, name, pt, data, subresources...), &v1alpha2.ResourceSlice{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice.
|
||||
func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
if resourceSlice == nil {
|
||||
return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(resourceSlice)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceSlice.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceslicesResource, *name, types.ApplyPatchType, data), &v1alpha2.ResourceSlice{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), err
|
||||
}
|
@ -22,6 +22,12 @@ type PodSchedulingContextExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
||||
type ResourceClaimParametersExpansion interface{}
|
||||
|
||||
type ResourceClaimTemplateExpansion interface{}
|
||||
|
||||
type ResourceClassExpansion interface{}
|
||||
|
||||
type ResourceClassParametersExpansion interface{}
|
||||
|
||||
type ResourceSliceExpansion interface{}
|
||||
|
@ -30,8 +30,11 @@ type ResourceV1alpha2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
PodSchedulingContextsGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimParametersGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
ResourceClassesGetter
|
||||
ResourceClassParametersGetter
|
||||
ResourceSlicesGetter
|
||||
}
|
||||
|
||||
// ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group.
|
||||
@ -47,6 +50,10 @@ func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimI
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface {
|
||||
return newResourceClaimParameters(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
|
||||
return newResourceClaimTemplates(c, namespace)
|
||||
}
|
||||
@ -55,6 +62,14 @@ func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface {
|
||||
return newResourceClasses(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface {
|
||||
return newResourceClassParameters(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha2Client) ResourceSlices() ResourceSliceInterface {
|
||||
return newResourceSlices(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ResourceV1alpha2Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
208
kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go
Normal file
208
kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceClaimParametersGetter interface {
|
||||
ResourceClaimParameters(namespace string) ResourceClaimParametersInterface
|
||||
}
|
||||
|
||||
// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources.
|
||||
type ResourceClaimParametersInterface interface {
|
||||
Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClaimParameters, error)
|
||||
Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimParameters, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimParameters, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimParametersList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error)
|
||||
Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error)
|
||||
ResourceClaimParametersExpansion
|
||||
}
|
||||
|
||||
// resourceClaimParameters implements ResourceClaimParametersInterface
|
||||
type resourceClaimParameters struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newResourceClaimParameters returns a ResourceClaimParameters
|
||||
func newResourceClaimParameters(c *ResourceV1alpha2Client, namespace string) *resourceClaimParameters {
|
||||
return &resourceClaimParameters{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any.
|
||||
func (c *resourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
result = &v1alpha2.ResourceClaimParameters{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors.
|
||||
func (c *resourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.ResourceClaimParametersList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceClaimParameters.
|
||||
func (c *resourceClaimParameters) Watch(ctx context.Context, opts v1.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().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
|
||||
func (c *resourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
result = &v1alpha2.ResourceClaimParameters{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceClaimParameters).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
|
||||
func (c *resourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
result = &v1alpha2.ResourceClaimParameters{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
Name(resourceClaimParameters.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceClaimParameters).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs.
|
||||
func (c *resourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *resourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClaimParameters.
|
||||
func (c *resourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
result = &v1alpha2.ResourceClaimParameters{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters.
|
||||
func (c *resourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) {
|
||||
if resourceClaimParameters == nil {
|
||||
return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(resourceClaimParameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceClaimParameters.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha2.ResourceClaimParameters{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimparameters").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
208
kubernetes/typed/resource/v1alpha2/resourceclassparameters.go
Normal file
208
kubernetes/typed/resource/v1alpha2/resourceclassparameters.go
Normal file
@ -0,0 +1,208 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceClassParametersGetter interface {
|
||||
ResourceClassParameters(namespace string) ResourceClassParametersInterface
|
||||
}
|
||||
|
||||
// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources.
|
||||
type ResourceClassParametersInterface interface {
|
||||
Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClassParameters, error)
|
||||
Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClassParameters, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClassParameters, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassParametersList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error)
|
||||
Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error)
|
||||
ResourceClassParametersExpansion
|
||||
}
|
||||
|
||||
// resourceClassParameters implements ResourceClassParametersInterface
|
||||
type resourceClassParameters struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newResourceClassParameters returns a ResourceClassParameters
|
||||
func newResourceClassParameters(c *ResourceV1alpha2Client, namespace string) *resourceClassParameters {
|
||||
return &resourceClassParameters{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any.
|
||||
func (c *resourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
result = &v1alpha2.ResourceClassParameters{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors.
|
||||
func (c *resourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.ResourceClassParametersList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceClassParameters.
|
||||
func (c *resourceClassParameters) Watch(ctx context.Context, opts v1.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().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
|
||||
func (c *resourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
result = &v1alpha2.ResourceClassParameters{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceClassParameters).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
|
||||
func (c *resourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
result = &v1alpha2.ResourceClassParameters{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
Name(resourceClassParameters.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceClassParameters).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs.
|
||||
func (c *resourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *resourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClassParameters.
|
||||
func (c *resourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
result = &v1alpha2.ResourceClassParameters{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters.
|
||||
func (c *resourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) {
|
||||
if resourceClassParameters == nil {
|
||||
return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(resourceClassParameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceClassParameters.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha2.ResourceClassParameters{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclassparameters").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
197
kubernetes/typed/resource/v1alpha2/resourceslice.go
Normal file
197
kubernetes/typed/resource/v1alpha2/resourceslice.go
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ResourceSlicesGetter has a method to return a ResourceSliceInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceSlicesGetter interface {
|
||||
ResourceSlices() ResourceSliceInterface
|
||||
}
|
||||
|
||||
// ResourceSliceInterface has methods to work with ResourceSlice resources.
|
||||
type ResourceSliceInterface interface {
|
||||
Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (*v1alpha2.ResourceSlice, error)
|
||||
Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (*v1alpha2.ResourceSlice, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceSlice, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceSliceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error)
|
||||
Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error)
|
||||
ResourceSliceExpansion
|
||||
}
|
||||
|
||||
// resourceSlices implements ResourceSliceInterface
|
||||
type resourceSlices struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newResourceSlices returns a ResourceSlices
|
||||
func newResourceSlices(c *ResourceV1alpha2Client) *resourceSlices {
|
||||
return &resourceSlices{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any.
|
||||
func (c *resourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
result = &v1alpha2.ResourceSlice{}
|
||||
err = c.client.Get().
|
||||
Resource("resourceslices").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors.
|
||||
func (c *resourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.ResourceSliceList{}
|
||||
err = c.client.Get().
|
||||
Resource("resourceslices").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resourceSlices.
|
||||
func (c *resourceSlices) Watch(ctx context.Context, opts v1.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().
|
||||
Resource("resourceslices").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
|
||||
func (c *resourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
result = &v1alpha2.ResourceSlice{}
|
||||
err = c.client.Post().
|
||||
Resource("resourceslices").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceSlice).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
|
||||
func (c *resourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
result = &v1alpha2.ResourceSlice{}
|
||||
err = c.client.Put().
|
||||
Resource("resourceslices").
|
||||
Name(resourceSlice.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(resourceSlice).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs.
|
||||
func (c *resourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("resourceslices").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *resourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("resourceslices").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceSlice.
|
||||
func (c *resourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) {
|
||||
result = &v1alpha2.ResourceSlice{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("resourceslices").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice.
|
||||
func (c *resourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) {
|
||||
if resourceSlice == nil {
|
||||
return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(resourceSlice)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := resourceSlice.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha2.ResourceSlice{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("resourceslices").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -34,6 +34,14 @@ type ResourceClaimListerExpansion interface{}
|
||||
// ResourceClaimNamespaceLister.
|
||||
type ResourceClaimNamespaceListerExpansion interface{}
|
||||
|
||||
// ResourceClaimParametersListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimParametersLister.
|
||||
type ResourceClaimParametersListerExpansion interface{}
|
||||
|
||||
// ResourceClaimParametersNamespaceListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimParametersNamespaceLister.
|
||||
type ResourceClaimParametersNamespaceListerExpansion interface{}
|
||||
|
||||
// ResourceClaimTemplateListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimTemplateLister.
|
||||
type ResourceClaimTemplateListerExpansion interface{}
|
||||
@ -45,3 +53,15 @@ type ResourceClaimTemplateNamespaceListerExpansion interface{}
|
||||
// ResourceClassListerExpansion allows custom methods to be added to
|
||||
// ResourceClassLister.
|
||||
type ResourceClassListerExpansion interface{}
|
||||
|
||||
// ResourceClassParametersListerExpansion allows custom methods to be added to
|
||||
// ResourceClassParametersLister.
|
||||
type ResourceClassParametersListerExpansion interface{}
|
||||
|
||||
// ResourceClassParametersNamespaceListerExpansion allows custom methods to be added to
|
||||
// ResourceClassParametersNamespaceLister.
|
||||
type ResourceClassParametersNamespaceListerExpansion interface{}
|
||||
|
||||
// ResourceSliceListerExpansion allows custom methods to be added to
|
||||
// ResourceSliceLister.
|
||||
type ResourceSliceListerExpansion interface{}
|
||||
|
99
listers/resource/v1alpha2/resourceclaimparameters.go
Normal file
99
listers/resource/v1alpha2/resourceclaimparameters.go
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
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 lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceClaimParametersLister helps list ResourceClaimParameters.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceClaimParametersLister interface {
|
||||
// List lists all ResourceClaimParameters in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error)
|
||||
// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters.
|
||||
ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister
|
||||
ResourceClaimParametersListerExpansion
|
||||
}
|
||||
|
||||
// resourceClaimParametersLister implements the ResourceClaimParametersLister interface.
|
||||
type resourceClaimParametersLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewResourceClaimParametersLister returns a new ResourceClaimParametersLister.
|
||||
func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister {
|
||||
return &resourceClaimParametersLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ResourceClaimParameters in the indexer.
|
||||
func (s *resourceClaimParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ResourceClaimParameters))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters.
|
||||
func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister {
|
||||
return resourceClaimParametersNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceClaimParametersNamespaceLister interface {
|
||||
// List lists all ResourceClaimParameters in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error)
|
||||
// Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha2.ResourceClaimParameters, error)
|
||||
ResourceClaimParametersNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister
|
||||
// interface.
|
||||
type resourceClaimParametersNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ResourceClaimParameters in the indexer for a given namespace.
|
||||
func (s resourceClaimParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ResourceClaimParameters))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name.
|
||||
func (s resourceClaimParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClaimParameters, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("resourceclaimparameters"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClaimParameters), nil
|
||||
}
|
99
listers/resource/v1alpha2/resourceclassparameters.go
Normal file
99
listers/resource/v1alpha2/resourceclassparameters.go
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
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 lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceClassParametersLister helps list ResourceClassParameters.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceClassParametersLister interface {
|
||||
// List lists all ResourceClassParameters in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error)
|
||||
// ResourceClassParameters returns an object that can list and get ResourceClassParameters.
|
||||
ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister
|
||||
ResourceClassParametersListerExpansion
|
||||
}
|
||||
|
||||
// resourceClassParametersLister implements the ResourceClassParametersLister interface.
|
||||
type resourceClassParametersLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewResourceClassParametersLister returns a new ResourceClassParametersLister.
|
||||
func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister {
|
||||
return &resourceClassParametersLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ResourceClassParameters in the indexer.
|
||||
func (s *resourceClassParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ResourceClassParameters))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ResourceClassParameters returns an object that can list and get ResourceClassParameters.
|
||||
func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister {
|
||||
return resourceClassParametersNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceClassParametersNamespaceLister interface {
|
||||
// List lists all ResourceClassParameters in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error)
|
||||
// Get retrieves the ResourceClassParameters from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha2.ResourceClassParameters, error)
|
||||
ResourceClassParametersNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister
|
||||
// interface.
|
||||
type resourceClassParametersNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ResourceClassParameters in the indexer for a given namespace.
|
||||
func (s resourceClassParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ResourceClassParameters))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ResourceClassParameters from the indexer for a given namespace and name.
|
||||
func (s resourceClassParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClassParameters, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("resourceclassparameters"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceClassParameters), nil
|
||||
}
|
68
listers/resource/v1alpha2/resourceslice.go
Normal file
68
listers/resource/v1alpha2/resourceslice.go
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
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 lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResourceSliceLister helps list ResourceSlices.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ResourceSliceLister interface {
|
||||
// List lists all ResourceSlices in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha2.ResourceSlice, err error)
|
||||
// Get retrieves the ResourceSlice from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha2.ResourceSlice, error)
|
||||
ResourceSliceListerExpansion
|
||||
}
|
||||
|
||||
// resourceSliceLister implements the ResourceSliceLister interface.
|
||||
type resourceSliceLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewResourceSliceLister returns a new ResourceSliceLister.
|
||||
func NewResourceSliceLister(indexer cache.Indexer) ResourceSliceLister {
|
||||
return &resourceSliceLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ResourceSlices in the indexer.
|
||||
func (s *resourceSliceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceSlice, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha2.ResourceSlice))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ResourceSlice from the index for a given name.
|
||||
func (s *resourceSliceLister) Get(name string) (*v1alpha2.ResourceSlice, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha2.Resource("resourceslice"), name)
|
||||
}
|
||||
return obj.(*v1alpha2.ResourceSlice), nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user