From 9a7d64c561abb0befeb65bb9df8efed1a3fcf89e Mon Sep 17 00:00:00 2001 From: Itamar Holder Date: Tue, 4 Feb 2025 14:03:52 +0200 Subject: [PATCH] add auto-generated files: ./hack/update-codegen.sh Signed-off-by: Itamar Holder Kubernetes-commit: 4bdaf6cbbde9d7bda89ff734691fc3195a1ecbd5 --- applyconfigurations/core/v1/nodeswapstatus.go | 39 +++++++++++++++++++ applyconfigurations/core/v1/nodesysteminfo.go | 29 +++++++++----- applyconfigurations/internal/internal.go | 9 +++++ applyconfigurations/utils.go | 2 + 4 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 applyconfigurations/core/v1/nodeswapstatus.go diff --git a/applyconfigurations/core/v1/nodeswapstatus.go b/applyconfigurations/core/v1/nodeswapstatus.go new file mode 100644 index 00000000..2a7a2e68 --- /dev/null +++ b/applyconfigurations/core/v1/nodeswapstatus.go @@ -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 v1 + +// NodeSwapStatusApplyConfiguration represents a declarative configuration of the NodeSwapStatus type for use +// with apply. +type NodeSwapStatusApplyConfiguration struct { + Capacity *int64 `json:"capacity,omitempty"` +} + +// NodeSwapStatusApplyConfiguration constructs a declarative configuration of the NodeSwapStatus type for use with +// apply. +func NodeSwapStatus() *NodeSwapStatusApplyConfiguration { + return &NodeSwapStatusApplyConfiguration{} +} + +// WithCapacity sets the Capacity field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Capacity field is set to the value of the last call. +func (b *NodeSwapStatusApplyConfiguration) WithCapacity(value int64) *NodeSwapStatusApplyConfiguration { + b.Capacity = &value + return b +} diff --git a/applyconfigurations/core/v1/nodesysteminfo.go b/applyconfigurations/core/v1/nodesysteminfo.go index 11ac5071..55effd71 100644 --- a/applyconfigurations/core/v1/nodesysteminfo.go +++ b/applyconfigurations/core/v1/nodesysteminfo.go @@ -21,16 +21,17 @@ package v1 // NodeSystemInfoApplyConfiguration represents a declarative configuration of the NodeSystemInfo type for use // with apply. type NodeSystemInfoApplyConfiguration struct { - MachineID *string `json:"machineID,omitempty"` - SystemUUID *string `json:"systemUUID,omitempty"` - BootID *string `json:"bootID,omitempty"` - KernelVersion *string `json:"kernelVersion,omitempty"` - OSImage *string `json:"osImage,omitempty"` - ContainerRuntimeVersion *string `json:"containerRuntimeVersion,omitempty"` - KubeletVersion *string `json:"kubeletVersion,omitempty"` - KubeProxyVersion *string `json:"kubeProxyVersion,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Architecture *string `json:"architecture,omitempty"` + MachineID *string `json:"machineID,omitempty"` + SystemUUID *string `json:"systemUUID,omitempty"` + BootID *string `json:"bootID,omitempty"` + KernelVersion *string `json:"kernelVersion,omitempty"` + OSImage *string `json:"osImage,omitempty"` + ContainerRuntimeVersion *string `json:"containerRuntimeVersion,omitempty"` + KubeletVersion *string `json:"kubeletVersion,omitempty"` + KubeProxyVersion *string `json:"kubeProxyVersion,omitempty"` + OperatingSystem *string `json:"operatingSystem,omitempty"` + Architecture *string `json:"architecture,omitempty"` + Swap *NodeSwapStatusApplyConfiguration `json:"swap,omitempty"` } // NodeSystemInfoApplyConfiguration constructs a declarative configuration of the NodeSystemInfo type for use with @@ -118,3 +119,11 @@ func (b *NodeSystemInfoApplyConfiguration) WithArchitecture(value string) *NodeS b.Architecture = &value return b } + +// WithSwap sets the Swap field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Swap field is set to the value of the last call. +func (b *NodeSystemInfoApplyConfiguration) WithSwap(value *NodeSwapStatusApplyConfiguration) *NodeSystemInfoApplyConfiguration { + b.Swap = value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index f2888de0..58011b8a 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -6528,6 +6528,12 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.api.core.v1.NodeSwapStatus + map: + fields: + - name: capacity + type: + scalar: numeric - name: io.k8s.api.core.v1.NodeSystemInfo map: fields: @@ -6567,6 +6573,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" + - name: swap + type: + namedType: io.k8s.api.core.v1.NodeSwapStatus - name: systemUUID type: scalar: string diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index b21bc1e2..65ce9d38 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -856,6 +856,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.NodeSpecApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("NodeStatus"): return &applyconfigurationscorev1.NodeStatusApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("NodeSwapStatus"): + return &applyconfigurationscorev1.NodeSwapStatusApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("NodeSystemInfo"): return &applyconfigurationscorev1.NodeSystemInfoApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ObjectFieldSelector"):