diff --git a/applyconfigurations/core/v1/lifecycle.go b/applyconfigurations/core/v1/lifecycle.go index ab37b667..db9abf8a 100644 --- a/applyconfigurations/core/v1/lifecycle.go +++ b/applyconfigurations/core/v1/lifecycle.go @@ -21,8 +21,8 @@ package v1 // LifecycleApplyConfiguration represents an declarative configuration of the Lifecycle type for use // with apply. type LifecycleApplyConfiguration struct { - PostStart *HandlerApplyConfiguration `json:"postStart,omitempty"` - PreStop *HandlerApplyConfiguration `json:"preStop,omitempty"` + PostStart *LifecycleHandlerApplyConfiguration `json:"postStart,omitempty"` + PreStop *LifecycleHandlerApplyConfiguration `json:"preStop,omitempty"` } // LifecycleApplyConfiguration constructs an declarative configuration of the Lifecycle type for use with @@ -34,7 +34,7 @@ func Lifecycle() *LifecycleApplyConfiguration { // WithPostStart sets the PostStart 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 PostStart field is set to the value of the last call. -func (b *LifecycleApplyConfiguration) WithPostStart(value *HandlerApplyConfiguration) *LifecycleApplyConfiguration { +func (b *LifecycleApplyConfiguration) WithPostStart(value *LifecycleHandlerApplyConfiguration) *LifecycleApplyConfiguration { b.PostStart = value return b } @@ -42,7 +42,7 @@ func (b *LifecycleApplyConfiguration) WithPostStart(value *HandlerApplyConfigura // WithPreStop sets the PreStop 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 PreStop field is set to the value of the last call. -func (b *LifecycleApplyConfiguration) WithPreStop(value *HandlerApplyConfiguration) *LifecycleApplyConfiguration { +func (b *LifecycleApplyConfiguration) WithPreStop(value *LifecycleHandlerApplyConfiguration) *LifecycleApplyConfiguration { b.PreStop = value return b } diff --git a/applyconfigurations/core/v1/lifecyclehandler.go b/applyconfigurations/core/v1/lifecyclehandler.go new file mode 100644 index 00000000..6e373dd4 --- /dev/null +++ b/applyconfigurations/core/v1/lifecyclehandler.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 + +// LifecycleHandlerApplyConfiguration represents an declarative configuration of the LifecycleHandler type for use +// with apply. +type LifecycleHandlerApplyConfiguration struct { + Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` + HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` + TCPSocket *TCPSocketActionApplyConfiguration `json:"tcpSocket,omitempty"` +} + +// LifecycleHandlerApplyConfiguration constructs an declarative configuration of the LifecycleHandler type for use with +// apply. +func LifecycleHandler() *LifecycleHandlerApplyConfiguration { + return &LifecycleHandlerApplyConfiguration{} +} + +// WithExec sets the Exec 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 Exec field is set to the value of the last call. +func (b *LifecycleHandlerApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) *LifecycleHandlerApplyConfiguration { + b.Exec = value + return b +} + +// WithHTTPGet sets the HTTPGet 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 HTTPGet field is set to the value of the last call. +func (b *LifecycleHandlerApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfiguration) *LifecycleHandlerApplyConfiguration { + b.HTTPGet = value + return b +} + +// WithTCPSocket sets the TCPSocket 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 TCPSocket field is set to the value of the last call. +func (b *LifecycleHandlerApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfiguration) *LifecycleHandlerApplyConfiguration { + b.TCPSocket = value + return b +} diff --git a/applyconfigurations/core/v1/probe.go b/applyconfigurations/core/v1/probe.go index f87adcd5..484e9315 100644 --- a/applyconfigurations/core/v1/probe.go +++ b/applyconfigurations/core/v1/probe.go @@ -21,13 +21,13 @@ package v1 // ProbeApplyConfiguration represents an declarative configuration of the Probe type for use // with apply. type ProbeApplyConfiguration struct { - HandlerApplyConfiguration `json:",inline"` - InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` - SuccessThreshold *int32 `json:"successThreshold,omitempty"` - FailureThreshold *int32 `json:"failureThreshold,omitempty"` - TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + ProbeHandlerApplyConfiguration `json:",inline"` + InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + SuccessThreshold *int32 `json:"successThreshold,omitempty"` + FailureThreshold *int32 `json:"failureThreshold,omitempty"` + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } // ProbeApplyConfiguration constructs an declarative configuration of the Probe type for use with diff --git a/applyconfigurations/core/v1/handler.go b/applyconfigurations/core/v1/probehandler.go similarity index 70% rename from applyconfigurations/core/v1/handler.go rename to applyconfigurations/core/v1/probehandler.go index fbf1511c..a93786b0 100644 --- a/applyconfigurations/core/v1/handler.go +++ b/applyconfigurations/core/v1/probehandler.go @@ -18,24 +18,24 @@ limitations under the License. package v1 -// HandlerApplyConfiguration represents an declarative configuration of the Handler type for use +// ProbeHandlerApplyConfiguration represents an declarative configuration of the ProbeHandler type for use // with apply. -type HandlerApplyConfiguration struct { +type ProbeHandlerApplyConfiguration struct { Exec *ExecActionApplyConfiguration `json:"exec,omitempty"` HTTPGet *HTTPGetActionApplyConfiguration `json:"httpGet,omitempty"` TCPSocket *TCPSocketActionApplyConfiguration `json:"tcpSocket,omitempty"` } -// HandlerApplyConfiguration constructs an declarative configuration of the Handler type for use with +// ProbeHandlerApplyConfiguration constructs an declarative configuration of the ProbeHandler type for use with // apply. -func Handler() *HandlerApplyConfiguration { - return &HandlerApplyConfiguration{} +func ProbeHandler() *ProbeHandlerApplyConfiguration { + return &ProbeHandlerApplyConfiguration{} } // WithExec sets the Exec 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 Exec field is set to the value of the last call. -func (b *HandlerApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) *HandlerApplyConfiguration { +func (b *ProbeHandlerApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) *ProbeHandlerApplyConfiguration { b.Exec = value return b } @@ -43,7 +43,7 @@ func (b *HandlerApplyConfiguration) WithExec(value *ExecActionApplyConfiguration // WithHTTPGet sets the HTTPGet 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 HTTPGet field is set to the value of the last call. -func (b *HandlerApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfiguration) *HandlerApplyConfiguration { +func (b *ProbeHandlerApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfiguration) *ProbeHandlerApplyConfiguration { b.HTTPGet = value return b } @@ -51,7 +51,7 @@ func (b *HandlerApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfigu // WithTCPSocket sets the TCPSocket 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 TCPSocket field is set to the value of the last call. -func (b *HandlerApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfiguration) *HandlerApplyConfiguration { +func (b *ProbeHandlerApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfiguration) *ProbeHandlerApplyConfiguration { b.TCPSocket = value return b } diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 4cc311da..d984fdd1 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -4199,18 +4199,6 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.core.v1.Handler - map: - fields: - - name: exec - type: - namedType: io.k8s.api.core.v1.ExecAction - - name: httpGet - type: - namedType: io.k8s.api.core.v1.HTTPGetAction - - name: tcpSocket - type: - namedType: io.k8s.api.core.v1.TCPSocketAction - name: io.k8s.api.core.v1.HostAlias map: fields: @@ -4336,10 +4324,22 @@ var schemaYAML = typed.YAMLObject(`types: fields: - name: postStart type: - namedType: io.k8s.api.core.v1.Handler + namedType: io.k8s.api.core.v1.LifecycleHandler - name: preStop type: - namedType: io.k8s.api.core.v1.Handler + namedType: io.k8s.api.core.v1.LifecycleHandler +- name: io.k8s.api.core.v1.LifecycleHandler + map: + fields: + - name: exec + type: + namedType: io.k8s.api.core.v1.ExecAction + - name: httpGet + type: + namedType: io.k8s.api.core.v1.HTTPGetAction + - name: tcpSocket + type: + namedType: io.k8s.api.core.v1.TCPSocketAction - name: io.k8s.api.core.v1.LimitRange map: fields: diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index 9819e945..dde8c1e3 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -551,8 +551,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.GlusterfsPersistentVolumeSourceApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("GlusterfsVolumeSource"): return &applyconfigurationscorev1.GlusterfsVolumeSourceApplyConfiguration{} - case corev1.SchemeGroupVersion.WithKind("Handler"): - return &applyconfigurationscorev1.HandlerApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostAlias"): return &applyconfigurationscorev1.HostAliasApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("HostPathVolumeSource"): @@ -569,6 +567,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.KeyToPathApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("Lifecycle"): return &applyconfigurationscorev1.LifecycleApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("LifecycleHandler"): + return &applyconfigurationscorev1.LifecycleHandlerApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("LimitRange"): return &applyconfigurationscorev1.LimitRangeApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("LimitRangeItem"): @@ -683,6 +683,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationscorev1.PreferredSchedulingTermApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("Probe"): return &applyconfigurationscorev1.ProbeApplyConfiguration{} + case corev1.SchemeGroupVersion.WithKind("ProbeHandler"): + return &applyconfigurationscorev1.ProbeHandlerApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("ProjectedVolumeSource"): return &applyconfigurationscorev1.ProjectedVolumeSourceApplyConfiguration{} case corev1.SchemeGroupVersion.WithKind("QuobyteVolumeSource"): diff --git a/go.mod b/go.mod index f710072a..6f95f762 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac google.golang.org/protobuf v1.26.0 - k8s.io/api v0.0.0-20211029083603-41019181ea88 + k8s.io/api v0.0.0-20211029201511-cca52a076791 k8s.io/apimachinery v0.0.0-20211028185107-b255da54548a k8s.io/klog/v2 v2.30.0 k8s.io/kube-openapi v0.0.0-20210817084001-7fbd8d59e5b8 @@ -40,6 +40,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211029083603-41019181ea88 + k8s.io/api => k8s.io/api v0.0.0-20211029201511-cca52a076791 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211028185107-b255da54548a ) diff --git a/go.sum b/go.sum index 45109656..173b5b90 100644 --- a/go.sum +++ b/go.sum @@ -598,8 +598,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20211029083603-41019181ea88 h1:fNrtAsJFqgYBBCed0914pfMwaOUnYg8Ygl43m5Ow+RM= -k8s.io/api v0.0.0-20211029083603-41019181ea88/go.mod h1:dx3B5TOvDwqR2Oqn8muvHae5vt+xIgmxap/fvP+iItQ= +k8s.io/api v0.0.0-20211029201511-cca52a076791 h1:d7AqOEjufZ9cuB97JXVjyvpwonRKyphG0aLfK7+dBNI= +k8s.io/api v0.0.0-20211029201511-cca52a076791/go.mod h1:dx3B5TOvDwqR2Oqn8muvHae5vt+xIgmxap/fvP+iItQ= k8s.io/apimachinery v0.0.0-20211028185107-b255da54548a h1:3NA1KMmF0ie/tLSNnA3v1ihGjVX7Z5OmZIyAOm0YmVo= k8s.io/apimachinery v0.0.0-20211028185107-b255da54548a/go.mod h1:oyH3LcOKLLooQH1NlpHlilzkWxqsiHWETyHgssntcXg= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=