diff --git a/.travis/ingress-controller.sh b/.travis/ingress-controller.sh index 8af37b994..45166d72c 100755 --- a/.travis/ingress-controller.sh +++ b/.travis/ingress-controller.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -o errexit +set -o pipefail + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $DIR/common.sh diff --git a/.travis/publish-docs.sh b/.travis/publish-docs.sh index c23b0904b..3511fbe16 100755 --- a/.travis/publish-docs.sh +++ b/.travis/publish-docs.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -o errexit +set -o pipefail + if ! [ -z $DEBUG ]; then set -x fi diff --git a/.travis/publish.sh b/.travis/publish.sh index deaba749c..ecfcba978 100755 --- a/.travis/publish.sh +++ b/.travis/publish.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -o errexit +set -o pipefail + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ "$COMPONENT" == "docs" ]; then diff --git a/build/mkdocs/Dockerfile b/build/mkdocs/Dockerfile index bb877d59e..e067e6686 100644 --- a/build/mkdocs/Dockerfile +++ b/build/mkdocs/Dockerfile @@ -15,6 +15,7 @@ FROM alpine:3.7 RUN apk update && apk add --no-cache \ + bash \ git \ git-fast-import \ openssh \ @@ -34,6 +35,6 @@ WORKDIR /docs EXPOSE 3000 -ENTRYPOINT ["mkdocs"] +COPY entrypoint.sh / -CMD ["serve", "--dev-addr=0.0.0.0:3000", "--livereload"] +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.travis/nginx.sh b/build/mkdocs/entrypoint.sh similarity index 54% rename from .travis/nginx.sh rename to build/mkdocs/entrypoint.sh index bb5966b25..dc87db8bc 100755 --- a/.travis/nginx.sh +++ b/build/mkdocs/entrypoint.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash -# Copyright 2017 The Kubernetes Authors. +# Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,17 +14,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +set -o errexit +set -o pipefail -source $DIR/common.sh +CMD=$1 -IMAGE=$(make -s -C $DIR/../images/nginx image-info) - -if docker_tag_exists "kubernetes-ingress-controller/nginx" $(echo $IMAGE | jq .tag) "$ARCH"; then - echo "Image already published" - exit 0 +if [ "$CMD" == "build" ]; +then + mkdocs build + exit 0; fi -echo "building nginx-$ARCH image..." -make -C $DIR/../images/nginx sub-container-$ARCH -make -C $DIR/../images/nginx sub-push-$ARCH +mkdocs serve --dev-addr=0.0.0.0:3000 --livereload diff --git a/docs/deploy/upgrade.md b/docs/deploy/upgrade.md index ee106a1c9..8ca906412 100644 --- a/docs/deploy/upgrade.md +++ b/docs/deploy/upgrade.md @@ -1,8 +1,8 @@ # Upgrading !!! important -No matter the method you use for upgrading, _if you use template overrides, -make sure your templates are compatible with the new version of ingress-nginx_. + No matter the method you use for upgrading, _if you use template overrides, + make sure your templates are compatible with the new version of ingress-nginx_. ## Without Helm diff --git a/docs/examples/auth/external-auth/README.md b/docs/examples/auth/external-auth/README.md index ab06890cc..3df8434ba 100644 --- a/docs/examples/auth/external-auth/README.md +++ b/docs/examples/auth/external-auth/README.md @@ -1,4 +1,4 @@ -# External authentication +# External Basic Authentication ### Example 1: diff --git a/docs/examples/auth/oauth-external-auth/README.md b/docs/examples/auth/oauth-external-auth/README.md index 9199a6dcf..5c1b2a790 100644 --- a/docs/examples/auth/oauth-external-auth/README.md +++ b/docs/examples/auth/oauth-external-auth/README.md @@ -1,4 +1,4 @@ -# External Authentication +# External OAUTH Authentication ### Overview @@ -6,7 +6,7 @@ The `auth-url` and `auth-signin` annotations allow you to use an external authentication provider to protect your Ingress resources. !!! Important - this annotation requires `nginx-ingress-controller v0.9.0` or greater.) + This annotation requires `nginx-ingress-controller v0.9.0` or greater.) ### Key Detail diff --git a/docs/examples/docker-registry/README.md b/docs/examples/docker-registry/README.md index d3bdf38ea..7dbd20cbd 100644 --- a/docs/examples/docker-registry/README.md +++ b/docs/examples/docker-registry/README.md @@ -11,9 +11,9 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast ``` !!! Important - **DO NOT RUN THIS IN PRODUCTION** + **DO NOT RUN THIS IN PRODUCTION** - This deployment uses `emptyDir` in the `volumeMount` which means the contents of the registry will be deleted when the pod dies. + This deployment uses `emptyDir` in the `volumeMount` which means the contents of the registry will be deleted when the pod dies. The next required step is creation of the ingress rules. To do this we have two options: with and without TLS @@ -26,9 +26,9 @@ wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/exam ``` !!! Important - Running a docker registry without TLS requires we configure our local docker daemon with the insecure registry flag. + Running a docker registry without TLS requires we configure our local docker daemon with the insecure registry flag. - Please check [deploy a plain http registry](https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry) + Please check [deploy a plain http registry](https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry) ### With TLS diff --git a/docs/examples/grpc/ingress.yaml b/docs/examples/grpc/ingress.yaml index 9f7739f92..02174c2db 100644 --- a/docs/examples/grpc/ingress.yaml +++ b/docs/examples/grpc/ingress.yaml @@ -4,7 +4,7 @@ metadata: annotations: kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/grpc-backend: "true" + nginx.ingress.kubernetes.io/backend-protocol: "GRPC" name: fortune-ingress namespace: default spec: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4d1988847..7e6784c95 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -256,7 +256,7 @@ More information: ## Kube-Config -If you want to use a kubeconfig file for authentication, follow the [deploy procedure](../docs/deploy/index.md) and +If you want to use a kubeconfig file for authentication, follow the [deploy procedure](deploy/index.md) and add the flag `--kubeconfig=/etc/kubernetes/kubeconfig.yaml` to the args section of the deployment. ## Using GDB with Nginx diff --git a/docs/user-guide/custom-errors.md b/docs/user-guide/custom-errors.md index 1f47db7b9..4120b2184 100644 --- a/docs/user-guide/custom-errors.md +++ b/docs/user-guide/custom-errors.md @@ -18,8 +18,8 @@ example, if the value of the `Accept` header send by the client was `application could decide to return the error payload as a JSON document instead of HTML. !!! Important - The custom backend is expected to return the correct HTTP status code instead of `200`. NGINX does not change - the response from the custom default backend. + The custom backend is expected to return the correct HTTP status code instead of `200`. + NGINX does not change the response from the custom default backend. An example of such custom backend is available inside the source repository at [images/custom-error-pages][img-custom-error-pages]. diff --git a/docs/user-guide/default-backend.md b/docs/user-guide/default-backend.md index a9fca1a81..97b30a2b1 100644 --- a/docs/user-guide/default-backend.md +++ b/docs/user-guide/default-backend.md @@ -11,7 +11,7 @@ Basically a default backend exposes two URLs: !!! example The sub-directory [`/images/404-server`](https://github.com/kubernetes/ingress-nginx/tree/master/images/404-server) provides a service which satisfies the requirements for a default backend. - + !!! example The sub-directory [`/images/custom-error-pages`](https://github.com/kubernetes/ingress-nginx/tree/master/images/custom-error-pages) provides an additional service for the purpose of customizing the error pages served via the default backend. diff --git a/docs/user-guide/miscellaneous.md b/docs/user-guide/miscellaneous.md index 222b04ee2..ea4fb21bf 100644 --- a/docs/user-guide/miscellaneous.md +++ b/docs/user-guide/miscellaneous.md @@ -27,7 +27,7 @@ The default value of this settings is `60 seconds`. A more adequate value to support websockets is a value higher than one hour (`3600`). !!! Important - If the NGINX ingress controller is exposed with a service `type=LoadBalancer` make sure the protocol between the loadbalancer and NGINX is TCP. + If the NGINX ingress controller is exposed with a service `type=LoadBalancer` make sure the protocol between the loadbalancer and NGINX is TCP. ## Optimizing TLS Time To First Byte (TTTFB) diff --git a/docs/user-guide/monitoring.md b/docs/user-guide/monitoring.md index 93cc74036..2f420fc63 100644 --- a/docs/user-guide/monitoring.md +++ b/docs/user-guide/monitoring.md @@ -2,7 +2,8 @@ This tutorial will show you how to install [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) for scraping the metrics of the NGINX Ingress controller. -!!! Important: this example uses `emptyDir` volumes for Prometheus and Grafana. This means once the pod gets terminated you will lose all the data. +!!! important + This example uses `emptyDir` volumes for Prometheus and Grafana. This means once the pod gets terminated you will lose all the data. ## Before You Begin diff --git a/docs/user-guide/multiple-ingress.md b/docs/user-guide/multiple-ingress.md index e1aabb7ca..e83220177 100644 --- a/docs/user-guide/multiple-ingress.md +++ b/docs/user-guide/multiple-ingress.md @@ -49,10 +49,9 @@ spec: - '--configmap=ingress/nginx-ingress-internal-controller' ``` -## !!! important +!!! important + Deploying multiple Ingress controllers, of different types (e.g., `ingress-nginx` & `gce`), and not specifying a class annotation will + result in both or all controllers fighting to satisfy the Ingress, and all of them racing to update Ingress status field in confusing ways. -Deploying multiple Ingress controllers, of different types (e.g., `ingress-nginx` & `gce`), and not specifying a class annotation will -result in both or all controllers fighting to satisfy the Ingress, and all of them racing to update Ingress status field in confusing ways. - - When running multiple ingress-nginx controllers, it will only process an unset class annotation if one of the controllers uses the default - `--ingress-class` value (see `IsValid` method in `internal/ingress/annotations/class/main.go`), otherwise the class annotation become required. + When running multiple ingress-nginx controllers, it will only process an unset class annotation if one of the controllers uses the default + `--ingress-class` value (see `IsValid` method in `internal/ingress/annotations/class/main.go`), otherwise the class annotation become required. diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index c9abe918d..77a6de1ac 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -15,11 +15,11 @@ data: ``` !!! Important - The key and values in a ConfigMap can only be strings. - This means that we want a value with boolean values we need to quote the values, like "true" or "false". - Same for numbers, like "100". + The key and values in a ConfigMap can only be strings. + This means that we want a value with boolean values we need to quote the values, like "true" or "false". + Same for numbers, like "100". - "Slice" types (defined below as `[]string` or `[]int` can be provided as a comma-delimited string. + "Slice" types (defined below as `[]string` or `[]int` can be provided as a comma-delimited string. ## Configuration options