From 79fd7abf82ec5d93cfdbca22f09eace58f7a4161 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Mon, 22 Jul 2024 05:20:58 +0000 Subject: [PATCH] generated files Kubernetes-commit: 2253b53b585e3405c5ce2dda2921db3a0afa02c9 --- .../core/v1/containerstatus.go | 40 ++++++++----- applyconfigurations/core/v1/resourcehealth.go | 52 +++++++++++++++++ applyconfigurations/core/v1/resourcestatus.go | 57 +++++++++++++++++++ applyconfigurations/internal/internal.go | 33 +++++++++++ applyconfigurations/utils.go | 4 ++ 5 files changed, 173 insertions(+), 13 deletions(-) create mode 100644 applyconfigurations/core/v1/resourcehealth.go create mode 100644 applyconfigurations/core/v1/resourcestatus.go diff --git a/applyconfigurations/core/v1/containerstatus.go b/applyconfigurations/core/v1/containerstatus.go index bdf696aa..6a28939c 100644 --- a/applyconfigurations/core/v1/containerstatus.go +++ b/applyconfigurations/core/v1/containerstatus.go @@ -25,19 +25,20 @@ import ( // ContainerStatusApplyConfiguration represents a declarative configuration of the ContainerStatus type for use // with apply. type ContainerStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - State *ContainerStateApplyConfiguration `json:"state,omitempty"` - LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"` - Ready *bool `json:"ready,omitempty"` - RestartCount *int32 `json:"restartCount,omitempty"` - Image *string `json:"image,omitempty"` - ImageID *string `json:"imageID,omitempty"` - ContainerID *string `json:"containerID,omitempty"` - Started *bool `json:"started,omitempty"` - AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` - Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` - VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` - User *ContainerUserApplyConfiguration `json:"user,omitempty"` + Name *string `json:"name,omitempty"` + State *ContainerStateApplyConfiguration `json:"state,omitempty"` + LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"` + Ready *bool `json:"ready,omitempty"` + RestartCount *int32 `json:"restartCount,omitempty"` + Image *string `json:"image,omitempty"` + ImageID *string `json:"imageID,omitempty"` + ContainerID *string `json:"containerID,omitempty"` + Started *bool `json:"started,omitempty"` + AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` + User *ContainerUserApplyConfiguration `json:"user,omitempty"` + AllocatedResourcesStatus []ResourceStatusApplyConfiguration `json:"allocatedResourcesStatus,omitempty"` } // ContainerStatusApplyConfiguration constructs a declarative configuration of the ContainerStatus type for use with @@ -154,3 +155,16 @@ func (b *ContainerStatusApplyConfiguration) WithUser(value *ContainerUserApplyCo b.User = value return b } + +// WithAllocatedResourcesStatus adds the given value to the AllocatedResourcesStatus 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 AllocatedResourcesStatus field. +func (b *ContainerStatusApplyConfiguration) WithAllocatedResourcesStatus(values ...*ResourceStatusApplyConfiguration) *ContainerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAllocatedResourcesStatus") + } + b.AllocatedResourcesStatus = append(b.AllocatedResourcesStatus, *values[i]) + } + return b +} diff --git a/applyconfigurations/core/v1/resourcehealth.go b/applyconfigurations/core/v1/resourcehealth.go new file mode 100644 index 00000000..5169cb4b --- /dev/null +++ b/applyconfigurations/core/v1/resourcehealth.go @@ -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" +) + +// ResourceHealthApplyConfiguration represents a declarative configuration of the ResourceHealth type for use +// with apply. +type ResourceHealthApplyConfiguration struct { + ResourceID *v1.ResourceID `json:"resourceID,omitempty"` + Health *v1.ResourceHealthStatus `json:"health,omitempty"` +} + +// ResourceHealthApplyConfiguration constructs a declarative configuration of the ResourceHealth type for use with +// apply. +func ResourceHealth() *ResourceHealthApplyConfiguration { + return &ResourceHealthApplyConfiguration{} +} + +// WithResourceID sets the ResourceID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceID field is set to the value of the last call. +func (b *ResourceHealthApplyConfiguration) WithResourceID(value v1.ResourceID) *ResourceHealthApplyConfiguration { + b.ResourceID = &value + return b +} + +// WithHealth sets the Health field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Health field is set to the value of the last call. +func (b *ResourceHealthApplyConfiguration) WithHealth(value v1.ResourceHealthStatus) *ResourceHealthApplyConfiguration { + b.Health = &value + return b +} diff --git a/applyconfigurations/core/v1/resourcestatus.go b/applyconfigurations/core/v1/resourcestatus.go new file mode 100644 index 00000000..1e63c87f --- /dev/null +++ b/applyconfigurations/core/v1/resourcestatus.go @@ -0,0 +1,57 @@ +/* +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" +) + +// ResourceStatusApplyConfiguration represents a declarative configuration of the ResourceStatus type for use +// with apply. +type ResourceStatusApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Resources []ResourceHealthApplyConfiguration `json:"resources,omitempty"` +} + +// ResourceStatusApplyConfiguration constructs a declarative configuration of the ResourceStatus type for use with +// apply. +func ResourceStatus() *ResourceStatusApplyConfiguration { + return &ResourceStatusApplyConfiguration{} +} + +// 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 *ResourceStatusApplyConfiguration) WithName(value v1.ResourceName) *ResourceStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithResources adds the given value to the Resources 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 Resources field. +func (b *ResourceStatusApplyConfiguration) WithResources(values ...*ResourceHealthApplyConfiguration) *ResourceStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResources") + } + b.Resources = append(b.Resources, *values[i]) + } + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index d0400ba1..157e132d 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -5042,6 +5042,14 @@ var schemaYAML = typed.YAMLObject(`types: map: elementType: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: allocatedResourcesStatus + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ResourceStatus + elementRelationship: associative + keys: + - name - name: containerID type: scalar: string @@ -7449,6 +7457,16 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string default: "" elementRelationship: atomic +- name: io.k8s.api.core.v1.ResourceHealth + map: + fields: + - name: health + type: + scalar: string + - name: resourceID + type: + scalar: string + default: "" - name: io.k8s.api.core.v1.ResourceQuota map: fields: @@ -7521,6 +7539,21 @@ var schemaYAML = typed.YAMLObject(`types: map: elementType: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.core.v1.ResourceStatus + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: resources + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ResourceHealth + elementRelationship: associative + keys: + - resourceID - name: io.k8s.api.core.v1.SELinuxOptions map: fields: diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 98079c23..eb88e1c4 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -918,6 +918,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.ResourceClaimApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ResourceFieldSelector"): return &applyconfigurationscorev1.ResourceFieldSelectorApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("ResourceHealth"): + return &applyconfigurationscorev1.ResourceHealthApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ResourceQuota"): return &applyconfigurationscorev1.ResourceQuotaApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ResourceQuotaSpec"): @@ -926,6 +928,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.ResourceQuotaStatusApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ResourceRequirements"): return &applyconfigurationscorev1.ResourceRequirementsApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("ResourceStatus"): + return &applyconfigurationscorev1.ResourceStatusApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ScaleIOPersistentVolumeSource"): return &applyconfigurationscorev1.ScaleIOPersistentVolumeSourceApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ScaleIOVolumeSource"):