Generated files and compat data from API changes

Kubernetes-commit: 3c70be1a1231e11c45698e209b01e91b92f8c5d2
This commit is contained in:
vinay kulkarni 2023-02-05 04:44:45 +00:00 committed by Kubernetes Publisher
parent b46677097d
commit 85d57cfad9
8 changed files with 213 additions and 53 deletions

View File

@ -25,28 +25,29 @@ import (
// ContainerApplyConfiguration represents an declarative configuration of the Container type for use // ContainerApplyConfiguration represents an declarative configuration of the Container type for use
// with apply. // with apply.
type ContainerApplyConfiguration struct { type ContainerApplyConfiguration struct {
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
Image *string `json:"image,omitempty"` Image *string `json:"image,omitempty"`
Command []string `json:"command,omitempty"` Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"` Args []string `json:"args,omitempty"`
WorkingDir *string `json:"workingDir,omitempty"` WorkingDir *string `json:"workingDir,omitempty"`
Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"`
EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"`
Env []EnvVarApplyConfiguration `json:"env,omitempty"` Env []EnvVarApplyConfiguration `json:"env,omitempty"`
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"`
VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"`
LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"`
ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"`
StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"`
Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"`
TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"`
TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` TerminationMessagePath *string `json:"terminationMessagePath,omitempty"`
ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"`
SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
Stdin *bool `json:"stdin,omitempty"` SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"`
StdinOnce *bool `json:"stdinOnce,omitempty"` Stdin *bool `json:"stdin,omitempty"`
TTY *bool `json:"tty,omitempty"` StdinOnce *bool `json:"stdinOnce,omitempty"`
TTY *bool `json:"tty,omitempty"`
} }
// ContainerApplyConfiguration constructs an declarative configuration of the Container type for use with // ContainerApplyConfiguration constructs an declarative configuration of the Container type for use with
@ -146,6 +147,19 @@ func (b *ContainerApplyConfiguration) WithResources(value *ResourceRequirementsA
return b return b
} }
// WithResizePolicy adds the given value to the ResizePolicy 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 ResizePolicy field.
func (b *ContainerApplyConfiguration) WithResizePolicy(values ...*ContainerResizePolicyApplyConfiguration) *ContainerApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResizePolicy")
}
b.ResizePolicy = append(b.ResizePolicy, *values[i])
}
return b
}
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration // WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations. // 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 VolumeMounts field. // If called multiple times, values provided by each call will be appended to the VolumeMounts field.

View 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"
)
// ContainerResizePolicyApplyConfiguration represents an declarative configuration of the ContainerResizePolicy type for use
// with apply.
type ContainerResizePolicyApplyConfiguration struct {
ResourceName *v1.ResourceName `json:"resourceName,omitempty"`
Policy *v1.ResourceResizePolicy `json:"policy,omitempty"`
}
// ContainerResizePolicyApplyConfiguration constructs an declarative configuration of the ContainerResizePolicy type for use with
// apply.
func ContainerResizePolicy() *ContainerResizePolicyApplyConfiguration {
return &ContainerResizePolicyApplyConfiguration{}
}
// WithResourceName sets the ResourceName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceName field is set to the value of the last call.
func (b *ContainerResizePolicyApplyConfiguration) WithResourceName(value v1.ResourceName) *ContainerResizePolicyApplyConfiguration {
b.ResourceName = &value
return b
}
// WithPolicy sets the Policy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Policy field is set to the value of the last call.
func (b *ContainerResizePolicyApplyConfiguration) WithPolicy(value v1.ResourceResizePolicy) *ContainerResizePolicyApplyConfiguration {
b.Policy = &value
return b
}

View File

