Merge pull request #9965 from stevekuznetsov/skuznets/allow-https

Allowing for HTTPS Probes
This commit is contained in:
Robert Bailey
2015-06-26 10:43:37 -07:00
25 changed files with 162 additions and 97 deletions

View File

@@ -592,6 +592,7 @@ func convert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *H
return err
}
out.Host = in.Host
out.Scheme = URIScheme(in.Scheme)
return nil
}
@@ -2903,6 +2904,7 @@ func convert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.H
return err
}
out.Host = in.Host
out.Scheme = api.URIScheme(in.Scheme)
return nil
}

View File

@@ -518,6 +518,7 @@ func deepCopy_v1_HTTPGetAction(in HTTPGetAction, out *HTTPGetAction, c *conversi
return err
}
out.Host = in.Host
out.Scheme = in.Scheme
return nil
}

View File

@@ -137,6 +137,9 @@ func addDefaultingFuncs() {
if obj.Path == "" {
obj.Path = "/"
}
if obj.Scheme == "" {
obj.Scheme = URISchemeHTTP
}
},
func(obj *NamespaceStatus) {
if obj.Phase == "" {

View File

@@ -592,8 +592,20 @@ type HTTPGetAction struct {
Port util.IntOrString `json:"port" description:"number or name of the port to access on the container; number must be in the range 1 to 65535; name must be a IANA_SVC_NAME"`
// Optional: Host name to connect to, defaults to the pod IP.
Host string `json:"host,omitempty" description:"hostname to connect to; defaults to pod IP"`
// Optional: Scheme to use for connecting to the host, defaults to HTTP.
Scheme URIScheme `json:"scheme,omitempty" description:"scheme to connect with, must be HTTP or HTTPS, defaults to HTTP"`
}
// URIScheme identifies the scheme used for connection to a host for Get actions
type URIScheme string
const (
// URISchemeHTTP means that the scheme used will be http://
URISchemeHTTP URIScheme = "HTTP"
// URISchemeHTTPS means that the scheme used will be https://
URISchemeHTTPS URIScheme = "HTTPS"
)
// TCPSocketAction describes an action based on opening a socket
type TCPSocketAction struct {
// Required: Port to connect to.