mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Use IntOrString for TCP health check ports
Clean up code to be more testable. Add test cases for named and numeric ports in TCP health checks. Improve tests.
This commit is contained in:
@@ -146,8 +146,8 @@ type HTTPGetProbe struct {
|
||||
|
||||
// TCPSocketProbe describes a liveness probe based on opening a socket
|
||||
type TCPSocketProbe struct {
|
||||
// Port is the port to connect to. Required.
|
||||
Port int `yaml:"port,omitempty" json:"port,omitempty"`
|
||||
// Required: Port to connect to.
|
||||
Port util.IntOrString `yaml:"port,omitempty" json:"port,omitempty"`
|
||||
}
|
||||
|
||||
// LivenessProbe describes a liveness probe to be examined to the container.
|
||||
|
||||
@@ -149,8 +149,8 @@ type HTTPGetProbe struct {
|
||||
|
||||
// TCPSocketProbe describes a liveness probe based on opening a socket
|
||||
type TCPSocketProbe struct {
|
||||
// Port is the port to connect to. Required.
|
||||
Port int `yaml:"port,omitempty" json:"port,omitempty"`
|
||||
// Required: Port to connect to.
|
||||
Port util.IntOrString `yaml:"port,omitempty" json:"port,omitempty"`
|
||||
}
|
||||
|
||||
// LivenessProbe describes a liveness probe to be examined to the container.
|
||||
|
||||
Reference in New Issue
Block a user