@ -18,18 +18,24 @@ limitations under the License.
package v1 package v1
import (
corev1 "k8s.io/api/core/v1"
)
// ContainerStatusApplyConfiguration represents an declarative configuration of the ContainerStatus type for use // ContainerStatusApplyConfiguration represents an declarative configuration of the ContainerStatus type for use
// with apply. // with apply.
type ContainerStatusApplyConfiguration struct { type ContainerStatusApplyConfiguration struct {
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
State *ContainerStateApplyConfiguration `json:"state,omitempty"` State *ContainerStateApplyConfiguration `json:"state,omitempty"`
LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"` LastTerminationState *ContainerStateApplyConfiguration `json:"lastState,omitempty"`
Ready *bool `json:"ready,omitempty"` Ready *bool `json:"ready,omitempty"`
RestartCount *int32 `json:"restartCount,omitempty"` RestartCount *int32 `json:"restartCount,omitempty"`
Image *string `json:"image,omitempty"` Image *string `json:"image,omitempty"`
ImageID *string `json:"imageID,omitempty"` ImageID *string `json:"imageID,omitempty"`
ContainerID *string `json:"containerID,omitempty"` ContainerID *string `json:"containerID,omitempty"`
Started *bool `json:"started,omitempty"` Started *bool `json:"started,omitempty"`
ResourcesAllocated *corev1.ResourceList `json:"resourcesAllocated,omitempty"`
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
} }
// ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with // ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with
@ -109,3 +115,19 @@ func (b *ContainerStatusApplyConfiguration) WithStarted(value bool) *ContainerSt
b.Started = &value b.Started = &value
return b return b
} }
// WithResourcesAllocated sets the ResourcesAllocated field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourcesAllocated field is set to the value of the last call.
func (b *ContainerStatusApplyConfiguration) WithResourcesAllocated(value corev1.ResourceList) *ContainerStatusApplyConfiguration {
b.ResourcesAllocated = &value
return b
}
// 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 *ContainerStatusApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *ContainerStatusApplyConfiguration {
b.Resources = value
return b
}

View File

@ -126,6 +126,19 @@ func (b *EphemeralContainerApplyConfiguration) WithResources(value *ResourceRequ
return b return b
} }
// WithResizePolicy adds the given value to the ResizePolicy 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 ResizePolicy field.
func (b *EphemeralContainerApplyConfiguration) WithResizePolicy(values ...*ContainerResizePolicyApplyConfiguration) *EphemeralContainerApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResizePolicy")
}
b.ResizePolicy = append(b.ResizePolicy, *values[i])
}
return b
}
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration // WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations. // 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 VolumeMounts field. // If called multiple times, values provided by each call will be appended to the VolumeMounts field.

View File

@ -25,28 +25,29 @@ import (
// EphemeralContainerCommonApplyConfiguration represents an declarative configuration of the EphemeralContainerCommon type for use // EphemeralContainerCommonApplyConfiguration represents an declarative configuration of the EphemeralContainerCommon type for use
// with apply. // with apply.
type EphemeralContainerCommonApplyConfiguration struct { type EphemeralContainerCommonApplyConfiguration struct {
Name *string `json:"name,omitempty"` Name *string `json:"name,omitempty"`
Image *string `json:"image,omitempty"` Image *string `json:"image,omitempty"`
Command []string `json:"command,omitempty"` Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"` Args []string `json:"args,omitempty"`
WorkingDir *string `json:"workingDir,omitempty"` WorkingDir *string `json:"workingDir,omitempty"`
Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"` Ports []ContainerPortApplyConfiguration `json:"ports,omitempty"`
EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"` EnvFrom []EnvFromSourceApplyConfiguration `json:"envFrom,omitempty"`
Env []EnvVarApplyConfiguration `json:"env,omitempty"` Env []EnvVarApplyConfiguration `json:"env,omitempty"`
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"` ResizePolicy []ContainerResizePolicyApplyConfiguration `json:"resizePolicy,omitempty"`
VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"` VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"`
LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"` VolumeDevices []VolumeDeviceApplyConfiguration `json:"volumeDevices,omitempty"`
ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"` LivenessProbe *ProbeApplyConfiguration `json:"livenessProbe,omitempty"`
StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"` ReadinessProbe *ProbeApplyConfiguration `json:"readinessProbe,omitempty"`
Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` StartupProbe *ProbeApplyConfiguration `json:"startupProbe,omitempty"`
TerminationMessagePath *string `json:"terminationMessagePath,omitempty"` Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"`
TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"` TerminationMessagePath *string `json:"terminationMessagePath,omitempty"`
ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` TerminationMessagePolicy *corev1.TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty"`
SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"` ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
Stdin *bool `json:"stdin,omitempty"` SecurityContext *SecurityContextApplyConfiguration `json:"securityContext,omitempty"`
StdinOnce *bool `json:"stdinOnce,omitempty"` Stdin *bool `json:"stdin,omitempty"`
TTY *bool `json:"tty,omitempty"` StdinOnce *bool `json:"stdinOnce,omitempty"`
TTY *bool `json:"tty,omitempty"`
} }
// EphemeralContainerCommonApplyConfiguration constructs an declarative configuration of the EphemeralContainerCommon type for use with // EphemeralContainerCommonApplyConfiguration constructs an declarative configuration of the EphemeralContainerCommon type for use with
@ -146,6 +147,19 @@ func (b *EphemeralContainerCommonApplyConfiguration) WithResources(value *Resour
return b return b
} }
// WithResizePolicy adds the given value to the ResizePolicy 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 ResizePolicy field.
func (b *EphemeralContainerCommonApplyConfiguration) WithResizePolicy(values ...*ContainerResizePolicyApplyConfiguration) *EphemeralContainerCommonApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResizePolicy")
}
b.ResizePolicy = append(b.ResizePolicy, *values[i])
}
return b
}
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration // WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations. // 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 VolumeMounts field. // If called multiple times, values provided by each call will be appended to the VolumeMounts field.

