Skip to content

Commit

Permalink
all: fix misspellings
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Cheney <dave@cheney.net>
  • Loading branch information
davecheney committed Aug 11, 2018
1 parent 68baf4e commit f0db88c
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -65,7 +65,7 @@ go build github.com/heptio/contour/cmd/contour

This produces a `contour` binary in your current working directory.

_TIP_: You may prefer to use `go install` rather than `go build` to cache build artefacts and reduce future compile times.
_TIP_: You may prefer to use `go install` rather than `go build` to cache build artifacts and reduce future compile times.
In this case the binary is placed in `$GOPATH/bin/contour`.

### Running the unit tests
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -47,7 +47,11 @@ unused:

misspell:
@go get github.com/client9/misspell/cmd/misspell
misspell -locale US -error cmd/* internal/*
misspell \
-i clas \
-locale US \
-error \
cmd/* internal/* docs/* design/* *.md

render:
@echo Rendering deployment files...
Expand Down
2 changes: 1 addition & 1 deletion design/ingressroute-design.md
Expand Up @@ -341,7 +341,7 @@ The downside of these proposals is that the minimum use case, the http://hello.w
Restricting who can create this pair of CRD objects further complicates things and moves toward a design with a third and possibly fourth CRD to apply policy to their counterparts.

Overloading, or making the CRD polymorphic, creates a more complex mental model for complicated deployments, but in exchange scales down to a single CRD containing both the vhost details and the route details, because there is no delegation in the hello world example.
This property makes the proposed design appealing from a usability standpoint, as **most** ingress use cases are simple--publish my web app on this URL--so it feels right to favour a design that does not penalize the default, simple, use case.
This property makes the proposed design appealing from a usability standpoint, as **most** ingress use cases are simple--publish my web app on this URL--so it feels right to favor a design that does not penalize the default, simple, use case.

- links to other proposals

Expand Down
2 changes: 1 addition & 1 deletion docs/about.md
Expand Up @@ -35,7 +35,7 @@ The identifier presented to SDS is the CDS clusters `service_name`, which we set

### RDS

RDS is most like a Kubernetes Ingress resource. RDS routes one of prefix, path, or regex to an Envoy Cluster. The name of the Envoy cluster can be synthesised from the backend field in the IngressSpec, something like `namespace/serviceName_servicePort`, which, because it is a selector, matches the CDS object returned from transforming Service objects.
RDS is most like a Kubernetes Ingress resource. RDS routes one of prefix, path, or regex to an Envoy Cluster. The name of the Envoy cluster can be synthesized from the backend field in the IngressSpec, something like `namespace/serviceName_servicePort`, which, because it is a selector, matches the CDS object returned from transforming Service objects.

## More about mapping

Expand Down
4 changes: 2 additions & 2 deletions docs/annotations.md
Expand Up @@ -17,7 +17,7 @@ Contour supports the following annotations.
- `contour.heptio.com/num-retries`: [The maximum number of retries](https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter.html#config-http-filters-router-x-envoy-max-retries) Envoy should make before abandoning and returning an error to the client. Applies only if `contour.heptio.com/retry-on` is specified.
- `contour.heptio.com/per-try-timeout`: [The timeout per retry attempt](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-routeaction-retrypolicy-retry-on), if there should be one. Applies only if `contour.heptio.com/retry-on` is specified.
- `contour.heptio.com/tls-minimum-protocol-version` : [The minimum TLS protocol version](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto#envoy-api-msg-auth-tlsparameters) the TLS listener should support.
- `contour.heptio.com/websocket-routes`: [The routes supporting websocket protocol](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-routeaction-use-websocket), the annotation value contains a list of route paths separated by a comma that must match with the ones defined in the `Ingress` definition. Defaults to Envoy's default behaviour which is `use_websocket` to `false`.
- `contour.heptio.com/websocket-routes`: [The routes supporting websocket protocol](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-routeaction-use-websocket), the annotation value contains a list of route paths separated by a comma that must match with the ones defined in the `Ingress` definition. Defaults to Envoy's default behavior which is `use_websocket` to `false`.

## Contour specific Service annotations

Expand All @@ -27,4 +27,4 @@ A [Kubernetes Service](https://kubernetes.io/docs/concepts/services-networking/s
- `contour.heptio.com/max-pending-requests`: [The maximum number of pending requests](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/cluster/circuit_breaker.proto#envoy-api-field-cluster-circuitbreakers-thresholds-max-pending-requests) that a single Envoy instance allows to the Kubernetes Service; defaults to 1024.
- `contour.heptio.com/max-requests`: [The maximum parallel requests](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/cluster/circuit_breaker.proto#envoy-api-field-cluster-circuitbreakers-thresholds-max-requests) a single Envoy instance allows to the Kubernetes Service; defaults to 1024
- `contour.heptio.com/max-retries` : [The maximum number of parallel retries](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/cluster/circuit_breaker.proto#envoy-api-field-cluster-circuitbreakers-thresholds-max-retries) a single Envoy instance allows to the Kubernetes Service; defaults to 1024. This is independent of the per-Kubernetes Ingress number of retries (`contour.heptio.com/num-retries`) and retry-on (`contour.heptio.com/retry-on`), which control whether retries are attempted and how many times a single request can retry.
- `contour.heptio.com/upstream-protocol.{protocol}` : The protocol used in the upstream. The annotation value contains a list of port names and/or numbers separated by a comma that must match with the ones defined in the `Service` definition. For now, just `h2` and `h2c` are supported: `contour.heptio.com/upstream-protocol.h2: "443,https"`. Defaults to Envoy's default behaviour which is `http1` in the upstream.
- `contour.heptio.com/upstream-protocol.{protocol}` : The protocol used in the upstream. The annotation value contains a list of port names and/or numbers separated by a comma that must match with the ones defined in the `Service` definition. For now, just `h2` and `h2c` are supported: `contour.heptio.com/upstream-protocol.h2: "443,https"`. Defaults to Envoy's default behavior which is `http1` in the upstream.
2 changes: 1 addition & 1 deletion docs/prometheus.md
Expand Up @@ -42,6 +42,6 @@ Prometheus needs a configuration block that looks like this:
target_label: kubernetes_pod_name
```

The main difference from the [offical Prometheus Kubernetes sample config](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml)
The main difference from the [official Prometheus Kubernetes sample config](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml)
is the added interpretation of the `__meta_kubernetes_pod_annotation_prometheus_io_format` label, because Envoy
currently requires a [`format=prometheus` url parameter to return the stats in Prometheus format.](https://github.com/envoyproxy/envoy/issues/2182)
2 changes: 1 addition & 1 deletion internal/contour/endpointstranslator_test.go
Expand Up @@ -108,7 +108,7 @@ func TestEndpointsTranslatorRemoveEndpoints(t *testing.T) {
clusterloadassignment("default/simple", lbendpoint("192.168.183.24", 8080)),
},
},
"remove non existant": {
"remove non existent": {
setup: func(*EndpointsTranslator) {},
ep: endpoints("default", "simple", v1.EndpointSubset{
Addresses: addresses("192.168.183.24"),
Expand Down
2 changes: 1 addition & 1 deletion internal/contour/listener.go
Expand Up @@ -150,7 +150,7 @@ func (c *listenerCache) Update(v map[string]*v2.Listener) {
c.notify()
}

// notify notifies all registered waiters that an event has occured.
// notify notifies all registered waiters that an event has occurred.
func (c *listenerCache) notify() {
c.last++

Expand Down
16 changes: 8 additions & 8 deletions internal/dag/builder_test.go
Expand Up @@ -29,8 +29,8 @@ import (
)

func TestDAGInsert(t *testing.T) {
// The DAG is senstive to ordering, adding an ingress, then a service,
// should have the same result as adding a sevice, then an ingress.
// The DAG is sensitive to ordering, adding an ingress, then a service,
// should have the same result as adding a service, then an ingress.

i1 := &v1beta1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -117,7 +117,7 @@ func TestDAGInsert(t *testing.T) {
}},
},
}
// i6 contains two named vhosts which point to the same sevice
// i6 contains two named vhosts which point to the same service
// one of those has TLS
i6 := &v1beta1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -671,7 +671,7 @@ func TestDAGInsert(t *testing.T) {
},
}

// ir6 has TLS and does not specifiy min tls version
// ir6 has TLS and does not specify min tls version
ir6 := &ingressroutev1.IngressRoute{
ObjectMeta: metav1.ObjectMeta{
Name: "example-com",
Expand Down Expand Up @@ -2278,8 +2278,8 @@ type hostport struct {
}

func TestDAGRemove(t *testing.T) {
// The DAG is senstive to ordering, removing an ingress, then a service,
// has a different effect than removing a sevice, then an ingress.
// The DAG is sensitive to ordering, removing an ingress, then a service,
// has a different effect than removing a service, then an ingress.

i1 := &v1beta1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -2330,7 +2330,7 @@ func TestDAGRemove(t *testing.T) {
}},
},
}
// i6 contains two named vhosts which point to the same sevice
// i6 contains two named vhosts which point to the same service
// one of those has TLS
i6 := &v1beta1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -3074,7 +3074,7 @@ func TestServiceMapLookup(t *testing.T) {
port intstr.IntOrString
want *Service
}{
"lookup sevice by port number": {
"lookup service by port number": {
meta: meta{name: "service1", namespace: "default"},
port: intstr.FromInt(8080),
want: &Service{
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/dag.go
Expand Up @@ -164,7 +164,7 @@ type Service struct {
HealthCheck *ingressroutev1.HealthCheck
LoadBalancerStrategy string

// Curcuit breaking limits
// Circuit breaking limits

// Max connections is maximum number of connections
// that Envoy will make to the upstream cluster.
Expand Down
2 changes: 1 addition & 1 deletion internal/e2e/cds_test.go
Expand Up @@ -115,7 +115,7 @@ func TestClusterAddUpdateDelete(t *testing.T) {
}
rh.OnAdd(i2)

// s1 is a simple tcp 80 -> 8080 sevice.
// s1 is a simple tcp 80 -> 8080 service.
s1 := service("default", "kuard", v1.ServicePort{
Protocol: "TCP",
Port: 80,
Expand Down
4 changes: 2 additions & 2 deletions internal/e2e/eds_test.go
Expand Up @@ -149,7 +149,7 @@ func TestAddEndpointComplicated(t *testing.T) {
)),
any(t, clusterloadassignment(
"default/kuard/foo",
lbendpoint("10.48.1.77", 9999), // TODO(dfc) order is not guarenteed by endpoint controller
lbendpoint("10.48.1.77", 9999), // TODO(dfc) order is not guaranteed by endpoint controller
lbendpoint("10.48.1.78", 8080),
)),
},
Expand Down Expand Up @@ -204,7 +204,7 @@ func TestEndpointFilter(t *testing.T) {
Resources: []types.Any{
any(t, clusterloadassignment(
"default/kuard/foo",
lbendpoint("10.48.1.77", 9999), // TODO(dfc) order is not guarenteed by endpoint controller
lbendpoint("10.48.1.77", 9999), // TODO(dfc) order is not guaranteed by endpoint controller
lbendpoint("10.48.1.78", 8080),
)),
},
Expand Down
6 changes: 3 additions & 3 deletions internal/grpc/xds.go
Expand Up @@ -72,7 +72,7 @@ func (xh *xdsHandler) stream(st grpcStream) (err error) {
ch := make(chan int, 1)

// internally all registration values start at zero so sending
// a last that is less than zero will guarentee that each stream
// a last that is less than zero will guarantee that each stream
// will generate a response immediately, then wait.
last := -1
ctx := st.Context()
Expand Down Expand Up @@ -100,7 +100,7 @@ func (xh *xdsHandler) stream(st grpcStream) (err error) {
for {
log.Info("stream_wait")

// now we wait for a notification, if this is the first time throught the loop
// now we wait for a notification, if this is the first time through the loop
// then last will be zero and that will trigger a notification immediately.
r.Register(ch, last)
select {
Expand Down Expand Up @@ -136,7 +136,7 @@ func (xh *xdsHandler) stream(st grpcStream) (err error) {
}
}

// toAny converts the contens of a resourcer's Values to the
// toAny converts the contents of a resourcer's Values to the
// respective slice of types.Any.
func toAny(res resource, filter func(string) bool) ([]types.Any, error) {
v := res.Values(filter)
Expand Down

0 comments on commit f0db88c

Please sign in to comment.