Automated codegen

Kubernetes-commit: fc831d70881d0ef3f4016ad6fa830256f53bb5f3
This commit is contained in:
Wei Huang 2022-10-28 15:06:18 -04:00 committed by Kubernetes Publisher
parent d576a3570d
commit 2248bf3801
4 changed files with 70 additions and 0 deletions

View 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 v1
// PodSchedulingGateApplyConfiguration represents an declarative configuration of the PodSchedulingGate type for use
// with apply.
type PodSchedulingGateApplyConfiguration struct {
Name *string `json:"name,omitempty"`
}
// PodSchedulingGateApplyConfiguration constructs an declarative configuration of the PodSchedulingGate type for use with
// apply.
func PodSchedulingGate() *PodSchedulingGateApplyConfiguration {
return &PodSchedulingGateApplyConfiguration{}
}
// 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 *PodSchedulingGateApplyConfiguration) WithName(value string) *PodSchedulingGateApplyConfiguration {
b.Name = &value
return b
}

View File

@ -62,6 +62,7 @@ type PodSpecApplyConfiguration struct {
SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"` SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"`
OS *PodOSApplyConfiguration `json:"os,omitempty"` OS *PodOSApplyConfiguration `json:"os,omitempty"`
HostUsers *bool `json:"hostUsers,omitempty"` HostUsers *bool `json:"hostUsers,omitempty"`
SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"`
} }
// PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with // PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with
@ -416,3 +417,16 @@ func (b *PodSpecApplyConfiguration) WithHostUsers(value bool) *PodSpecApplyConfi
b.HostUsers = &value b.HostUsers = &value
return b return b
} }
// WithSchedulingGates adds the given value to the SchedulingGates 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 SchedulingGates field.
func (b *PodSpecApplyConfiguration) WithSchedulingGates(values ...*PodSchedulingGateApplyConfiguration) *PodSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSchedulingGates")
}
b.SchedulingGates = append(b.SchedulingGates, *values[i])
}
return b
}

View File

@ -5725,6 +5725,13 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.core.v1.PodSchedulingGate
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.core.v1.PodSecurityContext - name: io.k8s.api.core.v1.PodSecurityContext
map: map:
fields: fields:
@ -5881,6 +5888,14 @@ var schemaYAML = typed.YAMLObject(`types:
- name: schedulerName - name: schedulerName
type: type:
scalar: string scalar: string
- name: schedulingGates
type:
list:
elementType:
namedType: io.k8s.api.core.v1.PodSchedulingGate
elementRelationship: associative
keys:
- name
- name: securityContext - name: securityContext
type: type:
namedType: io.k8s.api.core.v1.PodSecurityContext namedType: io.k8s.api.core.v1.PodSecurityContext

View File

@ -735,6 +735,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.PodOSApplyConfiguration{} return &applyconfigurationscorev1.PodOSApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodReadinessGate"): case corev1.SchemeGroupVersion.WithKind("PodReadinessGate"):
return &applyconfigurationscorev1.PodReadinessGateApplyConfiguration{} return &applyconfigurationscorev1.PodReadinessGateApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodSchedulingGate"):
return &applyconfigurationscorev1.PodSchedulingGateApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodSecurityContext"): case corev1.SchemeGroupVersion.WithKind("PodSecurityContext"):
return &applyconfigurationscorev1.PodSecurityContextApplyConfiguration{} return &applyconfigurationscorev1.PodSecurityContextApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodSpec"): case corev1.SchemeGroupVersion.WithKind("PodSpec"):