Skip to content

Commit

Permalink
Merge pull request #2368 from antoineco/fix-typos
Browse files Browse the repository at this point in the history
[aggregate] Fix typos across codebase
  • Loading branch information
k8s-ci-robot authored Jun 25, 2018
2 parents e8a34d2 + 130866b commit c0ed143
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
4 changes: 2 additions & 2 deletions cmd/nginx/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Feature backed by OpenResty Lua libraries.`)
httpPort = flags.Int("http-port", 80, `Port to use for servicing HTTP traffic.`)
httpsPort = flags.Int("https-port", 443, `Port to use for servicing HTTPS traffic.`)
statusPort = flags.Int("status-port", 18080, `Port to use for exposing NGINX status pages.`)
sslProxyPort = flags.Int("ssl-passtrough-proxy-port", 442, `Port to use internally for SSL Passthgough.`)
sslProxyPort = flags.Int("ssl-passthrough-proxy-port", 442, `Port to use internally for SSL Passthrough.`)
defServerPort = flags.Int("default-server-port", 8181, `Port to use for exposing the default server (catch-all).`)
healthzPort = flags.Int("healthz-port", 10254, "Port to use for the healthz endpoint.")
)
Expand Down Expand Up @@ -180,7 +180,7 @@ Feature backed by OpenResty Lua libraries.`)
glog.Infof("Watching for Ingress class: %s", *ingressClass)

if *ingressClass != class.DefaultClass {
glog.Warningf("Only Ingresses with class %q will be processed by this ingress controller", *ingressClass)
glog.Warningf("Only Ingresses with class %q will be processed by this Ingress controller", *ingressClass)
}

