You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #149, the health check server (/healthz) will be listing all namespaces in the cluster as a way to ping the Kubernetes API to determine whether it's available. This method of checking availability is more heavyweight than it has to be, since the API server should also have a healthz endpoint. Some code similar to the following should be used to check that endpoint:
// kubeClient is a *(k8s.io/kubernetes/pkg/client/unversioned).Clientres:=kubeClient.Get().AbsPath("/healthz").Do()
ifres.Error() !=nil{
// not possible to reach the server
}
// checkApiServer checks if is possible to reach the api server or not
func checkApiServer(url string, timeout time.Duration) error {
// we don't know if the
client := http.Client{
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
}
res, err := client.Get(url)
if err != nil {
return err
}
res.Body.Close()
return nil
}
After #149, the health check server (
/healthz
) will be listing all namespaces in the cluster as a way to ping the Kubernetes API to determine whether it's available. This method of checking availability is more heavyweight than it has to be, since the API server should also have ahealthz
endpoint. Some code similar to the following should be used to check that endpoint:This idea was first proposed by @aledbf in https://github.com/deis/builder/pull/149/files#r52692363
The text was updated successfully, but these errors were encountered: