mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
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.
This commit is contained in:
@@ -1391,6 +1391,9 @@ type TCPSocketAction struct {
|
||||
// Required: Port to connect to.
|
||||
// +optional
|
||||
Port intstr.IntOrString
|
||||
// Optional: Host name to connect to, defaults to the pod IP.
|
||||
// +optional
|
||||
Host string
|
||||
}
|
||||
|
||||
// ExecAction describes a "run in container" action.
|
||||
|
||||
Reference in New Issue
Block a user