Merge pull request #3016 from diazjf/better-logging
Log Errors Missing in Internal
This commit is contained in:
commit
3f6314aa2f
5 changed files with 8 additions and 5 deletions
|
|
@ -773,7 +773,7 @@ func (n *NGINXController) getServiceClusterEndpoint(svcKey string, backend *exte
|
|||
}
|
||||
}
|
||||
if port == -1 {
|
||||
return endpoint, fmt.Errorf("Service %q does not have a port named %q", svc.Name, backend.ServicePort)
|
||||
return endpoint, fmt.Errorf("service %q does not have a port named %q", svc.Name, backend.ServicePort)
|
||||
}
|
||||
endpoint.Port = fmt.Sprintf("%d", port)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ func (n NGINXController) DefaultEndpoint() ingress.Endpoint {
|
|||
// running the command "nginx -t" using a temporal file.
|
||||
func (n NGINXController) testTemplate(cfg []byte) error {
|
||||
if len(cfg) == 0 {
|
||||
return fmt.Errorf("Invalid NGINX configuration (empty)")
|
||||
return fmt.Errorf("invalid NGINX configuration (empty)")
|
||||
}
|
||||
tmpfile, err := ioutil.TempFile("", "nginx-cfg")
|
||||
if err != nil {
|
||||
|
|
@ -848,7 +848,7 @@ func post(url string, data interface{}) error {
|
|||
}()
|
||||
|
||||
if resp.StatusCode != http.StatusCreated {
|
||||
return fmt.Errorf("Unexpected error code: %d", resp.StatusCode)
|
||||
return fmt.Errorf("unexpected error code: %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ func (s k8sStore) getPemCertificate(secretName string) (*ingress.SSLCert, error)
|
|||
return nil, ErrSecretForAuth
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("Secret %q contains no keypair or CA certificate", secretName)
|
||||
return nil, fmt.Errorf("secret %q contains no keypair or CA certificate", secretName)
|
||||
}
|
||||
|
||||
sslCert.Name = secret.Name
|
||||
|
|
@ -209,7 +209,7 @@ func (s *k8sStore) sendDummyEvent() {
|
|||
}
|
||||
|
||||
// ErrSecretForAuth error to indicate a secret is used for authentication
|
||||
var ErrSecretForAuth = fmt.Errorf("Secret is used for authentication")
|
||||
var ErrSecretForAuth = fmt.Errorf("secret is used for authentication")
|
||||
|
||||
func isErrSecretForAuth(e error) bool {
|
||||
return e == ErrSecretForAuth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue