From 706c9c15a85cac0721ab1c773631a3981e93a576 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 12 Oct 2021 14:48:08 -0700 Subject: [PATCH 1/5] Update JWT library to golang-jwt/jwt (#2074) --- cmd/nginx-ingress/aws.go | 53 +++++++++++---------- cmd/nginx-ingress/aws_test.go | 89 +++++++++++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 5 +- 4 files changed, 120 insertions(+), 29 deletions(-) create mode 100644 cmd/nginx-ingress/aws_test.go diff --git a/cmd/nginx-ingress/aws.go b/cmd/nginx-ingress/aws.go index 1d7e80d08e..9bb937932f 100644 --- a/cmd/nginx-ingress/aws.go +++ b/cmd/nginx-ingress/aws.go @@ -1,4 +1,4 @@ -// +build aws +//go:build aws package main @@ -15,7 +15,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/marketplacemetering" "github.com/aws/aws-sdk-go-v2/service/marketplacemetering/types" - "github.com/dgrijalva/jwt-go/v4" + "github.com/golang-jwt/jwt/v4" ) var ( @@ -61,49 +61,52 @@ func checkAWSEntitlement() error { return err } - pk, err := base64.StdEncoding.DecodeString(pubKeyString) - if err != nil { - return fmt.Errorf("error decoding Public Key string: %w", err) - } - pubKey, err := jwt.ParseRSAPublicKeyFromPEM(pk) - if err != nil { - return fmt.Errorf("error parsing Public Key: %w", err) - } + token, err := jwt.ParseWithClaims(*out.Signature, &claims{}, func(token *jwt.Token) (interface{}, error) { + if _, ok := token.Method.(*jwt.SigningMethodRSAPSS); !ok { + return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"]) + } - token, err := jwt.ParseWithClaims(*out.Signature, &claims{}, jwt.KnownKeyfunc(jwt.SigningMethodPS256, pubKey)) - if err != nil { - return fmt.Errorf("error parsing the JWT token: %w", err) - } + pk, err := base64.StdEncoding.DecodeString(pubKeyString) + if err != nil { + return nil, fmt.Errorf("error decoding Public Key string: %w", err) + } + pubKey, err := jwt.ParseRSAPublicKeyFromPEM(pk) + if err != nil { + return nil, fmt.Errorf("error parsing Public Key: %w", err) + } + + return pubKey, nil + }) if claims, ok := token.Claims.(*claims); ok && token.Valid { if claims.ProductCode != productCode || claims.PublicKeyVersion != pubKeyVersion || claims.Nonce != nonce { return fmt.Errorf("the claims in the JWT token don't match the request") } } else { - return fmt.Errorf("something is wrong with the JWT token") + return fmt.Errorf("something is wrong with the JWT token: %w", err) } - return nil } type claims struct { - ProductCode string `json:"productCode,omitempty"` - PublicKeyVersion int32 `json:"publicKeyVersion,omitempty"` - IssuedAt *jwt.Time `json:"iat,omitempty"` - Nonce string `json:"nonce,omitempty"` + ProductCode string `json:"productCode,omitempty"` + PublicKeyVersion int32 `json:"publicKeyVersion,omitempty"` + Nonce string `json:"nonce,omitempty"` + jwt.RegisteredClaims } -func (c claims) Valid(h *jwt.ValidationHelper) error { +func (c claims) Valid() error { if c.Nonce == "" { - return &jwt.InvalidClaimsError{Message: "the JWT token doesn't include the Nonce"} + return jwt.NewValidationError("token doesn't include the Nonce", jwt.ValidationErrorClaimsInvalid) } if c.ProductCode == "" { - return &jwt.InvalidClaimsError{Message: "the JWT token doesn't include the ProductCode"} + return jwt.NewValidationError("token doesn't include the ProductCode", jwt.ValidationErrorClaimsInvalid) } if c.PublicKeyVersion == 0 { - return &jwt.InvalidClaimsError{Message: "the JWT token doesn't include the PublicKeyVersion"} + return jwt.NewValidationError("token doesn't include the PublicKeyVersion", jwt.ValidationErrorClaimsInvalid) } - if err := h.ValidateNotBefore(c.IssuedAt); err != nil { + + if err := c.RegisteredClaims.Valid(); err != nil { return err } diff --git a/cmd/nginx-ingress/aws_test.go b/cmd/nginx-ingress/aws_test.go new file mode 100644 index 0000000000..1c151f0b5d --- /dev/null +++ b/cmd/nginx-ingress/aws_test.go @@ -0,0 +1,89 @@ +//go:build aws + +package main + +import ( + "errors" + "testing" + "time" + + "github.com/golang-jwt/jwt/v4" +) + +func TestValidClaims(t *testing.T) { + iat := *jwt.NewNumericDate(time.Now().Add(time.Hour * -1)) + + c := claims{ + "test", + 1, + "nonce", + jwt.RegisteredClaims{ + IssuedAt: &iat, + }, + } + if err := c.Valid(); err != nil { + t.Fatalf("Failed to verify claims, wanted: %v got %v", nil, err) + } +} + +func TestInvalidClaims(t *testing.T) { + badClaims := []struct { + c claims + expectedError error + }{ + { + claims{ + "", + 1, + "nonce", + jwt.RegisteredClaims{ + IssuedAt: jwt.NewNumericDate(time.Now().Add(time.Hour * -1)), + }, + }, + errors.New("token doesn't include the ProductCode"), + }, + { + claims{ + "productCode", + 1, + "", + jwt.RegisteredClaims{ + IssuedAt: jwt.NewNumericDate(time.Now().Add(time.Hour * -1)), + }, + }, + errors.New("token doesn't include the Nonce"), + }, + { + claims{ + "productCode", + 0, + "nonce", + jwt.RegisteredClaims{ + IssuedAt: jwt.NewNumericDate(time.Now().Add(time.Hour * -1)), + }, + }, + errors.New("token doesn't include the PublicKeyVersion"), + }, + { + claims{ + "test", + 1, + "nonce", + jwt.RegisteredClaims{ + IssuedAt: jwt.NewNumericDate(time.Now().Add(time.Hour * +2)), + }, + }, + errors.New("token used before issued"), + }, + } + + for _, badC := range badClaims { + + err := badC.c.Valid() + if err == nil { + t.Errorf("Valid() returned no error when it should have returned error %q", badC.expectedError) + } else if err.Error() != badC.expectedError.Error() { + t.Errorf("Valid() returned error %q when it should have returned error %q", err, badC.expectedError) + } + } +} diff --git a/go.mod b/go.mod index e2a9414bac..d06aea6bc8 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/aws/aws-sdk-go-v2/config v1.8.2 github.com/aws/aws-sdk-go-v2/service/marketplacemetering v1.5.1 - github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 + github.com/golang-jwt/jwt/v4 v4.1.0 github.com/golang/glog v1.0.0 github.com/google/go-cmp v0.5.6 github.com/nginxinc/nginx-plus-go-client v0.8.0 diff --git a/go.sum b/go.sum index 16ce2c54ef..e23cb3270f 100644 --- a/go.sum +++ b/go.sum @@ -145,10 +145,7 @@ github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 h1:CaO/zOnF8VvUfEbhRatPcwKVWamvbYd8tQGRWacE9kU= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -220,6 +217,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0= +github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= From 29c2e2c8843d40f4ddb9e02f9712265e0fed4080 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Mon, 11 Oct 2021 11:14:44 -0700 Subject: [PATCH 2/5] Update packages for CVE-2021-37750 --- build/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index fa47c3dffe..3bc267d71b 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -9,6 +9,8 @@ FROM nginx:1.21.3 AS debian RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y libcap2-bin \ + # temporary fix for CVE-2021-37750 + && apt-get install -y libkrb5-3 libk5crypto3 \ && rm -rf /var/lib/apt/lists/* \ && echo $NGINX_VERSION > nginx_version From 7e5efa8b61451b692a27d616f9a77b87fc506317 Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Tue, 12 Oct 2021 15:07:41 +0100 Subject: [PATCH 3/5] Remove nap plus version override --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fc8c8e96e2..9e6aec8987 100644 --- a/Makefile +++ b/Makefile @@ -6,12 +6,11 @@ DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") VERSION = $(GIT_TAG)-SNAPSHOT-$(GIT_COMMIT_SHORT) TAG = $(VERSION:v%=%) TARGET ?= local -NAP_PLUS_VERSION ?= r24 override DOCKER_BUILD_OPTIONS += --build-arg IC_VERSION=$(VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) --build-arg DATE=$(DATE) DOCKER_CMD = docker build $(DOCKER_BUILD_OPTIONS) --target $(TARGET) -f build/Dockerfile -t $(PREFIX):$(TAG) . PLUS_ARGS = --build-arg PLUS=-plus --build-arg FILES=plus-common --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key -NAP_ARGS = --build-arg FILES=nap-common --build-arg NGINX_PLUS_VERSION=$(NAP_PLUS_VERSION) +NAP_ARGS = --build-arg FILES=nap-common export DOCKER_BUILDKIT = 1 From 681f97cd3d1fc552b2758182d95c314ca9dee70e Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 13 Oct 2021 09:19:28 -0700 Subject: [PATCH 4/5] Use release specific repo for NAP on Debian (#2082) --- build/Dockerfile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 3bc267d71b..5362e03f4b 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -47,11 +47,10 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https libcap2-bin \ && curl -sSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \ && curl -sSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \ - && printf "%s\n" "Acquire::https::pkgs.nginx.com::User-Agent \"k8s-ic-$IC_VERSION-apt\";" >> /etc/apt/apt.conf.d/90pkgs-nginx \ + && printf "%s\n" "Acquire::https::pkgs.nginx.com::User-Agent \"k8s-ic-$IC_VERSION${BUILD_OS##debian-plus}-apt\";" >> /etc/apt/apt.conf.d/90pkgs-nginx \ && printf "%s\n" "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list \ && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - nginx-plus-${NGINX_PLUS_VERSION} nginx-plus-module-njs-${NGINX_PLUS_VERSION} \ + && apt-get install --no-install-recommends --no-install-suggests -y nginx-plus nginx-plus-module-njs \ && apt-get purge --auto-remove -y apt-transport-https gnupg curl \ && rm -rf /var/lib/apt/lists/* @@ -66,14 +65,11 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y gnupg curl apt-transport-https \ && curl -sSL https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_app_signing.gpg \ - && sed -i "s/$IC_VERSION/$IC_VERSION-nap/g" /etc/apt/apt.conf.d/90pkgs-nginx \ - && printf "%s\n" "deb https://pkgs.nginx.com/app-protect/debian buster nginx-plus" \ + && printf "%s\n" "deb https://pkgs.nginx.com/app-protect/${NGINX_PLUS_VERSION^^}/debian buster nginx-plus" \ "deb https://pkgs.nginx.com/app-protect-security-updates/debian buster nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \ && apt-get update \ - # searching apt-cache for the latest version of NAP package compatible with the $NGINX_PLUS_VERSION - && module_version=$(apt-cache showpkg nginx-plus-module-appprotect | awk -v ver="nginx-plus-$NGINX_PLUS_VERSION" '{ if ($6 == ver) {print $1; exit}}') \ - && apt-get install --no-install-recommends --no-install-suggests -y nginx-plus-module-appprotect=${module_version} app-protect=${module_version} \ - && apt-get install --no-install-recommends --no-install-suggests -y app-protect-attack-signatures app-protect-threat-campaigns \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + nginx-plus-module-appprotect app-protect app-protect-attack-signatures app-protect-threat-campaigns \ && apt-get purge --auto-remove -y apt-transport-https gnupg curl \ && rm -rf /var/lib/apt/lists/* \ && rm /etc/apt/sources.list.d/nginx-app-protect.list From bb8ec62f683d4477ccf6de925c3b5b6902c77160 Mon Sep 17 00:00:00 2001 From: Ciara Stacke <18287516+ciarams87@users.noreply.github.com> Date: Wed, 13 Oct 2021 21:24:06 +0100 Subject: [PATCH 5/5] Release 2.0.2 (#2085) Co-authored-by: Michael Pleshakov Co-authored-by: Luca Comellini --- CHANGELOG.md | 6 ++++ README.md | 4 +-- deployments/daemon-set/nginx-ingress.yaml | 2 +- .../daemon-set/nginx-plus-ingress.yaml | 2 +- deployments/deployment/nginx-ingress.yaml | 2 +- .../deployment/nginx-plus-ingress.yaml | 2 +- deployments/helm-chart/Chart.yaml | 8 ++--- deployments/helm-chart/README.md | 4 +-- deployments/helm-chart/values-icp.yaml | 2 +- deployments/helm-chart/values-plus.yaml | 2 +- deployments/helm-chart/values.yaml | 2 +- docs/content/app-protect/configuration.md | 4 +-- docs/content/app-protect/installation.md | 2 +- .../configuration/configuration-examples.md | 4 +-- .../configmap-resource.md | 16 ++++----- .../global-configuration/custom-templates.md | 2 +- .../handling-host-and-listener-collisions.md | 2 +- ...advanced-configuration-with-annotations.md | 36 +++++++++---------- .../ingress-resources/basic-configuration.md | 2 +- .../cross-namespace-configuration.md | 4 +-- .../ingress-resources/custom-annotations.md | 4 +-- docs/content/configuration/policy-resource.md | 4 +-- .../configuration/transportserver-resource.md | 4 +-- ...server-and-virtualserverroute-resources.md | 6 ++-- .../building-ingress-controller-image.md | 6 ++-- .../installation/installation-with-helm.md | 4 +-- .../installation-with-manifests.md | 2 +- .../installation-with-operator.md | 2 +- .../pulling-ingress-controller-image.md | 12 +++---- .../using-the-jwt-token-docker-secret.md | 12 +++---- .../intro/nginx-ingress-controllers.md | 4 +-- docs/content/intro/nginx-plus.md | 6 ++-- docs/content/releases.md | 17 +++++++++ docs/content/technical-specifications.md | 23 ++++++------ 34 files changed, 118 insertions(+), 96 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f24fa74c2..8f1fee2d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 2.0.2 + +An automatically generated list of changes can be found on Github at: [2.0.2 Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.0.2) + +A curated list of changes can be found in the [Releases](http://docs.nginx.com/nginx-ingress-controller/releases/) page on NGINX Documentation website. + ### 2.0.1 An automatically generated list of changes can be found on Github at: [2.0.1 Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.0.1) diff --git a/README.md b/README.md index c3eed427c1..2ea62fb4cd 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Read [this doc](https://docs.nginx.com/nginx-ingress-controller/intro/nginx-plus We publish Ingress controller releases on GitHub. See our [releases page](https://github.com/nginxinc/kubernetes-ingress/releases). -The latest stable release is [2.0.1](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.0.1). For production use, we recommend that you choose the latest stable release. As an alternative, you can choose the *edge* version built from the [latest commit](https://github.com/nginxinc/kubernetes-ingress/commits/master) from the master branch. The edge version is useful for experimenting with new features that are not yet published in a stable release. +The latest stable release is [2.0.2](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.0.2). For production use, we recommend that you choose the latest stable release. As an alternative, you can choose the *edge* version built from the [latest commit](https://github.com/nginxinc/kubernetes-ingress/commits/master) from the master branch. The edge version is useful for experimenting with new features that are not yet published in a stable release. To use the Ingress controller, you need to have access to: * An Ingress controller image. @@ -66,7 +66,7 @@ The table below summarizes the options regarding the images, manifests, helm cha | Version | Description | Image for NGINX | Image for NGINX Plus | Installation Manifests and Helm Chart | Documentation and Examples | | ------- | ----------- | --------------- | -------------------- | ---------------------------------------| -------------------------- | -| Latest stable release | For production use | `nginx/nginx-ingress:2.0.1`, `nginx/nginx-ingress:2.0.1-alpine` from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/) or [build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | Use the 2.0.1 image from [the F5 Container Registry](https://docs.nginx.com/nginx-ingress-controller/installation/pulling-ingress-controller-image/) or [Build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/deployments/helm-chart). | [Documentation](https://docs.nginx.com/nginx-ingress-controller/). [Examples](https://docs.nginx.com/nginx-ingress-controller/configuration/configuration-examples/). | +| Latest stable release | For production use | `nginx/nginx-ingress:2.0.2`, `nginx/nginx-ingress:2.0.2-alpine` from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/) or [build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | Use the 2.0.2 image from [the F5 Container Registry](https://docs.nginx.com/nginx-ingress-controller/installation/pulling-ingress-controller-image/) or [Build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/deployments/helm-chart). | [Documentation](https://docs.nginx.com/nginx-ingress-controller/). [Examples](https://docs.nginx.com/nginx-ingress-controller/configuration/configuration-examples/). | | Edge | For testing and experimenting | `nginx/nginx-ingress:edge`, `nginx/nginx-ingress:edge-alpine` from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/) or [build your own image](https://github.com/nginxinc/kubernetes-ingress/tree/master/docs/content/installation/building-ingress-controller-image.md). | [Build your own image](https://github.com/nginxinc/kubernetes-ingress/tree/master/docs/content/installation/building-ingress-controller-image.md). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/master/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/master/deployments/helm-chart). | [Documentation](https://github.com/nginxinc/kubernetes-ingress/tree/master/docs/content). [Examples](https://github.com/nginxinc/kubernetes-ingress/tree/master/examples). | ## Contacts diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 1badba2ad2..8c9f825d7d 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -18,7 +18,7 @@ spec: spec: serviceAccountName: nginx-ingress containers: - - image: nginx/nginx-ingress:2.0.1 + - image: nginx/nginx-ingress:2.0.2 imagePullPolicy: IfNotPresent name: nginx-ingress ports: diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index d418337bbb..b8c9102410 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -18,7 +18,7 @@ spec: spec: serviceAccountName: nginx-ingress containers: - - image: nginx-plus-ingress:2.0.1 + - image: nginx-plus-ingress:2.0.2 imagePullPolicy: IfNotPresent name: nginx-plus-ingress ports: diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index 1ca1dd2363..43ae0b0547 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -19,7 +19,7 @@ spec: spec: serviceAccountName: nginx-ingress containers: - - image: nginx/nginx-ingress:2.0.1 + - image: nginx/nginx-ingress:2.0.2 imagePullPolicy: IfNotPresent name: nginx-ingress ports: diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 2a3c8f90f4..c144a8dce4 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -19,7 +19,7 @@ spec: spec: serviceAccountName: nginx-ingress containers: - - image: nginx-plus-ingress:2.0.1 + - image: nginx-plus-ingress:2.0.2 imagePullPolicy: IfNotPresent name: nginx-plus-ingress ports: diff --git a/deployments/helm-chart/Chart.yaml b/deployments/helm-chart/Chart.yaml index c6e5459f9a..9ca4265b3f 100644 --- a/deployments/helm-chart/Chart.yaml +++ b/deployments/helm-chart/Chart.yaml @@ -1,13 +1,13 @@ name: nginx-ingress -version: 0.11.1 -appVersion: 2.0.1 +version: 0.11.2 +appVersion: 2.0.2 apiVersion: v1 kubeVersion: ">= 1.19.0-0" description: NGINX Ingress Controller -icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.0.1/deployments/helm-chart/chart-icon.png +icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.0.2/deployments/helm-chart/chart-icon.png home: https://github.com/nginxinc/kubernetes-ingress sources: - - https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/deployments/helm-chart + - https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/deployments/helm-chart keywords: - ingress - nginx diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index d9fdf91679..bb13474a5d 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -26,7 +26,7 @@ This step is required if you're installing the chart using its sources. Addition 2. Change your working directory to /deployments/helm-chart: ```console $ cd kubernetes-ingress/deployments/helm-chart - $ git checkout v2.0.1 + $ git checkout v2.0.2 ``` ## Adding the Helm Repository @@ -152,7 +152,7 @@ Parameter | Description | Default `controller.nginxDebug` | Enables debugging for NGINX. Uses the `nginx-debug` binary. Requires `error-log-level: debug` in the ConfigMap via `controller.config.entries`. | false `controller.logLevel` | The log level of the Ingress Controller. | 1 `controller.image.repository` | The image repository of the Ingress controller. | nginx/nginx-ingress -`controller.image.tag` | The tag of the Ingress controller image. | 2.0.1 +`controller.image.tag` | The tag of the Ingress controller image. | 2.0.2 `controller.image.pullPolicy` | The pull policy for the Ingress controller image. | IfNotPresent `controller.config.name` | The name of the ConfigMap used by the Ingress controller. | Autogenerated `controller.config.annotations` | The annotations of the Ingress controller configmap. | {} diff --git a/deployments/helm-chart/values-icp.yaml b/deployments/helm-chart/values-icp.yaml index f2cf40b13a..df49bce10c 100644 --- a/deployments/helm-chart/values-icp.yaml +++ b/deployments/helm-chart/values-icp.yaml @@ -3,7 +3,7 @@ controller: nginxplus: true image: repository: mycluster.icp:8500/kube-system/nginx-plus-ingress - tag: "2.0.1" + tag: "2.0.2" nodeSelector: beta.kubernetes.io/arch: "amd64" proxy: true diff --git a/deployments/helm-chart/values-plus.yaml b/deployments/helm-chart/values-plus.yaml index b8689ce296..96ba3a6f8e 100644 --- a/deployments/helm-chart/values-plus.yaml +++ b/deployments/helm-chart/values-plus.yaml @@ -2,4 +2,4 @@ controller: nginxplus: true image: repository: nginx-plus-ingress - tag: "2.0.1" + tag: "2.0.2" diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index 80018d2b19..96f0c28afa 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -34,7 +34,7 @@ controller: repository: nginx/nginx-ingress ## The tag of the Ingress controller image. - tag: "2.0.1" + tag: "2.0.2" ## The pull policy for the Ingress controller image. pullPolicy: IfNotPresent diff --git a/docs/content/app-protect/configuration.md b/docs/content/app-protect/configuration.md index c4acd898d3..6b681c41af 100644 --- a/docs/content/app-protect/configuration.md +++ b/docs/content/app-protect/configuration.md @@ -8,13 +8,13 @@ toc: true --- This document describes how to configure the NGINX App Protect module -> Check out the complete [NGINX Ingress Controller with App Protect example resources on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). +> Check out the complete [NGINX Ingress Controller with App Protect example resources on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). ## Global Configuration The NGINX Ingress Controller has a set of global configuration parameters that align with those available in the NGINX App Protect module. See [ConfigMap keys](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#modules) for the complete list. The App Protect parameters use the `app-protect*` prefix. -> Check out the complete [NGINX Ingress Controller with App Protect example resources on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). +> Check out the complete [NGINX Ingress Controller with App Protect example resources on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). ## Enable App Protect for an Ingress Resource diff --git a/docs/content/app-protect/installation.md b/docs/content/app-protect/installation.md index a6da6bc7a4..c093395a0f 100644 --- a/docs/content/app-protect/installation.md +++ b/docs/content/app-protect/installation.md @@ -73,4 +73,4 @@ Take the steps below to set up and deploy the NGINX Ingress Controller and App P 3. Enable the App Protect module by adding the `enable-app-protect` [cli argument](/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#cmdoption-enable-app-protect) to your Deployment or DaemonSet file. 4. [Deploy the Ingress Controller](/nginx-ingress-controller/installation/installation-with-manifests/#3-deploy-the-ingress-controller). -For more information, see the [Configuration guide](/nginx-ingress-controller/app-protect/configuration) and the [NGINX Ingress Controller with App Protect examples on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). +For more information, see the [Configuration guide](/nginx-ingress-controller/app-protect/configuration) and the [NGINX Ingress Controller with App Protect examples on GitHub](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). diff --git a/docs/content/configuration/configuration-examples.md b/docs/content/configuration/configuration-examples.md index 61a9d86f42..7e220fbdbb 100644 --- a/docs/content/configuration/configuration-examples.md +++ b/docs/content/configuration/configuration-examples.md @@ -9,5 +9,5 @@ toc: true Our [GitHub repo](https://github.com/nginxinc/kubernetes-ingress) includes a number of configuration examples: -* [*Examples*](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples) show how to use advanced NGINX features in Ingress resources with annotations. -* [*Examples of Custom Resources*](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources) show how to use VirtualServer and VirtualServerResources for a few use cases. +* [*Examples*](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples) show how to use advanced NGINX features in Ingress resources with annotations. +* [*Examples of Custom Resources*](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources) show how to use VirtualServer and VirtualServerResources for a few use cases. diff --git a/docs/content/configuration/global-configuration/configmap-resource.md b/docs/content/configuration/global-configuration/configmap-resource.md index 1a003d0dbd..17df19bfac 100644 --- a/docs/content/configuration/global-configuration/configmap-resource.md +++ b/docs/content/configuration/global-configuration/configmap-resource.md @@ -85,10 +85,10 @@ See the doc about [VirtualServer and VirtualServerRoute resources](/nginx-ingres |``worker-shutdown-timeout`` | Sets the value of the [worker_shutdown_timeout](https://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout) directive. | N/A | | |``server-names-hash-bucket-size`` | Sets the value of the [server_names_hash_bucket_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size) directive. | ``256`` | | |``server-names-hash-max-size`` | Sets the value of the [server_names_hash_max_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size) directive. | ``1024`` | | -|``resolver-addresses`` | Sets the value of the [resolver](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) addresses. Note: If you use a DNS name (ex., ``kube-dns.kube-system.svc.cluster.local``\ ) as a resolver address, NGINX Plus will resolve it using the system resolver during the start and on every configuration reload. As a consequence, If the name cannot be resolved or the DNS server doesn't respond, NGINX Plus will fail to start or reload. To avoid this, consider using only IP addresses as resolver addresses. Supported in NGINX Plus only. | N/A | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/externalname-services). | -|``resolver-ipv6`` | Enables IPv6 resolution in the resolver. Supported in NGINX Plus only. | ``True`` | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/externalname-services). | -|``resolver-valid`` | Sets the time NGINX caches the resolved DNS records. Supported in NGINX Plus only. | TTL value of a DNS record | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/externalname-services). | -|``resolver-timeout`` | Sets the [resolver_timeout](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver_timeout) for name resolution. Supported in NGINX Plus only. | ``30s`` | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/externalname-services). | +|``resolver-addresses`` | Sets the value of the [resolver](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) addresses. Note: If you use a DNS name (ex., ``kube-dns.kube-system.svc.cluster.local``\ ) as a resolver address, NGINX Plus will resolve it using the system resolver during the start and on every configuration reload. As a consequence, If the name cannot be resolved or the DNS server doesn't respond, NGINX Plus will fail to start or reload. To avoid this, consider using only IP addresses as resolver addresses. Supported in NGINX Plus only. | N/A | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/externalname-services). | +|``resolver-ipv6`` | Enables IPv6 resolution in the resolver. Supported in NGINX Plus only. | ``True`` | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/externalname-services). | +|``resolver-valid`` | Sets the time NGINX caches the resolved DNS records. Supported in NGINX Plus only. | TTL value of a DNS record | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/externalname-services). | +|``resolver-timeout`` | Sets the [resolver_timeout](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver_timeout) for name resolution. Supported in NGINX Plus only. | ``30s`` | [Support for Type ExternalName Services](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/externalname-services). | |``keepalive-timeout`` | Sets the value of the [keepalive_timeout](https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) directive. | ``65s`` | | |``keepalive-requests`` | Sets the value of the [keepalive_requests](https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests) directive. | ``100`` | | |``variables-hash-bucket-size`` | Sets the value of the [variables_hash_bucket_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#variables_hash_bucket_size) directive. | ``256`` | | @@ -103,9 +103,9 @@ See the doc about [VirtualServer and VirtualServerRoute resources](/nginx-ingres |``error-log-level`` | Sets the global [error log level](https://nginx.org/en/docs/ngx_core_module.html#error_log) for NGINX. | ``notice`` | | |``access-log-off`` | Disables the [access log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log). | ``False`` | | |``default-server-access-log-off`` | Disables the [access log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log) for the default server. If access log is disabled globally (``access-log-off: "True"``), then the default server access log is always disabled. | ``False`` | | -|``log-format`` | Sets the custom [log format](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) for HTTP and HTTPS traffic. For convenience, it is possible to define the log format across multiple lines (each line separated by ``\n``). In that case, the Ingress Controller will replace every ``\n`` character with a space character. All ``'`` characters must be escaped. | See the [template file](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/internal/configs/version1/nginx.tmpl) for the access log. | [Custom Log Format](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/custom-log-format). | +|``log-format`` | Sets the custom [log format](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) for HTTP and HTTPS traffic. For convenience, it is possible to define the log format across multiple lines (each line separated by ``\n``). In that case, the Ingress Controller will replace every ``\n`` character with a space character. All ``'`` characters must be escaped. | See the [template file](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/internal/configs/version1/nginx.tmpl) for the access log. | [Custom Log Format](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/custom-log-format). | |``log-format-escaping`` | Sets the characters escaping for the variables of the log format. Supported values: ``json`` (JSON escaping), ``default`` (the default escaping) ``none`` (disables escaping). | ``default`` | | -|``stream-log-format`` | Sets the custom [log format](https://nginx.org/en/docs/stream/ngx_stream_log_module.html#log_format) for TCP, UDP, and TLS Passthrough traffic. For convenience, it is possible to define the log format across multiple lines (each line separated by ``\n``). In that case, the Ingress Controller will replace every ``\n`` character with a space character. All ``'`` characters must be escaped. | See the [template file](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/internal/configs/version1/nginx.tmpl). | | +|``stream-log-format`` | Sets the custom [log format](https://nginx.org/en/docs/stream/ngx_stream_log_module.html#log_format) for TCP, UDP, and TLS Passthrough traffic. For convenience, it is possible to define the log format across multiple lines (each line separated by ``\n``). In that case, the Ingress Controller will replace every ``\n`` character with a space character. All ``'`` characters must be escaped. | See the [template file](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/internal/configs/version1/nginx.tmpl). | | |``stream-log-format-escaping`` | Sets the characters escaping for the variables of the stream log format. Supported values: ``json`` (JSON escaping), ``default`` (the default escaping) ``none`` (disables escaping). | ``default`` | | {{% /table %}} @@ -141,7 +141,7 @@ See the doc about [VirtualServer and VirtualServerRoute resources](/nginx-ingres |ConfigMap Key | Description | Default | Example | | ---| ---| ---| --- | |``http2`` | Enables HTTP/2 in servers with SSL enabled. | ``False`` | | -|``proxy-protocol`` | Enables PROXY Protocol for incoming connections. | ``False`` | [Proxy Protocol](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/proxy-protocol). | +|``proxy-protocol`` | Enables PROXY Protocol for incoming connections. | ``False`` | [Proxy Protocol](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/proxy-protocol). | {{% /table %}} ### Backend Services (Upstreams) @@ -165,7 +165,7 @@ See the doc about [VirtualServer and VirtualServerRoute resources](/nginx-ingres |``http-snippets`` | Sets a custom snippet in http context. | N/A | | |``location-snippets`` | Sets a custom snippet in location context. | N/A | | |``server-snippets`` | Sets a custom snippet in server context. | N/A | | -|``stream-snippets`` | Sets a custom snippet in stream context. | N/A | [Support for TCP/UDP Load Balancing](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/tcp-udp). | +|``stream-snippets`` | Sets a custom snippet in stream context. | N/A | [Support for TCP/UDP Load Balancing](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/tcp-udp). | |``main-template`` | Sets the main NGINX configuration template. | By default the template is read from the file in the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). | |``ingress-template`` | Sets the NGINX configuration template for an Ingress resource. | By default the template is read from the file on the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). | |``virtualserver-template`` | Sets the NGINX configuration template for an VirtualServer resource. | By default the template is read from the file on the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). | diff --git a/docs/content/configuration/global-configuration/custom-templates.md b/docs/content/configuration/global-configuration/custom-templates.md index aa4fba177b..2eecef2b8e 100644 --- a/docs/content/configuration/global-configuration/custom-templates.md +++ b/docs/content/configuration/global-configuration/custom-templates.md @@ -8,4 +8,4 @@ toc: true --- -The Ingress Controller uses templates to generate NGINX configuration for Ingress resources, VirtualServer resources and the main NGINX configuration file. You can customize the templates and apply them via the ConfigMap. See the [corresponding example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/custom-templates). +The Ingress Controller uses templates to generate NGINX configuration for Ingress resources, VirtualServer resources and the main NGINX configuration file. You can customize the templates and apply them via the ConfigMap. See the [corresponding example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/custom-templates). diff --git a/docs/content/configuration/handling-host-and-listener-collisions.md b/docs/content/configuration/handling-host-and-listener-collisions.md index 8b74770b6e..73bbcf46c6 100644 --- a/docs/content/configuration/handling-host-and-listener-collisions.md +++ b/docs/content/configuration/handling-host-and-listener-collisions.md @@ -79,7 +79,7 @@ Similarly, if `cafe-ingress` was created first, it will win `cafe.example.com` a It is possible to merge configuration for multiple Ingress resources for the same host. One common use case for this approach is distributing resources across multiple namespaces. See the [Cross-namespace Configuration](/nginx-ingress-controller/configuration/ingress-resources/cross-namespace-configuration/) doc for more information. -It is *not* possible to merge the configurations for multiple VirtualServer resources for the same host. However, you can split the VirtualServers into multiple VirtualServerRoute resources, which a single VirtualServer can then reference. See the [corresponding example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources/cross-namespace-configuration) on GitHub. +It is *not* possible to merge the configurations for multiple VirtualServer resources for the same host. However, you can split the VirtualServers into multiple VirtualServerRoute resources, which a single VirtualServer can then reference. See the [corresponding example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources/cross-namespace-configuration) on GitHub. It is *not* possible to merge configuration for multiple TransportServer resources. diff --git a/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md b/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md index 4db419506f..e9c35c7263 100644 --- a/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md +++ b/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md @@ -133,7 +133,7 @@ The table below summarizes the available annotations. | ---| ---| ---| ---| --- | |``nginx.org/proxy-hide-headers`` | ``proxy-hide-headers`` | Sets the value of one or more [proxy_hide_header](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header) directives. Example: ``"nginx.org/proxy-hide-headers": "header-a,header-b"`` | N/A | | |``nginx.org/proxy-pass-headers`` | ``proxy-pass-headers`` | Sets the value of one or more [proxy_pass_header](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_header) directives. Example: ``"nginx.org/proxy-pass-headers": "header-a,header-b"`` | N/A | | -|``nginx.org/rewrites`` | N/A | Configures URI rewriting. | N/A | [Rewrites Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/rewrites). | +|``nginx.org/rewrites`` | N/A | Configures URI rewriting. | N/A | [Rewrites Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/rewrites). | {{% /table %}} ### Auth and SSL/TLS @@ -147,10 +147,10 @@ The table below summarizes the available annotations. |``nginx.org/hsts-max-age`` | ``hsts-max-age`` | Sets the value of the ``max-age`` directive of the HSTS header. | ``2592000`` (1 month) | | |``nginx.org/hsts-include-subdomains`` | ``hsts-include-subdomains`` | Adds the ``includeSubDomains`` directive to the HSTS header. | ``False`` | | |``nginx.org/hsts-behind-proxy`` | ``hsts-behind-proxy`` | Enables HSTS based on the value of the ``http_x_forwarded_proto`` request header. Should only be used when TLS termination is configured in a load balancer (proxy) in front of the Ingress Controller. Note: to control redirection from HTTP to HTTPS configure the ``nginx.org/redirect-to-https`` annotation. | ``False`` | | -|``nginx.com/jwt-key`` | N/A | Specifies a Secret resource with keys for validating JSON Web Tokens (JWTs). | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/jwt). | -|``nginx.com/jwt-realm`` | N/A | Specifies a realm. | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/jwt). | -|``nginx.com/jwt-token`` | N/A | Specifies a variable that contains JSON Web Token. | By default, a JWT is expected in the ``Authorization`` header as a Bearer Token. | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/jwt). | -|``nginx.com/jwt-login-url`` | N/A | Specifies a URL to which a client is redirected in case of an invalid or missing JWT. | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/jwt). | +|``nginx.com/jwt-key`` | N/A | Specifies a Secret resource with keys for validating JSON Web Tokens (JWTs). | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/jwt). | +|``nginx.com/jwt-realm`` | N/A | Specifies a realm. | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/jwt). | +|``nginx.com/jwt-token`` | N/A | Specifies a variable that contains JSON Web Token. | By default, a JWT is expected in the ``Authorization`` header as a Bearer Token. | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/jwt). | +|``nginx.com/jwt-login-url`` | N/A | Specifies a URL to which a client is redirected in case of an invalid or missing JWT. | N/A | [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/jwt). | {{% /table %}} ### Listeners @@ -168,19 +168,19 @@ The table below summarizes the available annotations. |Annotation | ConfigMap Key | Description | Default | Example | | ---| ---| ---| ---| --- | |``nginx.org/lb-method`` | ``lb-method`` | Sets the [load balancing method](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/#choosing-a-load-balancing-method). To use the round-robin method, specify ``"round_robin"``. | ``"random two least_conn"`` | | -|``nginx.org/ssl-services`` | N/A | Enables HTTPS or gRPC over SSL when connecting to the endpoints of services. | N/A | [SSL Services Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/ssl-services). | -|``nginx.org/grpc-services`` | N/A | Enables gRPC for services. Note: requires HTTP/2 (see ``http2`` ConfigMap key); only works for Ingresses with TLS termination enabled. | N/A | [GRPC Services Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/grpc-services). | -|``nginx.org/websocket-services`` | N/A | Enables WebSocket for services. | N/A | [WebSocket support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/websocket). | +|``nginx.org/ssl-services`` | N/A | Enables HTTPS or gRPC over SSL when connecting to the endpoints of services. | N/A | [SSL Services Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/ssl-services). | +|``nginx.org/grpc-services`` | N/A | Enables gRPC for services. Note: requires HTTP/2 (see ``http2`` ConfigMap key); only works for Ingresses with TLS termination enabled. | N/A | [GRPC Services Support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/grpc-services). | +|``nginx.org/websocket-services`` | N/A | Enables WebSocket for services. | N/A | [WebSocket support](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/websocket). | |``nginx.org/max-fails`` | ``max-fails`` | Sets the value of the [max_fails](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_fails) parameter of the ``server`` directive. | ``1`` | | |``nginx.org/max-conns`` | N\A | Sets the value of the [max_conns](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_conns) parameter of the ``server`` directive. | ``0`` | | |``nginx.org/upstream-zone-size`` | ``upstream-zone-size`` | Sets the size of the shared memory [zone](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone) for upstreams. For NGINX, the special value 0 disables the shared memory zones. For NGINX Plus, shared memory zones are required and cannot be disabled. The special value 0 will be ignored. | ``256K`` | | |``nginx.org/fail-timeout`` | ``fail-timeout`` | Sets the value of the [fail_timeout](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#fail_timeout) parameter of the ``server`` directive. | ``10s`` | | -|``nginx.com/sticky-cookie-services`` | N/A | Configures session persistence. | N/A | [Session Persistence](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/session-persistence). | +|``nginx.com/sticky-cookie-services`` | N/A | Configures session persistence. | N/A | [Session Persistence](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/session-persistence). | |``nginx.org/keepalive`` | ``keepalive`` | Sets the value of the [keepalive](https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive) directive. Note that ``proxy_set_header Connection "";`` is added to the generated configuration when the value > 0. | ``0`` | | -|``nginx.com/health-checks`` | N/A | Enables active health checks. | ``False`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/health-checks). | -|``nginx.com/health-checks-mandatory`` | N/A | Configures active health checks as mandatory. | ``False`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/health-checks). | -|``nginx.com/health-checks-mandatory-queue`` | N/A | When active health checks are mandatory, configures a queue for temporary storing incoming requests during the time when NGINX Plus is checking the health of the endpoints after a configuration reload. | ``0`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/health-checks). | -|``nginx.com/slow-start`` | N/A | Sets the upstream server [slow-start period](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/#server-slow-start). By default, slow-start is activated after a server becomes [available](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#passive-health-checks) or [healthy](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#active-health-checks). To enable slow-start for newly added servers, configure [mandatory active health checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/health-checks). | ``"0s"`` | | +|``nginx.com/health-checks`` | N/A | Enables active health checks. | ``False`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/health-checks). | +|``nginx.com/health-checks-mandatory`` | N/A | Configures active health checks as mandatory. | ``False`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/health-checks). | +|``nginx.com/health-checks-mandatory-queue`` | N/A | When active health checks are mandatory, configures a queue for temporary storing incoming requests during the time when NGINX Plus is checking the health of the endpoints after a configuration reload. | ``0`` | [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/health-checks). | +|``nginx.com/slow-start`` | N/A | Sets the upstream server [slow-start period](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/#server-slow-start). By default, slow-start is activated after a server becomes [available](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#passive-health-checks) or [healthy](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#active-health-checks). To enable slow-start for newly added servers, configure [mandatory active health checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/health-checks). | ``"0s"`` | | {{% /table %}} ### Snippets and Custom Templates @@ -199,9 +199,9 @@ The table below summarizes the available annotations. {{% table %}} |Annotation | ConfigMap Key | Description | Default | Example | | ---| ---| ---| ---| --- | -|``appprotect.f5.com/app-protect-policy`` | N/A | The name of the App Protect Policy for the Ingress Resource. Format is ``namespace/name``. If no namespace is specified, the same namespace of the Ingress Resource is used. If not specified but ``appprotect.f5.com/app-protect-enable`` is true, a default policy id applied. If the referenced policy resource does not exist, or policy is invalid, this annotation will be ignored, and the default policy will be applied. | N/A | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). | -|``appprotect.f5.com/app-protect-enable`` | N/A | Enable App Protect for the Ingress Resource. | ``False`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). | -|``appprotect.f5.com/app-protect-security-log-enable`` | N/A | Enable the [security log](/nginx-app-protect/troubleshooting/#app-protect-logging-overview) for App Protect. | ``False`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). | -|``appprotect.f5.com/app-protect-security-log`` | N/A | The App Protect log configuration for the Ingress Resource. Format is ``namespace/name``. If no namespace is specified, the same namespace as the Ingress Resource is used. If not specified the default is used which is: filter: ``illegal``, format: ``default``. Multiple configurations can be specified in a comma seperated list. Both log configurations and destinations list (see below) must be of equal length. Configs and destinations are paired by the list indices. | N/A | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). | -|``appprotect.f5.com/app-protect-security-log-destination`` | N/A | The destination of the security log. For more information check the [DESTINATION argument](/nginx-app-protect/troubleshooting/#app-protect-logging-overview). Multiple destinations can be specified in a coma separated list. Both log configurations and destinations list (see above) must be of equal length. Configs and destinations are paired by the list indices. | ``syslog:server=localhost:514`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/appprotect). | +|``appprotect.f5.com/app-protect-policy`` | N/A | The name of the App Protect Policy for the Ingress Resource. Format is ``namespace/name``. If no namespace is specified, the same namespace of the Ingress Resource is used. If not specified but ``appprotect.f5.com/app-protect-enable`` is true, a default policy id applied. If the referenced policy resource does not exist, or policy is invalid, this annotation will be ignored, and the default policy will be applied. | N/A | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). | +|``appprotect.f5.com/app-protect-enable`` | N/A | Enable App Protect for the Ingress Resource. | ``False`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). | +|``appprotect.f5.com/app-protect-security-log-enable`` | N/A | Enable the [security log](/nginx-app-protect/troubleshooting/#app-protect-logging-overview) for App Protect. | ``False`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). | +|``appprotect.f5.com/app-protect-security-log`` | N/A | The App Protect log configuration for the Ingress Resource. Format is ``namespace/name``. If no namespace is specified, the same namespace as the Ingress Resource is used. If not specified the default is used which is: filter: ``illegal``, format: ``default``. Multiple configurations can be specified in a comma seperated list. Both log configurations and destinations list (see below) must be of equal length. Configs and destinations are paired by the list indices. | N/A | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). | +|``appprotect.f5.com/app-protect-security-log-destination`` | N/A | The destination of the security log. For more information check the [DESTINATION argument](/nginx-app-protect/troubleshooting/#app-protect-logging-overview). Multiple destinations can be specified in a coma separated list. Both log configurations and destinations list (see above) must be of equal length. Configs and destinations are paired by the list indices. | ``syslog:server=localhost:514`` | [Example for App Protect](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/appprotect). | {{% /table %}} diff --git a/docs/content/configuration/ingress-resources/basic-configuration.md b/docs/content/configuration/ingress-resources/basic-configuration.md index 18b9b9adff..4d14c1cd59 100644 --- a/docs/content/configuration/ingress-resources/basic-configuration.md +++ b/docs/content/configuration/ingress-resources/basic-configuration.md @@ -50,7 +50,7 @@ Here is a breakdown of what this Ingress resource definition means: * The rule with the path `/coffee` instructs NGINX to distribute the requests with the `/coffee` URI among the pods of the *coffee* service, which is deployed with the name `coffee‑svc` in the cluster. * Both rules instruct NGINX to distribute the requests to `port 80` of the corresponding service (the `servicePort` field). -> For complete instructions on deploying the Ingress and Secret resources in the cluster, see the [complete-example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/complete-example) in our GitHub repo. +> For complete instructions on deploying the Ingress and Secret resources in the cluster, see the [complete-example](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/complete-example) in our GitHub repo. > To learn more about the Ingress resource, see the [Ingress resource documentation](https://kubernetes.io/docs/concepts/services-networking/ingress/) in the Kubernetes docs. diff --git a/docs/content/configuration/ingress-resources/cross-namespace-configuration.md b/docs/content/configuration/ingress-resources/cross-namespace-configuration.md index 35d079b99d..60dd0cdc3f 100644 --- a/docs/content/configuration/ingress-resources/cross-namespace-configuration.md +++ b/docs/content/configuration/ingress-resources/cross-namespace-configuration.md @@ -8,6 +8,6 @@ toc: true --- -You can spread the Ingress configuration for a common host across multiple Ingress resources using Mergeable Ingress resources. Such resources can belong to the *same* or *different* namespaces. This enables easier management when using a large number of paths. See the [Mergeable Ingress Resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/mergeable-ingress-types) example on our GitHub. +You can spread the Ingress configuration for a common host across multiple Ingress resources using Mergeable Ingress resources. Such resources can belong to the *same* or *different* namespaces. This enables easier management when using a large number of paths. See the [Mergeable Ingress Resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/mergeable-ingress-types) example on our GitHub. -As an alternative to Mergeable Ingress resources, you can use [VirtualServer and VirtualServerRoute resources](/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/) for cross-namespace configuration. See the [Cross-Namespace Configuration](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources/cross-namespace-configuration) example on our GitHub. +As an alternative to Mergeable Ingress resources, you can use [VirtualServer and VirtualServerRoute resources](/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/) for cross-namespace configuration. See the [Cross-Namespace Configuration](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources/cross-namespace-configuration) example on our GitHub. diff --git a/docs/content/configuration/ingress-resources/custom-annotations.md b/docs/content/configuration/ingress-resources/custom-annotations.md index 0f3c090e9f..ef0e4e1056 100644 --- a/docs/content/configuration/ingress-resources/custom-annotations.md +++ b/docs/content/configuration/ingress-resources/custom-annotations.md @@ -22,7 +22,7 @@ Custom annotations allow you to add an annotation for an NGINX feature that is n ## Usage -The Ingress Controller generates NGINX configuration for Ingress resources by executing a configuration template. See [NGINX template](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/internal/configs/version1/nginx.ingress.tmpl) or [NGINX Plus template](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/internal/configs/version1/nginx-plus.ingress.tmpl). +The Ingress Controller generates NGINX configuration for Ingress resources by executing a configuration template. See [NGINX template](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/internal/configs/version1/nginx.ingress.tmpl) or [NGINX Plus template](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/internal/configs/version1/nginx-plus.ingress.tmpl). To support custom annotations, the template has access to the information about the Ingress resource - its *name*, *namespace* and *annotations*. It is possible to check if a particular annotation present in the Ingress resource and conditionally insert NGINX configuration directives at multiple NGINX contexts - `http`, `server`, `location` or `upstream`. Additionally, you can get the value that is set to the annotation. @@ -131,4 +131,4 @@ deny all; ## Example -See the [custom annotations example](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/examples/custom-annotations). +See the [custom annotations example](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/examples/custom-annotations). diff --git a/docs/content/configuration/policy-resource.md b/docs/content/configuration/policy-resource.md index 60df203c54..5451f0f5f7 100644 --- a/docs/content/configuration/policy-resource.md +++ b/docs/content/configuration/policy-resource.md @@ -12,7 +12,7 @@ The Policy resource allows you to configure features like access control and rat The resource is implemented as a [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). -This document is the reference documentation for the Policy resource. An example of a Policy for access control is available in our [GitHub repo](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/examples-of-custom-resources/access-control). +This document is the reference documentation for the Policy resource. An example of a Policy for access control is available in our [GitHub repo](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/examples-of-custom-resources/access-control). ## Prerequisites @@ -304,7 +304,7 @@ NGINX Plus will pass the ID of an authenticated user to the backend in the HTTP #### Prerequisites -For the OIDC feature to work, it is necessary to enable [zone synchronization](https://docs.nginx.com/nginx/admin-guide/high-availability/zone_sync/), otherwise NGINX Plus will fail to reload. Additionally, it is necessary to configure a resolver, so that NGINX Plus can resolve the IDP authorization endpoint. For an example of the necessary configuration see the documentation [here](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.1/examples-of-custom-resources/oidc#step-7---configure-nginx-plus-zone-synchronization-and-resolver). +For the OIDC feature to work, it is necessary to enable [zone synchronization](https://docs.nginx.com/nginx/admin-guide/high-availability/zone_sync/), otherwise NGINX Plus will fail to reload. Additionally, it is necessary to configure a resolver, so that NGINX Plus can resolve the IDP authorization endpoint. For an example of the necessary configuration see the documentation [here](https://github.com/nginxinc/kubernetes-ingress/blob/v2.0.2/examples-of-custom-resources/oidc#step-7---configure-nginx-plus-zone-synchronization-and-resolver). > **Note**: The configuration in the example doesn't enable TLS and the synchronization between the replica happens in clear text. This could lead to the exposure of tokens. diff --git a/docs/content/configuration/transportserver-resource.md b/docs/content/configuration/transportserver-resource.md index 197d1bc6f4..1800cb084d 100644 --- a/docs/content/configuration/transportserver-resource.md +++ b/docs/content/configuration/transportserver-resource.md @@ -9,7 +9,7 @@ toc: true The TransportServer resource allows you to configure TCP, UDP, and TLS Passthrough load balancing. The resource is implemented as a [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). -This document is the reference documentation for the TransportServer resource. To see additional examples of using the resource for specific use cases, go to the [examples-of-custom-resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources) folder in our GitHub repo. +This document is the reference documentation for the TransportServer resource. To see additional examples of using the resource for specific use cases, go to the [examples-of-custom-resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources) folder in our GitHub repo. > **Feature Status**: The TransportServer resource is available as a preview feature: it is suitable for experimenting and testing; however, it must be used with caution in production environments. Additionally, while the feature is in preview, we might introduce some backward-incompatible changes to the resource specification in the next releases. @@ -378,4 +378,4 @@ The [ConfigMap](/nginx-ingress-controller/configuration/global-configuration/con ## Limitations The TransportServer resource is a preview feature. Currently, it comes with the following limitation: -* When using TLS Passthrough, it is not possible to configure [Proxy Protocol](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/proxy-protocol) for port 443 both for regular HTTPS and TLS Passthrough traffic. +* When using TLS Passthrough, it is not possible to configure [Proxy Protocol](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/proxy-protocol) for port 443 both for regular HTTPS and TLS Passthrough traffic. diff --git a/docs/content/configuration/virtualserver-and-virtualserverroute-resources.md b/docs/content/configuration/virtualserver-and-virtualserverroute-resources.md index e280a6391f..4333e9640b 100644 --- a/docs/content/configuration/virtualserver-and-virtualserverroute-resources.md +++ b/docs/content/configuration/virtualserver-and-virtualserverroute-resources.md @@ -11,7 +11,7 @@ toc: true The VirtualServer and VirtualServerRoute resources are new load balancing configuration, introduced in release 1.5 as an alternative to the Ingress resource. The resources enable use cases not supported with the Ingress resource, such as traffic splitting and advanced content-based routing. The resources are implemented as [Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). -This document is the reference documentation for the resources. To see additional examples of using the resources for specific use cases, go to the [examples-of-custom-resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources) folder in our GitHub repo. +This document is the reference documentation for the resources. To see additional examples of using the resources for specific use cases, go to the [examples-of-custom-resources](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources) folder in our GitHub repo. ## VirtualServer Specification @@ -250,7 +250,7 @@ tls: |Field | Description | Type | Required | | ---| ---| ---| --- | |``name`` | The name of the upstream. Must be a valid DNS label as defined in RFC 1035. For example, ``hello`` and ``upstream-123`` are valid. The name must be unique among all upstreams of the resource. | ``string`` | Yes | -|``service`` | The name of a [service](https://kubernetes.io/docs/concepts/services-networking/service/). The service must belong to the same namespace as the resource. If the service doesn't exist, NGINX will assume the service has zero endpoints and return a ``502`` response for requests for this upstream. For NGINX Plus only, services of type [ExternalName](https://kubernetes.io/docs/concepts/services-networking/service/#externalname) are also supported (check the [prerequisites](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/externalname-services#prerequisites)\ ). | ``string`` | Yes | +|``service`` | The name of a [service](https://kubernetes.io/docs/concepts/services-networking/service/). The service must belong to the same namespace as the resource. If the service doesn't exist, NGINX will assume the service has zero endpoints and return a ``502`` response for requests for this upstream. For NGINX Plus only, services of type [ExternalName](https://kubernetes.io/docs/concepts/services-networking/service/#externalname) are also supported (check the [prerequisites](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/externalname-services#prerequisites)\ ). | ``string`` | Yes | |``subselector`` | Selects the pods within the service using label keys and values. By default, all pods of the service are selected. Note: the specified labels are expected to be present in the pods when they are created. If the pod labels are updated, the Ingress Controller will not see that change until the number of the pods is changed. | ``map[string]string`` | No | |``use-cluster-ip`` | Enables using the Cluster IP and port of the service instead of the default behavior of using the IP and port of the pods. When this field is enabled, the fields that configure NGINX behavior related to multiple upstream servers (like ``lb-method`` and ``next-upstream``) will have no effect, as the Ingress Controller will configure NGINX with only one upstream server that will match the service Cluster IP. | ``boolean`` | No | |``port`` | The port of the service. If the service doesn't define that port, NGINX will assume the service has zero endpoints and return a ``502`` response for requests for this upstream. The port must fall into the range ``1..65535``. | ``uint16`` | Yes | @@ -517,7 +517,7 @@ proxy: |``upstream`` | The name of the upstream which the requests will be proxied to. The upstream with that name must be defined in the resource. | ``string`` | Yes | |``requestHeaders`` | The request headers modifications. | [action.Proxy.RequestHeaders](#actionproxyrequestheaders) | No | |``responseHeaders`` | The response headers modifications. | [action.Proxy.ResponseHeaders](#actionproxyresponseheaders) | No | -|``rewritePath`` | The rewritten URI. If the route path is a regular expression (starts with ~), the rewritePath can include capture groups with ``$1-9``. For example `$1` for the first group, and so on. For more information, check the [rewrite](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples-of-custom-resources/rewrites) example. | ``string`` | No | +|``rewritePath`` | The rewritten URI. If the route path is a regular expression (starts with ~), the rewritePath can include capture groups with ``$1-9``. For example `$1` for the first group, and so on. For more information, check the [rewrite](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples-of-custom-resources/rewrites) example. | ``string`` | No | {{% /table %}} ### Action.Proxy.RequestHeaders diff --git a/docs/content/installation/building-ingress-controller-image.md b/docs/content/installation/building-ingress-controller-image.md index 395a392816..3c0ae52cf4 100644 --- a/docs/content/installation/building-ingress-controller-image.md +++ b/docs/content/installation/building-ingress-controller-image.md @@ -33,7 +33,7 @@ We build the image using the make utility and the provided `Makefile`. Let’s c ``` $ git clone https://github.com/nginxinc/kubernetes-ingress/ $ cd kubernetes-ingress - $ git checkout v2.0.1 + $ git checkout v2.0.2 ``` 1. Build the image: @@ -47,7 +47,7 @@ We build the image using the make utility and the provided `Makefile`. Let’s c ``` `myregistry.example.com/nginx-ingress` defines the repo in your private registry where the image will be pushed. Substitute that value with the repo in your private registry. - As a result, the image **myregistry.example.com/nginx-ingress:2.0.1** is built. Note that the tag `2.0.1` comes from the `VERSION` variable, defined in the Makefile. + As a result, the image **myregistry.example.com/nginx-ingress:2.0.2** is built. Note that the tag `2.0.2` comes from the `VERSION` variable, defined in the Makefile. * For **NGINX Plus**, first, make sure that the certificate (`nginx-repo.crt`) and the key (`nginx-repo.key`) of your license are located in the root of the project: ``` @@ -60,7 +60,7 @@ We build the image using the make utility and the provided `Makefile`. Let’s c ``` `myregistry.example.com/nginx-plus-ingress` defines the repo in your private registry where the image will be pushed. Substitute that value with the repo in your private registry. - As a result, the image **myregistry.example.com/nginx-plus-ingress:2.0.1** is built. Note that the tag `2.0.1` comes from the `VERSION` variable, defined in the Makefile. + As a result, the image **myregistry.example.com/nginx-plus-ingress:2.0.2** is built. Note that the tag `2.0.2` comes from the `VERSION` variable, defined in the Makefile. **Note**: In the event of a patch version of [NGINX Plus being released](/nginx/releases/), make sure to rebuild your image to get the latest version. If your system is caching the Docker layers and not updating the packages, add `DOCKER_BUILD_OPTIONS="--no-cache"` to the `make` command. diff --git a/docs/content/installation/installation-with-helm.md b/docs/content/installation/installation-with-helm.md index 000119083d..67a72c9703 100644 --- a/docs/content/installation/installation-with-helm.md +++ b/docs/content/installation/installation-with-helm.md @@ -31,7 +31,7 @@ This step is required if you're installing the chart using its sources. Addition 2. Change your working directory to /deployments/helm-chart: ```console $ cd kubernetes-ingress/deployments/helm-chart - $ git checkout v2.0.1 + $ git checkout v2.0.2 ``` ## Adding the Helm Repository @@ -154,7 +154,7 @@ The following tables lists the configurable parameters of the NGINX Ingress cont |``controller.nginxDebug`` | Enables debugging for NGINX. Uses the ``nginx-debug`` binary. Requires ``error-log-level: debug`` in the ConfigMap via ``controller.config.entries``. | false | |``controller.logLevel`` | The log level of the Ingress Controller. | 1 | |``controller.image.repository`` | The image repository of the Ingress controller. | nginx/nginx-ingress | -|``controller.image.tag`` | The tag of the Ingress controller image. | 2.0.1 | +|``controller.image.tag`` | The tag of the Ingress controller image. | 2.0.2 | |``controller.image.pullPolicy`` | The pull policy for the Ingress controller image. | IfNotPresent | |``controller.config.name`` | The name of the ConfigMap used by the Ingress controller. | Autogenerated | |``controller.config.entries`` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {} | diff --git a/docs/content/installation/installation-with-manifests.md b/docs/content/installation/installation-with-manifests.md index 4e7639349a..59c1fd81bd 100644 --- a/docs/content/installation/installation-with-manifests.md +++ b/docs/content/installation/installation-with-manifests.md @@ -22,7 +22,7 @@ This document describes how to install the NGINX Ingress Controller in your Kube ``` $ git clone https://github.com/nginxinc/kubernetes-ingress/ $ cd kubernetes-ingress/deployments - $ git checkout v2.0.1 + $ git checkout v2.0.2 ``` ## 1. Configure RBAC diff --git a/docs/content/installation/installation-with-operator.md b/docs/content/installation/installation-with-operator.md index 577548034c..1a7c23d8f5 100644 --- a/docs/content/installation/installation-with-operator.md +++ b/docs/content/installation/installation-with-operator.md @@ -32,7 +32,7 @@ spec: type: deployment image: repository: nginx/nginx-ingress - tag: 2.0.1 + tag: 2.0.2 pullPolicy: Always serviceType: NodePort nginxPlus: False diff --git a/docs/content/installation/pulling-ingress-controller-image.md b/docs/content/installation/pulling-ingress-controller-image.md index c3cf220e45..021cda898a 100644 --- a/docs/content/installation/pulling-ingress-controller-image.md +++ b/docs/content/installation/pulling-ingress-controller-image.md @@ -48,10 +48,10 @@ Before you can pull the image, make sure that the following software is installe { "name": "nginx-ic/nginx-plus-ingress", "tags": [ - "2.0.1-alpine", - "2.0.1-ot", - "2.0.1-ubi", - "2.0.1" + "2.0.2-alpine", + "2.0.2-ot", + "2.0.2-ubi", + "2.0.2" ] } @@ -59,8 +59,8 @@ Before you can pull the image, make sure that the following software is installe { "name": "nginx-ic-nap/nginx-plus-ingress", "tags": [ - "2.0.1-ubi", - "2.0.1" + "2.0.2-ubi", + "2.0.2" ] } ``` diff --git a/docs/content/installation/using-the-jwt-token-docker-secret.md b/docs/content/installation/using-the-jwt-token-docker-secret.md index e504dd011b..4943b74070 100644 --- a/docs/content/installation/using-the-jwt-token-docker-secret.md +++ b/docs/content/installation/using-the-jwt-token-docker-secret.md @@ -41,10 +41,10 @@ This document explains how to use the NGINX Plus Ingress Controller image from t { "name": "nginx-ic/nginx-plus-ingress", "tags": [ - "2.0.1-alpine", - "2.0.1-ot", - "2.0.1-ubi", - "2.0.1" + "2.0.2-alpine", + "2.0.2-ot", + "2.0.2-ubi", + "2.0.2" ] } @@ -52,8 +52,8 @@ This document explains how to use the NGINX Plus Ingress Controller image from t { "name": "nginx-ic-nap/nginx-plus-ingress", "tags": [ - "2.0.1-ubi", - "2.0.1" + "2.0.2-ubi", + "2.0.2" ] } ``` diff --git a/docs/content/intro/nginx-ingress-controllers.md b/docs/content/intro/nginx-ingress-controllers.md index 8101a1f781..e387f37179 100644 --- a/docs/content/intro/nginx-ingress-controllers.md +++ b/docs/content/intro/nginx-ingress-controllers.md @@ -28,11 +28,11 @@ The table below summarizes the key difference between nginxinc/kubernetes-ingres | NGINX version | [Custom](https://github.com/kubernetes/ingress-nginx/tree/master/images/nginx) NGINX build that includes several third-party modules | NGINX official mainline [build](https://github.com/nginxinc/docker-nginx) | NGINX Plus | | Commercial support | N/A | N/A | Included | | **Load balancing configuration via the Ingress resource** | -| Merging Ingress rules with the same host | Supported | Supported via [Mergeable Ingresses](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/mergeable-ingress-types) | Supported via [Mergeable Ingresses](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/mergeable-ingress-types) | +| Merging Ingress rules with the same host | Supported | Supported via [Mergeable Ingresses](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/mergeable-ingress-types) | Supported via [Mergeable Ingresses](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/mergeable-ingress-types) | | HTTP load balancing extensions - Annotations | See the [supported annotations](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/) | See the [supported annotations](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/) | See the [supported annotations](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/)| | HTTP load balancing extensions -- ConfigMap | See the [supported ConfigMap keys](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/) | See the [supported ConfigMap keys](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) | See the [supported ConfigMap keys](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) | | TCP/UDP | Supported via a ConfigMap | Supported via custom resources | Supported via custom resources | -| Websocket | Supported | Supported via an [annotation](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/websocket) | Supported via an [annotation](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/websocket) | +| Websocket | Supported | Supported via an [annotation](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/websocket) | Supported via an [annotation](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/websocket) | | TCP SSL Passthrough | Supported via a ConfigMap | Supported via custom resources | Supported via custom resources | | JWT validation | Not supported | Not supported | Supported | | Session persistence | Supported via a third-party module | Not supported | Supported | diff --git a/docs/content/intro/nginx-plus.md b/docs/content/intro/nginx-plus.md index 6c44775795..341434363d 100644 --- a/docs/content/intro/nginx-plus.md +++ b/docs/content/intro/nginx-plus.md @@ -17,9 +17,9 @@ Below are the key characteristics that NGINX Plus brings on top of NGINX into th * *Real-time metrics* A number metrics about how NGINX Plus and applications are performing are available through the API or a [built-in dashboard](https://docs.nginx.com/nginx-ingress-controller/logging-and-monitoring/status-page/). Optionally, the metrics can be exported to [Prometheus](https://docs.nginx.com/nginx-ingress-controller/logging-and-monitoring/prometheus/). * *Additional load balancing methods*. The following additional methods are available: `least_time` and `random two least_time` and their derivatives. See the [documentation](https://nginx.org/en/docs/http/ngx_http_upstream_module.html) for the complete list of load balancing methods. -* *Session persistence* The *sticky cookie* method is available. See the [Session Persistence](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/session-persistence) example. -* *Active health checks*. See the [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/health-checks) example. -* *JWT validation*. See the [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.1/examples/jwt) example. +* *Session persistence* The *sticky cookie* method is available. See the [Session Persistence](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/session-persistence) example. +* *Active health checks*. See the [Support for Active Health Checks](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/health-checks) example. +* *JWT validation*. See the [Support for JSON Web Tokens (JWTs)](https://github.com/nginxinc/kubernetes-ingress/tree/v2.0.2/examples/jwt) example. See [ConfigMap](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) and [Annotations](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/) doc for the complete list of available NGINX Plus features. Note that such features are configured through annotations that start with `nginx.com`, for example, `nginx.com/health-checks`. diff --git a/docs/content/releases.md b/docs/content/releases.md index 186283150b..f419764054 100644 --- a/docs/content/releases.md +++ b/docs/content/releases.md @@ -6,6 +6,23 @@ doctypes: ["concept"] toc: true --- +## NGINX Ingress Controller 2.0.2 + +13 Oct 2021 + +CHANGES: +* Update NGINX App Protect version to 3.6. +* Update NGINX Plus version to R25 in NGINX App Protect enabled images. +* [2074](https://github.com/nginxinc/kubernetes-ingress/pull/2074) Update JWT library to `golang-jwt/jwt`. Previously, the Ingress Controller used `dgrijalva/jwt-go`, which has a vulnerability [CVE-2020-26160](https://nvd.nist.gov/vuln/detail/CVE-2020-26160). Note that the Ingress Controller wasn’t affected by this vulnerability, and the jwt library was used only in the NGINX Plus images from AWS Marketplace for Containers. + +HELM CHART: +* The version of the Helm chart is now 0.11.2. + +UPGRADE: +* For NGINX, use the 2.0.2 image from our DockerHub. +* For NGINX Plus, use the 2.0.2 from the F5 Container registry or build your own image using the 2.0.2 source code. +* For Helm, use version 0.11.2 of the chart. + ## NGINX Ingress Controller 2.0.1 07 Oct 2021 diff --git a/docs/content/technical-specifications.md b/docs/content/technical-specifications.md index f9236c186a..856762ca89 100644 --- a/docs/content/technical-specifications.md +++ b/docs/content/technical-specifications.md @@ -26,16 +26,15 @@ All images include NGINX 1.21.3. {{% table %}} |Name | Base image | Third-party modules | DockerHub image | Architectures | | ---| ---| ---| --- | --- | -|Alpine-based image | ``nginx:1.21.3-alpine``, which is based on ``alpine:3.14`` | | ``nginx/nginx-ingress:2.0.1-alpine`` | arm/v7, arm64, amd64, ppc64le, s390x | -|Debian-based image | ``nginx:1.21.3``, which is based on ``debian:buster-slim`` | | ``nginx/nginx-ingress:2.0.1`` | arm/v7, arm64, amd64, ppc64le, s390x | -|Debian-based image with Opentracing | ``nginx:1.21.3``, which is based on ``debian:buster-slim`` | NGINX OpenTracing module, OpenTracing library, OpenTracing tracers for Jaeger, Zipkin and Datadog | ``nginx/nginx-ingress:2.0.1-ot`` | arm/v7, arm64, amd64, ppc64le, s390x | -|Ubi-based image | ``redhat/ubi8-minimal`` | | ``nginx/nginx-ingress:2.0.1-ubi`` | arm64, amd64 | +|Alpine-based image | ``nginx:1.21.3-alpine``, which is based on ``alpine:3.14`` | | ``nginx/nginx-ingress:2.0.2-alpine`` | arm/v7, arm64, amd64, ppc64le, s390x | +|Debian-based image | ``nginx:1.21.3``, which is based on ``debian:buster-slim`` | | ``nginx/nginx-ingress:2.0.2`` | arm/v7, arm64, amd64, ppc64le, s390x | +|Debian-based image with Opentracing | ``nginx:1.21.3``, which is based on ``debian:buster-slim`` | NGINX OpenTracing module, OpenTracing library, OpenTracing tracers for Jaeger, Zipkin and Datadog | ``nginx/nginx-ingress:2.0.2-ot`` | arm/v7, arm64, amd64, ppc64le, s390x | +|Ubi-based image | ``redhat/ubi8-minimal`` | | ``nginx/nginx-ingress:2.0.2-ubi`` | arm64, amd64 | {{% /table %}} ### Images with NGINX Plus -NGINX Plus images include NGINX Plus R25. -NGINX Plus images with NGINX App Protect will continue to use R24 until App Protect 3.6 is released. +NGINX Plus images include NGINX Plus R25. The supported architecture is x86-64. NGINX Plus images are available through the F5 Container registry `private-registry.nginx.com` - see [Using the NGINX IC Plus JWT token in a Docker Config Secret](/nginx-ingress-controller/installation/using-the-jwt-token-docker-secret) and [Pulling the NGINX Ingress Controller image](/nginx-ingress-controller/installation/pulling-ingress-controller-image). @@ -43,12 +42,12 @@ NGINX Plus images are available through the F5 Container registry `private-regis {{% table %}} |Name | Base image | Third-party modules | F5 Container Registry Image | | ---| ---| --- | --- | -|Alpine-based image | ``alpine:3.14`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.1-alpine` | -|Debian-based image | ``debian:buster-slim`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.1` | -|Debian-based image with Opentracing | ``debian:buster-slim`` | NGINX Plus OpenTracing module, OpenTracing tracers for Jaeger, Zipkin and Datadog; NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.1-ot` | -|Debian-based image with App Protect | ``debian:buster-slim`` | NGINX Plus App Protect module; NGINX Plus JavaScript module | `nginx-ic-nap/nginx-plus-ingress:2.0.1` | -|Ubi-based image | ``redhat/ubi8-minimal`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.1-ubi` | -|Ubi-based image with App Protect | ``registry.access.redhat.com/ubi7/ubi`` | NGINX Plus App Protect module; NGINX Plus JavaScript module | `nginx-ic-nap/nginx-plus-ingress:2.0.1-ubi` | +|Alpine-based image | ``alpine:3.14`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.2-alpine` | +|Debian-based image | ``debian:buster-slim`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.2` | +|Debian-based image with Opentracing | ``debian:buster-slim`` | NGINX Plus OpenTracing module, OpenTracing tracers for Jaeger, Zipkin and Datadog; NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.2-ot` | +|Debian-based image with App Protect | ``debian:buster-slim`` | NGINX Plus App Protect module; NGINX Plus JavaScript module | `nginx-ic-nap/nginx-plus-ingress:2.0.2` | +|Ubi-based image | ``redhat/ubi8-minimal`` | NGINX Plus JavaScript module | `nginx-ic/nginx-plus-ingress:2.0.2-ubi` | +|Ubi-based image with App Protect | ``registry.access.redhat.com/ubi7/ubi`` | NGINX Plus App Protect module; NGINX Plus JavaScript module | `nginx-ic-nap/nginx-plus-ingress:2.0.2-ubi` | {{% /table %}} We also provide NGINX Plus images through the AWS Marketplace. Please see [Using the AWS Marketplace Ingress Controller Image](/nginx-ingress-controller/installation/using-aws-marketplace-image.md) for details on how to set up the required IAM resources in your EKS cluster.