mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Merge pull request #42902 from louyihua/allow-tcp-probe-host
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948) Add Host field to TCPSocketAction Currently, TCPSocketAction always uses Pod's IP in connection. But when a pod uses the host network, sometimes firewall rules may prevent kubelet from connecting through the Pod's IP. This PR introduces the 'Host' field for TCPSocketAction, and if it is set to non-empty string, the probe will be performed on the configured host rather than the Pod's IP. This gives users an opportunity to explicitly specify 'localhost' as the target for the above situations. ```release-note Add Host field to TCPSocketAction ```
This commit is contained in:
@@ -4453,6 +4453,7 @@ func Convert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.S
|
||||
|
||||
func autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
|
||||
out.Port = in.Port
|
||||
out.Host = in.Host
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4462,6 +4463,7 @@ func Convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out
|
||||
|
||||
func autoConvert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction, out *TCPSocketAction, s conversion.Scope) error {
|
||||
out.Port = in.Port
|
||||
out.Host = in.Host
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user