Repository: kubernetes/ingress-nginx
Pull request #5211 (2020-03-04 23:34:37)

Update NGINX to 1.17.9
<!--- Provide a general summary of your changes in the Title above --->
<!--- Please don't @-mention people in PR or commit messages (do so in an additional comment). --->

## What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Which issue/s this PR fixes
<!--
(optional, in `fixes #<issue number>` format, will close that issue when PR gets merged):

fixes #
-->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I've read the [CONTRIBUTION](https://github.com/kubernetes/ingress-nginx/blob/master/CONTRIBUTING.md) guide
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes/ingress-nginx/pull/5211#" title="Author self-approved">aledbf</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes%2Fingress-nginx).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[images/OWNERS](https://github.com/kubernetes/ingress-nginx/blob/master/images/OWNERS)~~ [aledbf]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/Makefile b/Makefile
index d05a36861..0961b4bb1 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,10 @@
 # Add the following 'help' target to your Makefile
 # And add help text after each target name starting with '\#\#'
 
+ifeq ($(shell which go >/dev/null 2>&1; echo $$?), 1)
+    $(error Can't find 'go' in PATH, please fix and retry. See http://golang.org/doc/install for installation instructions.)
+endif
+
 .DEFAULT_GOAL:=help
 
 .EXPORT_ALL_VARIABLES:
diff --git a/images/nginx/Makefile b/images/nginx/Makefile
index 232fce9b3..73232befe 100644
--- a/images/nginx/Makefile
+++ b/images/nginx/Makefile
@@ -18,7 +18,7 @@
 SHELL=/bin/bash -o pipefail
 
 # 0.0.0 shouldn't clobber any released builds
-TAG ?= 0.98
+TAG ?= 0.99
 REGISTRY ?= quay.io/kubernetes-ingress-controller
 
 IMGNAME = nginx
diff --git a/images/nginx/rootfs/build.sh b/images/nginx/rootfs/build.sh
index 3f3dc69de..d02b40553 100755
--- a/images/nginx/rootfs/build.sh
+++ b/images/nginx/rootfs/build.sh
@@ -21,7 +21,7 @@ set -o pipefail
 
 export DEBIAN_FRONTEND=noninteractive
 
-export NGINX_VERSION=1.17.8
+export NGINX_VERSION=1.17.9
 export NDK_VERSION=0.3.1rc1
 export SETMISC_VERSION=0.32
 export MORE_HEADERS_VERSION=0.33
@@ -132,7 +132,7 @@ mkdir --verbose -p "$BUILD_PATH"
 cd "$BUILD_PATH"
 
 # download, verify and extract the source files
-get_src 97d23ecf6d5150b30e284b40e8a6f7e3bb5be6b601e373a4d013768d5a25965b \
+get_src 7dd65d405c753c41b7fdab9415cfb4bdbaf093ec6d9f7432072d52cb7bcbb689 \
         "https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz"
 
 get_src 49f50d4cd62b166bc1aaf712febec5e028d9f187cedbc27a610dfd01bdde2d36 \
diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go
index 7939565c3..1b16f1388 100644
--- a/internal/ingress/controller/template/template.go
+++ b/internal/ingress/controller/template/template.go
@@ -219,6 +219,8 @@ func quote(input interface{}) string {
 		inputStr = input
 	case fmt.Stringer:
 		inputStr = input.String()
+	case *string:
+		inputStr = *input
 	default:
 		inputStr = fmt.Sprintf("%v", input)
 	}


Test patch:
diff --git a/internal/ingress/controller/template/template_test.go b/internal/ingress/controller/template/template_test.go
index f641960ce..7e32eb188 100644
--- a/internal/ingress/controller/template/template_test.go
+++ b/internal/ingress/controller/template/template_test.go
@@ -256,10 +256,12 @@ func TestFormatIP(t *testing.T) {
 }
 
 func TestQuote(t *testing.T) {
+	foo := "foo"
 	cases := map[interface{}]string{
 		"foo":      `"foo"`,
 		"\"foo\"":  `"\"foo\""`,
 		"foo\nbar": `"foo\nbar"`,
+		&foo:       `"foo"`,
 		10:         `"10"`,
 	}
 	for input, output := range cases {