View File

@ -39,6 +39,7 @@ type PodStatusApplyConfiguration struct {
ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"` ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"`
QOSClass *v1.PodQOSClass `json:"qosClass,omitempty"` QOSClass *v1.PodQOSClass `json:"qosClass,omitempty"`
EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"` EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"`
Resize *v1.PodResizeStatus `json:"resize,omitempty"`
} }
// PodStatusApplyConfiguration constructs an declarative configuration of the PodStatus type for use with // PodStatusApplyConfiguration constructs an declarative configuration of the PodStatus type for use with
@ -175,3 +176,11 @@ func (b *PodStatusApplyConfiguration) WithEphemeralContainerStatuses(values ...*
} }
return b return b
} }
// WithResize sets the Resize field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Resize field is set to the value of the last call.
func (b *PodStatusApplyConfiguration) WithResize(value v1.PodResizeStatus) *PodStatusApplyConfiguration {
b.Resize = &value
return b
}

View File

@ -4129,6 +4129,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: readinessProbe - name: readinessProbe
type: type:
namedType: io.k8s.api.core.v1.Probe namedType: io.k8s.api.core.v1.Probe
- name: resizePolicy
type:
list:
elementType:
namedType: io.k8s.api.core.v1.ContainerResizePolicy
elementRelationship: atomic
- name: resources - name: resources
type: type:
namedType: io.k8s.api.core.v1.ResourceRequirements namedType: io.k8s.api.core.v1.ResourceRequirements
@ -4205,6 +4211,17 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: TCP default: TCP
- name: io.k8s.api.core.v1.ContainerResizePolicy
map:
fields:
- name: policy
type:
scalar: string
default: ""
- name: resourceName
type:
scalar: string
default: ""
- name: io.k8s.api.core.v1.ContainerState - name: io.k8s.api.core.v1.ContainerState
map: map:
fields: fields:
@ -4286,6 +4303,14 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: boolean scalar: boolean
default: false default: false
- name: resources
type:
namedType: io.k8s.api.core.v1.ResourceRequirements
- name: resourcesAllocated
type:
map:
elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: restartCount - name: restartCount
type: type:
scalar: numeric scalar: numeric
@ -4521,6 +4546,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: readinessProbe - name: readinessProbe
type: type:
namedType: io.k8s.api.core.v1.Probe namedType: io.k8s.api.core.v1.Probe
- name: resizePolicy
type:
list:
elementType:
namedType: io.k8s.api.core.v1.ContainerResizePolicy
elementRelationship: atomic
- name: resources - name: resources
type: type:
namedType: io.k8s.api.core.v1.ResourceRequirements namedType: io.k8s.api.core.v1.ResourceRequirements
@ -6185,6 +6216,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: reason - name: reason
type: type:
scalar: string scalar: string
- name: resize
type:
scalar: string
- name: startTime - name: startTime
type: type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time

View File

@ -579,6 +579,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.ContainerImageApplyConfiguration{} return &applyconfigurationscorev1.ContainerImageApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ContainerPort"): case corev1.SchemeGroupVersion.WithKind("ContainerPort"):
return &applyconfigurationscorev1.ContainerPortApplyConfiguration{} return &applyconfigurationscorev1.ContainerPortApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ContainerResizePolicy"):
return &applyconfigurationscorev1.ContainerResizePolicyApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ContainerState"): case corev1.SchemeGroupVersion.WithKind("ContainerState"):
return &applyconfigurationscorev1.ContainerStateApplyConfiguration{} return &applyconfigurationscorev1.ContainerStateApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ContainerStateRunning"): case corev1.SchemeGroupVersion.WithKind("ContainerStateRunning"):