Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'. Add validation.
This commit is contained in:
@@ -502,6 +502,16 @@ func autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, ou
|
||||
}
|
||||
out.Host = in.Host
|
||||
out.Scheme = v1.URIScheme(in.Scheme)
|
||||
if in.HTTPHeaders != nil {
|
||||
out.HTTPHeaders = make([]v1.HTTPHeader, len(in.HTTPHeaders))
|
||||
for i := range in.HTTPHeaders {
|
||||
if err := Convert_api_HTTPHeader_To_v1_HTTPHeader(&in.HTTPHeaders[i], &out.HTTPHeaders[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.HTTPHeaders = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -509,6 +519,19 @@ func Convert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *v
|
||||
return autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *v1.HTTPHeader, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.HTTPHeader))(in)
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.Value = in.Value
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *v1.HTTPHeader, s conversion.Scope) error {
|
||||
return autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_Handler_To_v1_Handler(in *api.Handler, out *v1.Handler, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.Handler))(in)
|
||||
@@ -1764,6 +1787,16 @@ func autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in *v1.HTTPGetAction, out
|
||||
}
|
||||
out.Host = in.Host
|
||||
out.Scheme = api.URIScheme(in.Scheme)
|
||||
if in.HTTPHeaders != nil {
|
||||
out.HTTPHeaders = make([]api.HTTPHeader, len(in.HTTPHeaders))
|
||||
for i := range in.HTTPHeaders {
|
||||
if err := Convert_v1_HTTPHeader_To_api_HTTPHeader(&in.HTTPHeaders[i], &out.HTTPHeaders[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.HTTPHeaders = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1771,6 +1804,19 @@ func Convert_v1_HTTPGetAction_To_api_HTTPGetAction(in *v1.HTTPGetAction, out *ap
|
||||
return autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in *v1.HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*v1.HTTPHeader))(in)
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.Value = in.Value
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_HTTPHeader_To_api_HTTPHeader(in *v1.HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
|
||||
return autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_Handler_To_api_Handler(in *v1.Handler, out *api.Handler, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*v1.Handler))(in)
|
||||
@@ -5132,6 +5178,7 @@ func init() {
|
||||
autoConvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource,
|
||||
autoConvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource,
|
||||
autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction,
|
||||
autoConvert_api_HTTPHeader_To_v1_HTTPHeader,
|
||||
autoConvert_api_Handler_To_v1_Handler,
|
||||
autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource,
|
||||
autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource,
|
||||
@@ -5237,6 +5284,7 @@ func init() {
|
||||
autoConvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource,
|
||||
autoConvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource,
|
||||
autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction,
|
||||
autoConvert_v1_HTTPHeader_To_api_HTTPHeader,
|
||||
autoConvert_v1_Handler_To_api_Handler,
|
||||
autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource,
|
||||
autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource,
|
||||
|
Reference in New Issue
Block a user