mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-15 05:53:15 +00:00
Merge pull request #118653 from pohly/volume-resource-requirements
Volume resource requirements Kubernetes-commit: f852d7fead3446112d4dc8acd29869a860a11ff5
This commit is contained in:
commit
e8815ff156
@ -26,14 +26,14 @@ import (
|
||||
// PersistentVolumeClaimSpecApplyConfiguration represents an declarative configuration of the PersistentVolumeClaimSpec type for use
|
||||
// with apply.
|
||||
type PersistentVolumeClaimSpecApplyConfiguration struct {
|
||||
AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
|
||||
Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
|
||||
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
VolumeName *string `json:"volumeName,omitempty"`
|
||||
StorageClassName *string `json:"storageClassName,omitempty"`
|
||||
VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"`
|
||||
DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"`
|
||||
DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"`
|
||||
AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
|
||||
Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
|
||||
Resources *VolumeResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
VolumeName *string `json:"volumeName,omitempty"`
|
||||
StorageClassName *string `json:"storageClassName,omitempty"`
|
||||
VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"`
|
||||
DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"`
|
||||
DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"`
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimSpecApplyConfiguration constructs an declarative configuration of the PersistentVolumeClaimSpec type for use with
|
||||
@ -63,7 +63,7 @@ func (b *PersistentVolumeClaimSpecApplyConfiguration) WithSelector(value *metav1
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *PersistentVolumeClaimSpecApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *PersistentVolumeClaimSpecApplyConfiguration {
|
||||
func (b *PersistentVolumeClaimSpecApplyConfiguration) WithResources(value *VolumeResourceRequirementsApplyConfiguration) *PersistentVolumeClaimSpecApplyConfiguration {
|
||||
b.Resources = value
|
||||
return b
|
||||
}
|
||||
|
52
applyconfigurations/core/v1/volumeresourcerequirements.go
Normal file
52
applyconfigurations/core/v1/volumeresourcerequirements.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 v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// VolumeResourceRequirementsApplyConfiguration represents an declarative configuration of the VolumeResourceRequirements type for use
|
||||
// with apply.
|
||||
type VolumeResourceRequirementsApplyConfiguration struct {
|
||||
Limits *v1.ResourceList `json:"limits,omitempty"`
|
||||
Requests *v1.ResourceList `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeResourceRequirementsApplyConfiguration constructs an declarative configuration of the VolumeResourceRequirements type for use with
|
||||
// apply.
|
||||
func VolumeResourceRequirements() *VolumeResourceRequirementsApplyConfiguration {
|
||||
return &VolumeResourceRequirementsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithLimits sets the Limits field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Limits field is set to the value of the last call.
|
||||
func (b *VolumeResourceRequirementsApplyConfiguration) WithLimits(value v1.ResourceList) *VolumeResourceRequirementsApplyConfiguration {
|
||||
b.Limits = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequests sets the Requests field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Requests field is set to the value of the last call.
|
||||
func (b *VolumeResourceRequirementsApplyConfiguration) WithRequests(value v1.ResourceList) *VolumeResourceRequirementsApplyConfiguration {
|
||||
b.Requests = &value
|
||||
return b
|
||||
}
|
@ -6075,7 +6075,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
namedType: io.k8s.api.core.v1.TypedObjectReference
|
||||
- name: resources
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ResourceRequirements
|
||||
namedType: io.k8s.api.core.v1.VolumeResourceRequirements
|
||||
default: {}
|
||||
- name: selector
|
||||
type:
|
||||
@ -7894,6 +7894,19 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: serviceAccountToken
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ServiceAccountTokenProjection
|
||||
- name: io.k8s.api.core.v1.VolumeResourceRequirements
|
||||
map:
|
||||
fields:
|
||||
- name: limits
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: requests
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource
|
||||
map:
|
||||
fields:
|
||||
|
@ -945,6 +945,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.VolumeNodeAffinityApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeProjection"):
|
||||
return &applyconfigurationscorev1.VolumeProjectionApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeResourceRequirements"):
|
||||
return &applyconfigurationscorev1.VolumeResourceRequirementsApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeSource"):
|
||||
return &applyconfigurationscorev1.VolumeSourceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VsphereVirtualDiskVolumeSource"):
|
||||
|
4
go.mod
4
go.mod
@ -23,7 +23,7 @@ require (
|
||||
golang.org/x/term v0.10.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/protobuf v1.30.0
|
||||
k8s.io/api v0.0.0-20230819043120-3dcdf4ede337
|
||||
k8s.io/api v0.0.0-20230821210805-aee2a6e2653f
|
||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
|
||||
@ -60,6 +60,6 @@ require (
|
||||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20230819043120-3dcdf4ede337
|
||||
k8s.io/api => k8s.io/api v0.0.0-20230821210805-aee2a6e2653f
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@ -146,8 +146,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-20230819043120-3dcdf4ede337 h1:qcLQ7TKrB/qI/is+41gn8RLB1JchX77IJxoU9ayd00E=
|
||||
k8s.io/api v0.0.0-20230819043120-3dcdf4ede337/go.mod h1:GT9MF3sI/KGC+k3nmiQ+++vvUhyZtGX3GHeDSaF2kT0=
|
||||
k8s.io/api v0.0.0-20230821210805-aee2a6e2653f h1:0eql/znycBWkigW6mYZ/DTts0fA5Dy8V6ci0KA+eg6Y=
|
||||
k8s.io/api v0.0.0-20230821210805-aee2a6e2653f/go.mod h1:GT9MF3sI/KGC+k3nmiQ+++vvUhyZtGX3GHeDSaF2kT0=
|
||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe h1:UjWeb1lUhxUf0Ryph1r1hz+pENt060neKZ+P3gKWrDc=
|
||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw=
|
||||
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||
|
Loading…
Reference in New Issue
Block a user