mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-14 20:07:26 +00:00
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API An upcoming PR adds a handler that only applies on one of these paths. Having fields that don't work seems bad. This never should have been shared. Lifecycle hooks are like a "write" while probes are more like a "read". HTTPGet and TCPSocket don't really make sense as lifecycle hooks (but I can't take that back). When we add gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary RPC - so a probe makes sense but a hook does not. In the future I can also see adding lifecycle hooks that don't make sense as probes. E.g. 'sleep' is a common lifecycle request. The only option is `exec`, which requires having a sleep binary in your image. * Run update scripts
This commit is contained in:
2754
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
2754
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -1746,25 +1746,6 @@ message HTTPHeader {
|
||||
optional string value = 2;
|
||||
}
|
||||
|
||||
// Handler defines a specific action that should be taken
|
||||
// TODO: pass structured data to these actions, and document that data here.
|
||||
message Handler {
|
||||
// One and only one of the following should be specified.
|
||||
// Exec specifies the action to take.
|
||||
// +optional
|
||||
optional ExecAction exec = 1;
|
||||
|
||||
// HTTPGet specifies the http request to perform.
|
||||
// +optional
|
||||
optional HTTPGetAction httpGet = 2;
|
||||
|
||||
// TCPSocket specifies an action involving a TCP port.
|
||||
// TCP hooks not yet supported
|
||||
// TODO: implement a realistic TCP lifecycle hook
|
||||
// +optional
|
||||
optional TCPSocketAction tcpSocket = 3;
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
message HostAlias {
|
||||
@@ -1932,7 +1913,7 @@ message Lifecycle {
|
||||
// Other management of the container blocks until the hook completes.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
optional Handler postStart = 1;
|
||||
optional LifecycleHandler postStart = 1;
|
||||
|
||||
// PreStop is called immediately before a container is terminated due to an
|
||||
// API request or management event such as liveness/startup probe failure,
|
||||
@@ -1945,7 +1926,28 @@ message Lifecycle {
|
||||
// or until the termination grace period is reached.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
optional Handler preStop = 2;
|
||||
optional LifecycleHandler preStop = 2;
|
||||
}
|
||||
|
||||
// LifecycleHandler defines a specific action that should be taken in a lifecycle
|
||||
// hook. This type has a strong relationship to ProbeHandler - overlapping fields
|
||||
// should be identical.
|
||||
// TODO: pass structured data to these actions, and document that data here.
|
||||
message LifecycleHandler {
|
||||
// One and only one of the following should be specified.
|
||||
// Exec specifies the action to take.
|
||||
// +optional
|
||||
optional ExecAction exec = 1;
|
||||
|
||||
// HTTPGet specifies the http request to perform.
|
||||
// +optional
|
||||
optional HTTPGetAction httpGet = 2;
|
||||
|
||||
// TCPSocket specifies an action involving a TCP port.
|
||||
// TCP hooks not yet supported
|
||||
// TODO: implement a realistic TCP lifecycle hook
|
||||
// +optional
|
||||
optional TCPSocketAction tcpSocket = 3;
|
||||
}
|
||||
|
||||
// LimitRange sets resource usage limits for each kind of resource in a Namespace.
|
||||
@@ -3928,7 +3930,7 @@ message PreferredSchedulingTerm {
|
||||
// alive or ready to receive traffic.
|
||||
message Probe {
|
||||
// The action taken to determine the health of a container
|
||||
optional Handler handler = 1;
|
||||
optional ProbeHandler handler = 1;
|
||||
|
||||
// Number of seconds after the container has started before liveness probes are initiated.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
||||
@@ -3970,6 +3972,27 @@ message Probe {
|
||||
optional int64 terminationGracePeriodSeconds = 7;
|
||||
}
|
||||
|
||||
// ProbeHandler defines a specific action that should be taken in a probe.
|
||||
// This type has a strong relationship to LifecycleHandler - overlapping fields
|
||||
// should be identical.
|
||||
// TODO: pass structured data to these actions, and document that data here.
|
||||
message ProbeHandler {
|
||||
// One and only one of the following should be specified.
|
||||
// Exec specifies the action to take.
|
||||
// +optional
|
||||
optional ExecAction exec = 1;
|
||||
|
||||
// HTTPGet specifies the http request to perform.
|
||||
// +optional
|
||||
optional HTTPGetAction httpGet = 2;
|
||||
|
||||
// TCPSocket specifies an action involving a TCP port.
|
||||
// TCP hooks not yet supported
|
||||
// TODO: implement a realistic TCP lifecycle hook
|
||||
// +optional
|
||||
optional TCPSocketAction tcpSocket = 3;
|
||||
}
|
||||
|
||||
// Represents a projected volume source
|
||||
message ProjectedVolumeSource {
|
||||
// list of volume projections
|
||||
|
||||
@@ -2117,7 +2117,7 @@ type ExecAction struct {
|
||||
// alive or ready to receive traffic.
|
||||
type Probe struct {
|
||||
// The action taken to determine the health of a container
|
||||
Handler `json:",inline" protobuf:"bytes,1,opt,name=handler"`
|
||||
ProbeHandler `json:",inline" protobuf:"bytes,1,opt,name=handler"`
|
||||
// Number of seconds after the container has started before liveness probes are initiated.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
||||
// +optional
|
||||
@@ -2381,9 +2381,30 @@ type Container struct {
|
||||
TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"`
|
||||
}
|
||||
|
||||
// Handler defines a specific action that should be taken
|
||||
// ProbeHandler defines a specific action that should be taken in a probe.
|
||||
// This type has a strong relationship to LifecycleHandler - overlapping fields
|
||||
// should be identical.
|
||||
// TODO: pass structured data to these actions, and document that data here.
|
||||
type Handler struct {
|
||||
type ProbeHandler struct {
|
||||
// One and only one of the following should be specified.
|
||||
// Exec specifies the action to take.
|
||||
// +optional
|
||||
Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
|
||||
// HTTPGet specifies the http request to perform.
|
||||
// +optional
|
||||
HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
|
||||
// TCPSocket specifies an action involving a TCP port.
|
||||
// TCP hooks not yet supported
|
||||
// TODO: implement a realistic TCP lifecycle hook
|
||||
// +optional
|
||||
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
|
||||
}
|
||||
|
||||
// LifecycleHandler defines a specific action that should be taken in a lifecycle
|
||||
// hook. This type has a strong relationship to ProbeHandler - overlapping fields
|
||||
// should be identical.
|
||||
// TODO: pass structured data to these actions, and document that data here.
|
||||
type LifecycleHandler struct {
|
||||
// One and only one of the following should be specified.
|
||||
// Exec specifies the action to take.
|
||||
// +optional
|
||||
@@ -2407,7 +2428,7 @@ type Lifecycle struct {
|
||||
// Other management of the container blocks until the hook completes.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
|
||||
PostStart *LifecycleHandler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
|
||||
// PreStop is called immediately before a container is terminated due to an
|
||||
// API request or management event such as liveness/startup probe failure,
|
||||
// preemption, resource contention, etc. The handler is not called if the
|
||||
@@ -2419,7 +2440,7 @@ type Lifecycle struct {
|
||||
// or until the termination grace period is reached.
|
||||
// More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
|
||||
// +optional
|
||||
PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
|
||||
PreStop *LifecycleHandler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
|
||||
}
|
||||
|
||||
type ConditionStatus string
|
||||
|
||||
@@ -806,17 +806,6 @@ func (HTTPHeader) SwaggerDoc() map[string]string {
|
||||
return map_HTTPHeader
|
||||
}
|
||||
|
||||
var map_Handler = map[string]string{
|
||||
"": "Handler defines a specific action that should be taken",
|
||||
"exec": "One and only one of the following should be specified. Exec specifies the action to take.",
|
||||
"httpGet": "HTTPGet specifies the http request to perform.",
|
||||
"tcpSocket": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
|
||||
}
|
||||
|
||||
func (Handler) SwaggerDoc() map[string]string {
|
||||
return map_Handler
|
||||
}
|
||||
|
||||
var map_HostAlias = map[string]string{
|
||||
"": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"ip": "IP address of the host file entry.",
|
||||
@@ -896,6 +885,17 @@ func (Lifecycle) SwaggerDoc() map[string]string {
|
||||
return map_Lifecycle
|
||||
}
|
||||
|
||||
var map_LifecycleHandler = map[string]string{
|
||||
"": "LifecycleHandler defines a specific action that should be taken in a lifecycle hook. This type has a strong relationship to ProbeHandler - overlapping fields should be identical.",
|
||||
"exec": "One and only one of the following should be specified. Exec specifies the action to take.",
|
||||
"httpGet": "HTTPGet specifies the http request to perform.",
|
||||
"tcpSocket": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
|
||||
}
|
||||
|
||||
func (LifecycleHandler) SwaggerDoc() map[string]string {
|
||||
return map_LifecycleHandler
|
||||
}
|
||||
|
||||
var map_LimitRange = map[string]string{
|
||||
"": "LimitRange sets resource usage limits for each kind of resource in a Namespace.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
@@ -1792,6 +1792,17 @@ func (Probe) SwaggerDoc() map[string]string {
|
||||
return map_Probe
|
||||
}
|
||||
|
||||
var map_ProbeHandler = map[string]string{
|
||||
"": "ProbeHandler defines a specific action that should be taken in a probe. This type has a strong relationship to LifecycleHandler - overlapping fields should be identical.",
|
||||
"exec": "One and only one of the following should be specified. Exec specifies the action to take.",
|
||||
"httpGet": "HTTPGet specifies the http request to perform.",
|
||||
"tcpSocket": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
|
||||
}
|
||||
|
||||
func (ProbeHandler) SwaggerDoc() map[string]string {
|
||||
return map_ProbeHandler
|
||||
}
|
||||
|
||||
var map_ProjectedVolumeSource = map[string]string{
|
||||
"": "Represents a projected volume source",
|
||||
"sources": "list of volume projections",
|
||||
|
||||
@@ -1760,37 +1760,6 @@ func (in *HTTPHeader) DeepCopy() *HTTPHeader {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Handler) DeepCopyInto(out *Handler) {
|
||||
*out = *in
|
||||
if in.Exec != nil {
|
||||
in, out := &in.Exec, &out.Exec
|
||||
*out = new(ExecAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.HTTPGet != nil {
|
||||
in, out := &in.HTTPGet, &out.HTTPGet
|
||||
*out = new(HTTPGetAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.TCPSocket != nil {
|
||||
in, out := &in.TCPSocket, &out.TCPSocket
|
||||
*out = new(TCPSocketAction)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.
|
||||
func (in *Handler) DeepCopy() *Handler {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Handler)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HostAlias) DeepCopyInto(out *HostAlias) {
|
||||
*out = *in
|
||||
@@ -1921,12 +1890,12 @@ func (in *Lifecycle) DeepCopyInto(out *Lifecycle) {
|
||||
*out = *in
|
||||
if in.PostStart != nil {
|
||||
in, out := &in.PostStart, &out.PostStart
|
||||
*out = new(Handler)
|
||||
*out = new(LifecycleHandler)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.PreStop != nil {
|
||||
in, out := &in.PreStop, &out.PreStop
|
||||
*out = new(Handler)
|
||||
*out = new(LifecycleHandler)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
@@ -1942,6 +1911,37 @@ func (in *Lifecycle) DeepCopy() *Lifecycle {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LifecycleHandler) DeepCopyInto(out *LifecycleHandler) {
|
||||
*out = *in
|
||||
if in.Exec != nil {
|
||||
in, out := &in.Exec, &out.Exec
|
||||
*out = new(ExecAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.HTTPGet != nil {
|
||||
in, out := &in.HTTPGet, &out.HTTPGet
|
||||
*out = new(HTTPGetAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.TCPSocket != nil {
|
||||
in, out := &in.TCPSocket, &out.TCPSocket
|
||||
*out = new(TCPSocketAction)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleHandler.
|
||||
func (in *LifecycleHandler) DeepCopy() *LifecycleHandler {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(LifecycleHandler)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *LimitRange) DeepCopyInto(out *LimitRange) {
|
||||
*out = *in
|
||||
@@ -4183,7 +4183,7 @@ func (in *PreferredSchedulingTerm) DeepCopy() *PreferredSchedulingTerm {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Probe) DeepCopyInto(out *Probe) {
|
||||
*out = *in
|
||||
in.Handler.DeepCopyInto(&out.Handler)
|
||||
in.ProbeHandler.DeepCopyInto(&out.ProbeHandler)
|
||||
if in.TerminationGracePeriodSeconds != nil {
|
||||
in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
|
||||
*out = new(int64)
|
||||
@@ -4202,6 +4202,37 @@ func (in *Probe) DeepCopy() *Probe {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProbeHandler) DeepCopyInto(out *ProbeHandler) {
|
||||
*out = *in
|
||||
if in.Exec != nil {
|
||||
in, out := &in.Exec, &out.Exec
|
||||
*out = new(ExecAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.HTTPGet != nil {
|
||||
in, out := &in.HTTPGet, &out.HTTPGet
|
||||
*out = new(HTTPGetAction)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.TCPSocket != nil {
|
||||
in, out := &in.TCPSocket, &out.TCPSocket
|
||||
*out = new(TCPSocketAction)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeHandler.
|
||||
func (in *ProbeHandler) DeepCopy() *ProbeHandler {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ProbeHandler)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProjectedVolumeSource) DeepCopyInto(out *ProjectedVolumeSource) {
|
||||
*out = *in
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user