class.IngressClass = *ingressClass
Expand Down
2 changes: 1 addition & 1 deletion cmd/nginx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func handleSigterm(ngx *controller.NGINXController, exit exiter) {
// kubeConfig is the location of a kubeconfig file. If defined, the kubeconfig
// file is loaded first, the URL of the API server read from the file is then
// optionally overriden by the value of apiserverHost.
// If neither apiserverHost or kubeconfig are passed in, we assume the
// If neither apiserverHost nor kubeConfig are passed in, we assume the
// controller runs inside Kubernetes and fallback to the in-cluster config. If
// the in-cluster config is missing or fails, we fallback to the default config.
func createApiserverClient(apiserverHost, kubeConfig string) (*kubernetes.Clientset, error) {
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/cli-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ They are set in the container spec of the `nginx-ingress-controller` Deployment
| --publish-status-address string | Customized address to set as the load-balancer status of Ingress objects this controller satisfies. Requires the update-status parameter. |
| --report-node-internal-ip-address | Set the load-balancer status of Ingress objects to internal Node addresses instead of external. Requires the update-status parameter. |
| --sort-backends | Sort servers inside NGINX upstreams. |
| --ssl-passtrough-proxy-port int | Port to use internally for SSL Passthgough. (default 442) |
| --ssl-passthrough-proxy-port int | Port to use internally for SSL Passthrough. (default 442) |
| --status-port int | Port to use for exposing NGINX status pages. (default 18080) |
| --stderrthreshold severity | logs at or above this threshold go to stderr (default 2) |
| --sync-period duration | Period at which the controller forces the repopulation of its local object stores. (default 10m0s) |
Expand Down
14 changes: 7 additions & 7 deletions docs/user-guide/custom-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ that it passes several HTTP headers down to its `default-backend` in case of err

| Header | Value |
| ---------------- | ------------------------------------------------ |
| `X-Code` | HTTP status code retuned by the request |
| `X-Format` | Value of the `Accept` header sent by the client |
| `X-Original-URI` | URI that caused the error |
| `X-Namespace` | Namespace where the backend Service is located |
| `X-Ingress-Name` | Name of the Ingress where the backend is defined |
| `X-Service-Name` | Name of the Service backing the backend |
| `X-Service-Port` | Port number of the Service backing the backend |
| `X-Code` | HTTP status code retuned by the request |
| `X-Format` | Value of the `Accept` header sent by the client |
| `X-Original-URI` | URI that caused the error |
| `X-Namespace` | Namespace where the backend Service is located |
| `X-Ingress-Name` | Name of the Ingress where the backend is defined |
| `X-Service-Name` | Name of the Service backing the backend |
| `X-Service-Port` | Port number of the Service backing the backend |

A custom error backend can use this information to return the best possible representation of an error page. For
example, if the value of the `Accept` header send by the client was `application/json`, a carefully crafted backend
Expand Down
8 changes: 4 additions & 4 deletions internal/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ func (n *NGINXController) syncIngress(interface{}) error {
}

func (n *NGINXController) getStreamServices(configmapName string, proto apiv1.Protocol) []ingress.L4Service {
glog.V(3).Infof("Obtaining information about %v stream services from ConfigMap %q", proto, configmapName)
if configmapName == "" {
return []ingress.L4Service{}
}
glog.V(3).Infof("Obtaining information about %v stream services from ConfigMap %q", proto, configmapName)

_, _, err := k8s.ParseNameNS(configmapName)
if err != nil {
Expand Down Expand Up @@ -1019,7 +1019,7 @@ func (n *NGINXController) createServers(data []*extensions.Ingress,
err = cert.Certificate.VerifyHostname(host)
if err != nil {
glog.Warningf("Unexpected error validating SSL certificate %q for server %q: %v", key, host, err)
glog.Warningf("Validating certificate against DNS names. This will be deprecated in a future version.")
glog.Warning("Validating certificate against DNS names. This will be deprecated in a future version.")
// check the Common Name field
// https://github.com/golang/go/issues/22922
err := verifyHostname(host, cert.Certificate)
Expand All @@ -1032,14 +1032,14 @@ func (n *NGINXController) createServers(data []*extensions.Ingress,
servers[host].SSLCert = *cert

if cert.ExpireTime.Before(time.Now().Add(240 * time.Hour)) {
glog.Warningf("SSL certificate for server %q is about to expire (%v)", cert.ExpireTime)
glog.Warningf("SSL certificate for server %q is about to expire (%v)", host, cert.ExpireTime)
}
}
}

for alias, host := range aliases {
if _, ok := servers[alias]; ok {
glog.Warningf("Conflicting hostname (%v) and alias (%v) in server %q. Removing alias to avoid conflicts.", alias, host)
glog.Warningf("Conflicting hostname (%v) and alias (%v). Removing alias to avoid conflicts.", host, alias)
servers[host].Alias = ""
}
}
Expand Down
15 changes: 6 additions & 9 deletions internal/ingress/controller/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ import (
"k8s.io/ingress-nginx/internal/watch"
)

type statusModule string

const (
ngxHealthPath = "/healthz"
)
Expand Down Expand Up @@ -236,7 +234,6 @@ type NGINXController struct {

resolver []net.IP

// returns true if IPV6 is enabled in the pod
isIPV6Enabled bool

isShuttingDown bool
Expand Down Expand Up @@ -342,8 +339,8 @@ func (n *NGINXController) Stop() error {
n.syncStatus.Shutdown()
}

// Send stop signal to Nginx
glog.Info("stopping NGINX process...")
// send stop signal to NGINX
glog.Info("Stopping NGINX process")
cmd := nginxExecCommand("-s", "quit")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down Expand Up @@ -464,10 +461,10 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
n.Proxy.ServerList = servers
}

// NGINX cannot resize the hash tables used to store server names.
// For this reason we check if the defined size defined is correct
// for the FQDN defined in the ingress rules adjusting the value
// if is required.
// NGINX cannot resize the hash tables used to store server names. For
// this reason we check if the current size is correct for the host
// names defined in the Ingress rules and adjust the value if
// necessary.
// https://trac.nginx.org/nginx/ticket/352
// https://trac.nginx.org/nginx/ticket/631
var longestName int
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func fileInFS(file string, fs file.Filesystem) wait.ConditionFunc {
}

if stat == nil {
return false, fmt.Errorf("file %v does not exists", file)
return false, fmt.Errorf("file %v does not exist", file)
}

if stat.Size() > 0 {
Expand Down
6 changes: 5 additions & 1 deletion test/e2e/servicebackend/service_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ limitations under the License.
package servicebackend

import (
"strings"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/parnurzeal/gorequest"

corev1 "k8s.io/api/core/v1"
"k8s.io/api/extensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

"k8s.io/ingress-nginx/test/e2e/framework"
"strings"
)

var _ = framework.IngressNginxDescribe("Service backend - 503", func() {
Expand Down

0 comments on commit c0ed143

Please sign in to comment.