diff --git a/Changelog.md b/Changelog.md index 0f4b8aeac2d3..81261c06d3e6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,70 @@ # Changelog +### 0.29.0 + +**Image:** `quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0` + +_New Features:_ + +- NGINX 1.17.8 +- Add SameSite support for [Cookie Affinity](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#cookie-affinity) https://www.chromium.org/updates/same-site +- Refactor of [mirror](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#mirror) feature to remove additional annotations + +_Changes:_ + +- [X] [#4949](https://github.com/kubernetes/ingress-nginx/pull/4949) Add SameSite support - omit None for old browsers +- [X] [#4973](https://github.com/kubernetes/ingress-nginx/pull/4973) Fix release script +- [X] [#4975](https://github.com/kubernetes/ingress-nginx/pull/4975) Fix docker installation in travis script +- [X] [#4976](https://github.com/kubernetes/ingress-nginx/pull/4976) Fix travis +- [X] [#4977](https://github.com/kubernetes/ingress-nginx/pull/4977) Fix image version +- [X] [#4983](https://github.com/kubernetes/ingress-nginx/pull/4983) Fix enable opentracing per location +- [X] [#4987](https://github.com/kubernetes/ingress-nginx/pull/4987) Dump kind logs after e2e tests +- [X] [#4993](https://github.com/kubernetes/ingress-nginx/pull/4993) Calculation algorithm for server_names_hash_bucket_size should consid… +- [X] [#4995](https://github.com/kubernetes/ingress-nginx/pull/4995) Cleanup main makefile and remove the need of sed +- [X] [#4996](https://github.com/kubernetes/ingress-nginx/pull/4996) Fix status update for clusters where networking.k8s.io is not available +- [X] [#4999](https://github.com/kubernetes/ingress-nginx/pull/4999) Fix limitrange definition +- [X] [#5000](https://github.com/kubernetes/ingress-nginx/pull/5000) Update python syntax in OAuth2 example +- [X] [#5003](https://github.com/kubernetes/ingress-nginx/pull/5003) Fix server aliases +- [X] [#5008](https://github.com/kubernetes/ingress-nginx/pull/5008) Fix docker buildx check in Makefile +- [X] [#5009](https://github.com/kubernetes/ingress-nginx/pull/5009) Move mod-security logic from template to go code +- [X] [#5010](https://github.com/kubernetes/ingress-nginx/pull/5010) Update nginx image +- [X] [#5011](https://github.com/kubernetes/ingress-nginx/pull/5011) Update nginx image, go to 1.13.7 and e2e image +- [X] [#5015](https://github.com/kubernetes/ingress-nginx/pull/5015) Refactor mirror feature +- [X] [#5016](https://github.com/kubernetes/ingress-nginx/pull/5016) Fix dep-ensure task +- [X] [#5023](https://github.com/kubernetes/ingress-nginx/pull/5023) Update metric dependencies and restore default Objectives +- [X] [#5028](https://github.com/kubernetes/ingress-nginx/pull/5028) Add echo image to avoid building and installing dependencies in each … +- [X] [#5031](https://github.com/kubernetes/ingress-nginx/pull/5031) Update kindest/node version to v1.17.2 +- [X] [#5032](https://github.com/kubernetes/ingress-nginx/pull/5032) Fix fortune-teller app manifest +- [X] [#5035](https://github.com/kubernetes/ingress-nginx/pull/5035) Update github.com/paultag/sniff dependency +- [X] [#5036](https://github.com/kubernetes/ingress-nginx/pull/5036) Disable DIND in script run-in-docker.sh +- [X] [#5038](https://github.com/kubernetes/ingress-nginx/pull/5038) Update code to use pault.ag/go/sniff package +- [X] [#5042](https://github.com/kubernetes/ingress-nginx/pull/5042) Fix X-Forwarded-Proto based on proxy-protocol server port +- [X] [#5050](https://github.com/kubernetes/ingress-nginx/pull/5050) Add flag to allow custom ingress status update intervals +- [X] [#5052](https://github.com/kubernetes/ingress-nginx/pull/5052) Change the handling of ConfigMap creation +- [X] [#5053](https://github.com/kubernetes/ingress-nginx/pull/5053) Validation of header in authreq should be done only in the key +- [X] [#5055](https://github.com/kubernetes/ingress-nginx/pull/5055) Only set mirror source when a target is configured +- [X] [#5059](https://github.com/kubernetes/ingress-nginx/pull/5059) Remove minikube and only use kind +- [X] [#5060](https://github.com/kubernetes/ingress-nginx/pull/5060) Cleanup e2e tests +- [X] [#5061](https://github.com/kubernetes/ingress-nginx/pull/5061) Fix scripts to run in osx +- [X] [#5062](https://github.com/kubernetes/ingress-nginx/pull/5062) Ensure scripts and dev-env works in osx +- [X] [#5067](https://github.com/kubernetes/ingress-nginx/pull/5067) Make sure set-cookie is retained from external auth endpoint +- [X] [#5069](https://github.com/kubernetes/ingress-nginx/pull/5069) Enable grpc e2e tests +- [X] [#5070](https://github.com/kubernetes/ingress-nginx/pull/5070) Update go to 1.13.8 +- [X] [#5071](https://github.com/kubernetes/ingress-nginx/pull/5071) Add gzip-min-length as a Configuration Option + +_Documentation:_ + +- [X] [#4974](https://github.com/kubernetes/ingress-nginx/pull/4974) Add travis script for docs +- [X] [#4991](https://github.com/kubernetes/ingress-nginx/pull/4991) doc: added hint why regular expressions might not be accepted +- [X] [#5018](https://github.com/kubernetes/ingress-nginx/pull/5018) Update developer document on dependency updates +- [X] [#5020](https://github.com/kubernetes/ingress-nginx/pull/5020) docs(deploy): fix helm install command for helm v3 +- [X] [#5037](https://github.com/kubernetes/ingress-nginx/pull/5037) Cleanup README.md +- [X] [#5040](https://github.com/kubernetes/ingress-nginx/pull/5040) Update documentation and remove hack fixed by upstream cookie library +- [X] [#5041](https://github.com/kubernetes/ingress-nginx/pull/5041) 36.94% size reduction of image assets using lossless compression from ImgBot +- [X] [#5043](https://github.com/kubernetes/ingress-nginx/pull/5043) Cleanup docs +- [X] [#5068](https://github.com/kubernetes/ingress-nginx/pull/5068) docs: reference buildx as a requirement for docker builds +- [X] [#5073](https://github.com/kubernetes/ingress-nginx/pull/5073) oauth-external-auth: README.md: Link to oauth2-proxy, dashboard-ingress.yaml + ### 0.28.0 **Image:** `quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0` diff --git a/Makefile b/Makefile index 1519b7fdfb94..a555cee6b842 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,10 @@ ifndef VERBOSE endif # set default shell -SHELL=/bin/bash -o pipefail +SHELL=/bin/bash -o pipefail -o errexit # Use the 0.0 tag for testing, it shouldn't clobber any release builds -TAG ?= 0.28.0 +TAG ?= 0.29.0 # Use docker to run makefile tasks USE_DOCKER ?= true @@ -154,7 +154,7 @@ endif .PHONY: clean clean: ## Remove .gocache directory. - rm -rf bin/ .gocache/ + rm -rf bin/ .gocache/ .cache/ .PHONY: static-check static-check: ## Run verification script for boilerplate, codegen, gofmt, golint and lualint. @@ -195,7 +195,7 @@ e2e-test: check-go-version ## Run e2e tests (expects access to a working Kuberne @build/run-e2e-suite.sh .PHONY: e2e-test-image -e2e-test-image: e2e-test-binary ## Build image for e2e tests. +e2e-test-image: ## Build image for e2e tests. @make -C test/e2e-image .PHONY: e2e-test-binary @@ -207,6 +207,11 @@ else @ginkgo build ./test/e2e endif +.PHONY: print-e2e-suite +print-e2e-suite: e2e-test-binary ## Prints information about the suite of e2e tests. + @build/run-in-docker.sh \ + hack/print-e2e-suite.sh + .PHONY: cover cover: check-go-version ## Run go coverage unit tests. @build/cover.sh diff --git a/build/dev-env.sh b/build/dev-env.sh index c4ee3fbe29e7..61c2bf35c81b 100755 --- a/build/dev-env.sh +++ b/build/dev-env.sh @@ -24,7 +24,7 @@ set -o pipefail DIR=$(cd $(dirname "${BASH_SOURCE}") && pwd -P) -export TAG=dev +export TAG=0.0.0-dev export ARCH=amd64 export REGISTRY=${REGISTRY:-ingress-controller} diff --git a/build/images/ingress-controller/build-ingress-controller.sh b/build/images/ingress-controller/build-ingress-controller.sh index 31928c299251..8efb6f1cd705 100644 --- a/build/images/ingress-controller/build-ingress-controller.sh +++ b/build/images/ingress-controller/build-ingress-controller.sh @@ -80,19 +80,18 @@ git clone https://github.com/kubernetes/ingress-nginx cd ingress-nginx -# disable docker in docker tasks -export DIND_TASKS=0 - export DOCKER_CLI_EXPERIMENTAL=enabled make init-docker-buildx docker buildx use ingress-nginx --default --global -echo "Building NGINX image..." -make all-container +# disable docker in docker tasks +export DIND_TASKS=0 -echo "Publishing NGINX images..." -make all-push +echo "Building NGINX image..." +ARCH=amd64 make build container push +ARCH=arm make build container push +ARCH=arm64 make build container push # Requires https://github.com/kubernetes/ingress-nginx/pull/4271 #echo "Creating multi-arch images..." diff --git a/deploy/aws/l4/kustomization.yaml b/deploy/aws/l4/kustomization.yaml deleted file mode 100644 index a17bd9156ecb..000000000000 --- a/deploy/aws/l4/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../cloud-generic -patchesStrategicMerge: -- service-l4.yaml -configMapGenerator: -- name: nginx-configuration - behavior: merge - literals: - - use-proxy-protocol=true diff --git a/deploy/aws/l7/kustomization.yaml b/deploy/aws/l7/kustomization.yaml deleted file mode 100644 index 35dbc67e47b4..000000000000 --- a/deploy/aws/l7/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../cloud-generic -patchesStrategicMerge: -- service-l7.yaml -configMapGenerator: -- name: nginx-configuration - behavior: merge - literals: - - use-proxy-protocol=false - - use-forwarded-headers=true - - proxy-real-ip-cidr=0.0.0.0/0 # restrict this to the IP addresses of ELB diff --git a/deploy/aws/nlb/kustomization.yaml b/deploy/aws/nlb/kustomization.yaml deleted file mode 100644 index cfffbefc4204..000000000000 --- a/deploy/aws/nlb/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../cloud-generic -patchesStrategicMerge: -- service-nlb.yaml diff --git a/deploy/baremetal/kustomization.yaml b/deploy/baremetal/kustomization.yaml deleted file mode 100644 index 3512703b8361..000000000000 --- a/deploy/baremetal/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../cloud-generic -patchesStrategicMerge: -- service-nodeport.yaml diff --git a/deploy/cloud-generic/deployment.yaml b/deploy/cloud-generic/deployment.yaml deleted file mode 100644 index 3eeeb675f0f4..000000000000 --- a/deploy/cloud-generic/deployment.yaml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - replicas: 1 - template: - metadata: - annotations: - prometheus.io/port: "10254" - prometheus.io/scrape: "true" - spec: - # wait up to five minutes for the drain of connections - terminationGracePeriodSeconds: 300 - serviceAccountName: nginx-ingress-serviceaccount - containers: - - name: nginx-ingress-controller - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0 - args: - - /nginx-ingress-controller - - --configmap=$(POD_NAMESPACE)/$(NGINX_CONFIGMAP_NAME) - - --tcp-services-configmap=$(POD_NAMESPACE)/$(TCP_CONFIGMAP_NAME) - - --udp-services-configmap=$(POD_NAMESPACE)/$(UDP_CONFIGMAP_NAME) - - --publish-service=$(POD_NAMESPACE)/$(SERVICE_NAME) - - --annotations-prefix=nginx.ingress.kubernetes.io - securityContext: - allowPrivilegeEscalation: true - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - # www-data -> 101 - runAsUser: 101 - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - ports: - - name: http - containerPort: 80 - protocol: TCP - - name: https - containerPort: 443 - protocol: TCP - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 - readinessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 - lifecycle: - preStop: - exec: - command: - - /wait-shutdown - ---- - -apiVersion: v1 -kind: LimitRange -metadata: - name: ingress-nginx - namespace: ingress-nginx - labels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx -spec: - limits: - - min: - memory: 90Mi - cpu: 100m - type: Container diff --git a/deploy/cloud-generic/kustomization.yaml b/deploy/cloud-generic/kustomization.yaml deleted file mode 100644 index 6f43d24a2b33..000000000000 --- a/deploy/cloud-generic/kustomization.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: ingress-nginx -commonLabels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx -resources: -- deployment.yaml -- role-binding.yaml -- role.yaml -- service-account.yaml -- service.yaml -images: -- name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller - newTag: 0.28.0 -vars: -- fieldref: - fieldPath: metadata.name - name: NGINX_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: nginx-configuration -- fieldref: - fieldPath: metadata.name - name: TCP_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: tcp-services -- fieldref: - fieldPath: metadata.name - name: UDP_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: udp-services -- fieldref: - fieldPath: metadata.name - name: SERVICE_NAME - objref: - apiVersion: v1 - kind: Service - name: ingress-nginx -configMapGenerator: -- name: nginx-configuration -- name: tcp-services -- name: udp-services -generatorOptions: - disableNameSuffixHash: true diff --git a/deploy/cloud-generic/role-binding.yaml b/deploy/cloud-generic/role-binding.yaml deleted file mode 100644 index 228588e6dca2..000000000000 --- a/deploy/cloud-generic/role-binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: nginx-ingress-role-nisa-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: nginx-ingress-role -subjects: - - kind: ServiceAccount - name: nginx-ingress-serviceaccount diff --git a/deploy/cloud-generic/role.yaml b/deploy/cloud-generic/role.yaml deleted file mode 100644 index 936b63d729a3..000000000000 --- a/deploy/cloud-generic/role.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: nginx-ingress-role -rules: - - apiGroups: - - "" - resources: - - configmaps - - pods - - secrets - - namespaces - verbs: - - get - - apiGroups: - - "" - resources: - - configmaps - resourceNames: - # Defaults to "-" - # Here: "-" - # This has to be adapted if you change either parameter - # when launching the nginx-ingress-controller. - - "ingress-controller-leader-nginx" - verbs: - - get - - update - - apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get diff --git a/deploy/cloud-generic/service-account.yaml b/deploy/cloud-generic/service-account.yaml deleted file mode 100644 index a52fb8ac8571..000000000000 --- a/deploy/cloud-generic/service-account.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: nginx-ingress-serviceaccount diff --git a/deploy/cloud-generic/service.yaml b/deploy/cloud-generic/service.yaml deleted file mode 100644 index f4dc4f1a20fd..000000000000 --- a/deploy/cloud-generic/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ingress-nginx -spec: - externalTrafficPolicy: Local - type: LoadBalancer - ports: - - name: http - port: 80 - protocol: TCP - targetPort: http - - name: https - port: 443 - protocol: TCP - targetPort: https diff --git a/deploy/cluster-wide/cluster-role-binding.yaml b/deploy/cluster-wide/cluster-role-binding.yaml deleted file mode 100644 index 7293fb37d77a..000000000000 --- a/deploy/cluster-wide/cluster-role-binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: nginx-ingress-clusterrole-nisa-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: nginx-ingress-clusterrole -subjects: - - kind: ServiceAccount - name: nginx-ingress-serviceaccount diff --git a/deploy/cluster-wide/cluster-role.yaml b/deploy/cluster-wide/cluster-role.yaml deleted file mode 100644 index a6dc6d44e731..000000000000 --- a/deploy/cluster-wide/cluster-role.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: nginx-ingress-clusterrole -rules: - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - nodes - - pods - - secrets - verbs: - - list - - watch - - apiGroups: - - "" - resources: - - nodes - verbs: - - get - - apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - "extensions" - - "networking.k8s.io" - resources: - - ingresses - verbs: - - get - - list - - watch - - apiGroups: - - "extensions" - - "networking.k8s.io" - resources: - - ingresses/status - verbs: - - update - diff --git a/deploy/cluster-wide/kustomization.yaml b/deploy/cluster-wide/kustomization.yaml deleted file mode 100644 index aeef6ed6b336..000000000000 --- a/deploy/cluster-wide/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -commonLabels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx -resources: -- cluster-role.yaml -- cluster-role-binding.yaml diff --git a/deploy/kind/deployment.yaml b/deploy/kind/deployment.yaml deleted file mode 100644 index 687e834d8e67..000000000000 --- a/deploy/kind/deployment.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - template: - spec: - containers: - - name: nginx-ingress-controller - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 10 - readinessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 5 \ No newline at end of file diff --git a/deploy/kind/kustomization.yaml b/deploy/kind/kustomization.yaml deleted file mode 100644 index a622d7940b51..000000000000 --- a/deploy/kind/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: ingress-nginx -bases: -- ../baremetal -- ../cluster-wide -images: -- name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller - newTag: dev -patchesStrategicMerge: -- service-hostport.yaml -- deployment.yaml diff --git a/deploy/kind/service-hostport.yaml b/deploy/kind/service-hostport.yaml deleted file mode 100644 index ff0601cc19c9..000000000000 --- a/deploy/kind/service-hostport.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - replicas: 1 - template: - metadata: - annotations: - prometheus.io/port: "10254" - prometheus.io/scrape: "true" - spec: - containers: - - name: nginx-ingress-controller - ports: - - containerPort: 80 - hostPort: 80 - - containerPort: 443 - hostPort: 443 - nodeSelector: - ingress-ready: "true" - tolerations: - - key: node-role.kubernetes.io/master - operator: Equal - effect: NoSchedule diff --git a/deploy/static/mandatory.yaml b/deploy/static/mandatory.yaml index 16788dc48707..f69e502bfe2b 100644 --- a/deploy/static/mandatory.yaml +++ b/deploy/static/mandatory.yaml @@ -217,7 +217,7 @@ spec: kubernetes.io/os: linux containers: - name: nginx-ingress-controller - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0 + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0 args: - /nginx-ingress-controller - --configmap=$(POD_NAMESPACE)/nginx-configuration diff --git a/deploy/static/with-rbac.yaml b/deploy/static/with-rbac.yaml index d4fdf2e5652b..64652bc107c0 100644 --- a/deploy/static/with-rbac.yaml +++ b/deploy/static/with-rbac.yaml @@ -28,7 +28,7 @@ spec: kubernetes.io/os: linux containers: - name: nginx-ingress-controller - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0 + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0 args: - /nginx-ingress-controller - --configmap=$(POD_NAMESPACE)/nginx-configuration diff --git a/docs/deploy/index.md b/docs/deploy/index.md index 78f7506cf129..e89b8cb2a2c9 100644 --- a/docs/deploy/index.md +++ b/docs/deploy/index.md @@ -34,7 +34,7 @@ The following **Mandatory Command** is required for all deployments. ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/mandatory.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/mandatory.yaml ``` !!! tip @@ -53,7 +53,7 @@ Kubernetes is available in Docker for Mac (from [version 18.06.0-ce](https://doc Create a service ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/cloud-generic.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/cloud-generic.yaml ``` #### minikube @@ -101,8 +101,8 @@ Check that no change is necessary with regards to the ELB idle timeout. In some Then execute: ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/aws/service-l4.yaml -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/aws/patch-configmap-l4.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/aws/service-l4.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/aws/patch-configmap-l4.yaml ``` For L7: @@ -114,8 +114,8 @@ Check that no change is necessary with regards to the ELB idle timeout. In some Then execute: ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/aws/service-l7.yaml -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/aws/patch-configmap-l7.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/aws/service-l7.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/aws/patch-configmap-l7.yaml ``` This example creates an ELB with just two listeners, one in port 80 and another in port 443 @@ -136,13 +136,13 @@ More information with regards to idle timeouts for your Load Balancer can be fou This type of load balancer is supported since v1.10.0 as an ALPHA feature. ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/aws/service-nlb.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/aws/service-nlb.yaml ``` #### GCE-GKE ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/cloud-generic.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/cloud-generic.yaml ``` **Important Note:** proxy protocol is not supported in GCE/GKE @@ -150,7 +150,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/ngin #### Azure ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/cloud-generic.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/cloud-generic.yaml ``` #### Bare-metal @@ -158,7 +158,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/ngin Using [NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport): ```console -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/provider/baremetal/service-nodeport.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/provider/baremetal/service-nodeport.yaml ``` !!! tip diff --git a/docs/deploy/upgrade.md b/docs/deploy/upgrade.md index fd7a080236b2..656fefcb2613 100644 --- a/docs/deploy/upgrade.md +++ b/docs/deploy/upgrade.md @@ -33,7 +33,7 @@ The easiest way to do this is e.g. (do note you may need to change the name para ``` kubectl set image deployment/nginx-ingress-controller \ - nginx-ingress-controller=quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0 + nginx-ingress-controller=quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0 ``` For interactive editing, use `kubectl edit deployment nginx-ingress-controller`. diff --git a/docs/e2e-tests.md b/docs/e2e-tests.md new file mode 100644 index 000000000000..8752f3c55f98 --- /dev/null +++ b/docs/e2e-tests.md @@ -0,0 +1,405 @@ + + +# e2e test suite for [NGINX Ingress Controller](https://github.com/kubernetes/ingress-nginx/tree/master/) + + + +### [[Default Backend] change default settings](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/with_hosts.go#L33) + +- [should apply the annotation to the default backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/with_hosts.go#L41) + +### [[Default Backend]](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/default_backend.go#L30) + +- [should return 404 sending requests when only a default backend is running](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/default_backend.go#L33) +- [enables access logging for default backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/default_backend.go#L94) +- [disables access logging for default backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/default_backend.go#L110) + +### [[Default Backend] custom service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/custom_default_backend.go#L35) + +- [uses custom default backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/custom_default_backend.go#L59) + +### [[Default Backend] SSL](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/ssl.go#L29) + +- [should return a self generated SSL certificate](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/defaultbackend/ssl.go#L32) + +### [[TCP] tcp-services](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/tcpudp/tcp.go#L37) + +- [should expose a TCP service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/tcpudp/tcp.go#L40) +- [should expose an ExternalName TCP service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/tcpudp/tcp.go#L93) + +### [auth-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L36) + +- [should return status code 200 when no authentication is configured](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L46) +- [should return status code 503 when authentication is configured with an invalid secret](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L68) +- [should return status code 401 when authentication is configured but Authorization header is not configured](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L95) +- [should return status code 401 when authentication is configured and Authorization header is sent with invalid credentials](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L125) +- [should return status code 200 when authentication is configured and Authorization header is sent](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L156) +- [should return status code 200 when authentication is configured with a map and Authorization header is sent](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L186) +- [should return status code 401 when authentication is configured with invalid content and Authorization header is sent](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L217) +- [proxy_set_header My-Custom-Header 42;](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L259) +- [proxy_set_header My-Custom-Header 42;](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L277) +- [proxy_set_header 'My-Custom-Header' '42';](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L294) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L315) +- [retains cookie set by external authentication server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L335) +- [should return status code 200 when signed in](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L410) +- [should redirect to signin url when not signed in](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L424) +- [should return status code 200 when signed in after auth backend is deleted ](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L488) +- [should deny login for different location on same server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L517) +- [should deny login for different servers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L559) +- [should redirect to signin url when not signed in](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/auth.go#L603) + +### [proxy-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L28) + +- [should set proxy_redirect to off](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L36) +- [should set proxy_redirect to default](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L51) +- [should set proxy_redirect to hello.com goodbye.com](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L66) +- [should set proxy client-max-body-size to 8m](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L81) +- [should not set proxy client-max-body-size to incorrect value](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L95) +- [should set valid proxy timeouts](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L109) +- [should not set invalid proxy timeouts](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L127) +- [should turn on proxy-buffering](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L145) +- [should turn off proxy-request-buffering](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L164) +- [should build proxy next upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L178) +- [should build proxy next upstream using configmap values](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L196) +- [should setup proxy cookies](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L215) +- [should change the default proxy HTTP version](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxy.go#L231) + +### [affinity session-cookie-name](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L36) + +- [should set sticky cookie SERVERID](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L43) +- [should change cookie name on ingress definition change](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L68) +- [should set the path to /something on the generated cookie](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L105) +- [does not set the path to / on the generated cookie if there's more than one rule referring to the same backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L130) +- [should set cookie with expires](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L196) +- [should work with use-regex annotation and session-cookie-path](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L231) +- [should warn user when use-regex is true and session-cookie-path is not set](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L259) +- [should not set affinity across all server locations when using separate ingresses](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L288) +- [should set sticky cookie without host](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/affinity.go#L324) + +### [mirror-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/mirror.go#L28) + +- [should set mirror-target to http://localhost/mirror](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/mirror.go#L36) +- [should set mirror-target to https://test.env.com/$request_uri](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/mirror.go#L51) +- [should disable mirror-request-body](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/mirror.go#L67) + +### [canary-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L34) + +- [should response with a 200 status from the mainline upstream when requests are made to the mainline ingress](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L46) +- [should return 404 status for requests to the canary if no matching ingress is found](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L79) +- [should return the correct status codes when endpoints are unavailable](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L108) +- [should route requests to the correct upstream if mainline ingress is created before the canary ingress](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L162) +- [should route requests to the correct upstream if mainline ingress is created after the canary ingress](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L210) +- [should route requests to the correct upstream if the mainline ingress is modified](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L259) +- [should route requests to the correct upstream if the canary ingress is modified](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L321) +- [should route requests to the correct upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L380) +- [should route requests to the correct upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L444) +- [should route requests to the correct upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L522) +- [should route requests to the correct upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L562) +- [should route requests to the correct upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L626) +- [should not use canary as a catch-all server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L685) +- [should not use canary with domain as a server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L710) +- [does not crash when canary ingress has multiple paths to the same non-matching backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/canary.go#L732) + +### [force-ssl-redirect](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/forcesslredirect.go#L29) + +- [should redirect to https](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/forcesslredirect.go#L36) + +### [http2-push-preload](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/http2pushpreload.go#L25) + +- [enable the http2-push-preload directive](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/http2pushpreload.go#L32) + +### [proxy-ssl-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxyssl.go#L28) + +- [should set valid proxy-ssl-secret](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxyssl.go#L35) +- [should set valid proxy-ssl-secret, proxy-ssl-verify to on, and proxy-ssl-verify-depth to 2](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxyssl.go#L50) +- [should set valid proxy-ssl-secret, proxy-ssl-ciphers to HIGH:!AES](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxyssl.go#L67) +- [should set valid proxy-ssl-secret, proxy-ssl-protocols](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/proxyssl.go#L83) + +### [modsecurity owasp](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/modsecurity.go#L26) + +- [should enable modsecurity](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/modsecurity.go#L33) +- [should enable modsecurity with transaction ID and OWASP rules](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/modsecurity.go#L51) +- [should disable modsecurity](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/modsecurity.go#L72) +- [should enable modsecurity with snippet](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/modsecurity.go#L89) + +### [backend-protocol - GRPC](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/grpc.go#L39) + +- [should use grpc_pass in the configuration file](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/grpc.go#L42) +- [should return OK for service with backend protocol GRPC](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/grpc.go#L67) +- [should return OK for service with backend protocol GRPCS](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/grpc.go#L125) + +### [cors-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L29) + +- [should enable cors](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L36) +- [should set cors methods to only allow POST, GET](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L79) +- [should set cors max-age](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L95) +- [should disable cors allow credentials](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L111) +- [should allow origin for cors](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L127) +- [should allow headers for cors](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/cors.go#L143) + +### [influxdb-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/influxdb.go#L39) + +- [should send the request metric to the influxdb server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/influxdb.go#L48) + +### [client-body-buffer-size](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L25) + +- [should set client_body_buffer_size to 1000](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L32) +- [should set client_body_buffer_size to 1K](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L47) +- [should set client_body_buffer_size to 1k](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L62) +- [should set client_body_buffer_size to 1m](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L77) +- [should set client_body_buffer_size to 1M](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L92) +- [should not set client_body_buffer_size to invalid 1b](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/clientbodybuffersize.go#L107) + +### [default-backend](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/default_backend.go#L30) + +- [should use a custom default backend as upstream](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/default_backend.go#L38) + +### [connection-proxy-header](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/connection.go#L30) + +- [set connection header to keep-alive](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/connection.go#L37) + +### [upstream-vhost](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/upstreamvhost.go#L25) + +- [set host to upstreamvhost.bar.com](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/upstreamvhost.go#L32) + +### [custom-http-errors](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/customhttperrors.go#L34) + +- [configures Nginx correctly](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/customhttperrors.go#L41) + +### [server-snippet](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/serversnippet.go#L27) + +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/serversnippet.go#L34) + +### [rewrite-target use-regex enable-rewrite-log](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L32) + +- [should write rewrite logs](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L39) +- [should use correct longest path match](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L70) +- [should use ~* location modifier if regex annotation is present](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L115) +- [should fail to use longest match for documented warning](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L161) +- [should allow for custom rewrite parameters](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/rewrite.go#L192) + +### [app-root](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/approot.go#L29) + +- [should redirect to /foo](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/approot.go#L36) + +### [whitelist-source-range](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/ipwhitelist.go#L27) + +- [should set valid ip whitelist range](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/ipwhitelist.go#L34) + +### [enable-access-log enable-rewrite-log](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/log.go#L26) + +- [set access_log off](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/log.go#L33) +- [set rewrite_log on](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/log.go#L48) + +### [x-forwarded-prefix](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/xforwardedprefix.go#L28) + +- [should set the X-Forwarded-Prefix to the annotation value](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/xforwardedprefix.go#L35) +- [should not add X-Forwarded-Prefix if the annotation value is empty](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/xforwardedprefix.go#L59) + +### [configuration-snippet](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/snippet.go#L25) + +- [ in all locations](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/snippet.go#L32) + +### [backend-protocol - FastCGI](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fastcgi.go#L31) + +- [should use fastcgi_pass in the configuration file](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fastcgi.go#L38) +- [should add fastcgi_index in the configuration file](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fastcgi.go#L55) +- [should add fastcgi_param in the configuration file](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fastcgi.go#L72) +- [should return OK for service with backend protocol FastCGI](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fastcgi.go#L105) + +### [from-to-www-redirect](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fromtowwwredirect.go#L32) + +- [should redirect from www HTTP to HTTP](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fromtowwwredirect.go#L39) +- [should redirect from www HTTPS to HTTPS](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/fromtowwwredirect.go#L70) + +### [permanen-redirect permanen-redirect-code](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/redirect.go#L37) + +- [should respond with a standard redirect code](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/redirect.go#L40) +- [should respond with a custom redirect code](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/redirect.go#L72) + +### [upstream-hash-by-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/upstreamhashby.go#L75) + +- [should connect to the same pod](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/upstreamhashby.go#L82) +- [should connect to the same subset of pods](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/upstreamhashby.go#L92) + +### [backend-protocol](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L25) + +- [should set backend protocol to https:// and use proxy_pass](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L32) +- [should set backend protocol to grpc:// and use grpc_pass](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L47) +- [should set backend protocol to grpcs:// and use grpc_pass](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L62) +- [should set backend protocol to '' and use fastcgi_pass](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L77) +- [should set backend protocol to '' and use ajp_pass](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/backendprotocol.go#L92) + +### [satisfy](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/satisfy.go#L33) + +- [should configure satisfy directive correctly](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/satisfy.go#L40) +- [should allow multiple auth with satisfy any](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/satisfy.go#L85) + +### [server-alias](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/alias.go#L30) + +- [should return status code 200 for host 'foo' and 404 for 'bar'](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/alias.go#L37) +- [should return status code 200 for host 'foo' and 'bar'](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/alias.go#L68) + +### [ssl-ciphers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/sslciphers.go#L26) + +- [should change ssl ciphers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/sslciphers.go#L33) + +### [auth-tls-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/authtls.go#L31) + +- [should set valid auth-tls-secret](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/authtls.go#L38) +- [should set valid auth-tls-secret, sslVerify to off, and sslVerifyDepth to 2](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/authtls.go#L78) +- [should set valid auth-tls-secret, pass certificate to upstream, and error page](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/annotations/authtls.go#L111) + +### [[Status] status update](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/status/update.go#L37) + +- [should update status field after client-go reconnection](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/status/update.go#L42) + +### [Debug CLI](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/dbg/main.go#L29) + +- [should list the backend servers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/dbg/main.go#L37) +- [should get information for a specific backend server](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/dbg/main.go#L57) +- [should produce valid JSON for /dbg general](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/dbg/main.go#L86) + +### [[Memory Leak] Dynamic Certificates](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/leaks/lua_ssl.go#L36) + +- [should not leak memory from ingress SSL certificates or configuration updates](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/leaks/lua_ssl.go#L43) + +### [[Security] request smuggling](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/security/request_smuggling.go#L32) + +- [should not return body content from error_page](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/security/request_smuggling.go#L39) + +### [[SSL] [Flag] default-ssl-certificate](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/default_ssl_certificate.go#L32) + +- [uses default ssl certificate for catch-all ingress](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/default_ssl_certificate.go#L64) +- [uses default ssl certificate for host based ingress when configured certificate does not match host](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/default_ssl_certificate.go#L80) + +### [[Lua] lua-shared-dicts](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/lua_shared_dicts.go#L26) + +- [configures lua shared dicts](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/lua_shared_dicts.go#L34) + +### [server-tokens](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/server_tokens.go#L30) + +- [should not exists Server header in the response](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/server_tokens.go#L38) +- [should exists Server header in the response when is enabled](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/server_tokens.go#L50) + +### [use-proxy-protocol](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_protocol.go#L31) + +- [should respect port passed by the PROXY Protocol](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_protocol.go#L41) +- [should respect proto passed by the PROXY Protocol server port](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_protocol.go#L73) + +### [[Flag] custom HTTP and HTTPS ports](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/listen_nondefault_ports.go#L33) + +- [should set X-Forwarded-Port headers accordingly when listening on a non-default HTTP port](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/listen_nondefault_ports.go#L49) +- [should set X-Forwarded-Port header to 443](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/listen_nondefault_ports.go#L72) +- [should set the X-Forwarded-Port header to 443](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/listen_nondefault_ports.go#L102) + +### [[Security] no-auth-locations](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/no_auth_locations.go#L35) + +- [should return status code 401 when accessing '/' unauthentication](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/no_auth_locations.go#L56) +- [should return status code 200 when accessing '/' authentication](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/no_auth_locations.go#L72) +- [should return status code 200 when accessing '/noauth' unauthenticated](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/no_auth_locations.go#L88) + +### [Dynamic $proxy_host](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_host.go#L32) + +- [should exist a proxy_host](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_host.go#L40) +- [should exist a proxy_host using the upstream-vhost annotation value](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/proxy_host.go#L64) + +### [[Security] Pod Security Policies](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/pod_security_policy.go#L41) + +- [should be running with a Pod Security Policy](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/pod_security_policy.go#L80) + +### [Geoip2](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/geoip2.go#L30) + +- [should only allow requests from specific countries](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/geoip2.go#L39) + +### [[Security] Pod Security Policies with volumes](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/pod_security_policy_volumes.go#L37) + +- [should be running with a Pod Security Policy](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/pod_security_policy_volumes.go#L40) + +### [enable-multi-accept](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/multi_accept.go#L27) + +- [should be enabled by default](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/multi_accept.go#L31) +- [should be enabled when set to true](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/multi_accept.go#L39) +- [should be disabled when set to false](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/multi_accept.go#L49) + +### [[Flag] ingress-class](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/ingress_class.go#L33) + +- [should ignore Ingress with class](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/ingress_class.go#L42) +- [should ignore Ingress with no class](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/ingress_class.go#L89) +- [should delete Ingress when class is removed](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/ingress_class.go#L125) + +### [[Security] global-auth-url](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L31) + +- [should return status code 401 when request any protected service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L82) +- [should return status code 200 when request whitelisted (via no-auth-locations) service and 401 when request protected service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L99) +- [should return status code 200 when request whitelisted (via ingress annotation) service and 401 when request protected service](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L119) +- [should still return status code 200 after auth backend is deleted using cache ](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L147) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L193) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L206) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L219) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L233) +- [](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_external_auth.go#L246) + +### [[Security] block-*](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_access_block.go#L30) + +- [should block CIDRs defined in the ConfigMap](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_access_block.go#L40) +- [should block User-Agents defined in the ConfigMap](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_access_block.go#L58) +- [should block Referers defined in the ConfigMap](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/global_access_block.go#L94) + +### [use-forwarded-headers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/forwarded_headers.go#L31) + +- [should trust X-Forwarded headers when setting is true](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/forwarded_headers.go#L41) +- [should not trust X-Forwarded headers when setting is false](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/forwarded_headers.go#L88) + +### [Add custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/custom_header.go#L31) + +- [Add a custom header](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/custom_header.go#L44) +- [Add multiple custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/custom_header.go#L72) + +### [[Flag] disable-catch-all](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/disable_catch_all.go#L34) + +- [should ignore catch all Ingress](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/disable_catch_all.go#L52) +- [should delete Ingress updated to catch-all](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/disable_catch_all.go#L71) +- [should allow Ingress with both a default backend and rules](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/disable_catch_all.go#L111) + +### [main-snippet](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/main_snippet.go#L27) + +- [should add value of main-snippet setting to nginx config](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/main_snippet.go#L31) + +### [[SSL] TLS protocols, ciphers and headers)](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/tls.go#L37) + +- [should configure TLS protocol](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/tls.go#L46) +- [should configure HSTS policy header](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/tls.go#L102) +- [should not use ports during the HTTP to HTTPS redirection](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/tls.go#L168) +- [should not use ports or X-Forwarded-Host during the HTTP to HTTPS redirection](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/tls.go#L190) + +### [Configmap change](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/configmap_change.go#L29) + +- [should reload after an update in the configuration](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/configmap_change.go#L36) + +### [[Security] modsecurity-snippet](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/modsecurity_snippet.go#L27) + +- [should add value of modsecurity-snippet setting to nginx config](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/settings/modsecurity_snippet.go#L30) + +### [[Shutdown] Graceful shutdown with pending request](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/slow_requests.go#L30) + +- [should let slow requests finish before shutting down](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/slow_requests.go#L38) + +### [[Shutdown] ingress controller](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/shutdown.go#L31) + +- [should shutdown in less than 60 secons without pending connections](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/shutdown.go#L42) +- [should shutdown after waiting 60 seconds for pending connections to be closed](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/shutdown.go#L68) +- [should shutdown after waiting 150 seconds for pending connections to be closed](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/gracefulshutdown/shutdown.go#L127) + +### [[Service] backend status code 503](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_backend.go#L35) + +- [should return 503 when backend service does not exist](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_backend.go#L38) +- [should return 503 when all backend service endpoints are unavailable](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_backend.go#L57) + +### [[Service] Type ExternalName](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L35) + +- [works with external name set to incomplete fdqn](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L38) +- [should return 200 for service type=ExternalName without a port defined](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L72) +- [should return 200 for service type=ExternalName with a port defined](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L104) +- [should return status 502 for service type=ExternalName with an invalid host](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L143) +- [should return 200 for service type=ExternalName using a port name](https://github.com/kubernetes/ingress-nginx/tree/master/test/e2e/servicebackend/service_externalname.go#L175) diff --git a/docs/examples/auth/oauth-external-auth/README.md b/docs/examples/auth/oauth-external-auth/README.md index 9a24ca3977c6..35777647c349 100644 --- a/docs/examples/auth/oauth-external-auth/README.md +++ b/docs/examples/auth/oauth-external-auth/README.md @@ -51,13 +51,13 @@ kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addon ![Register OAuth2 Application](images/register-oauth-app-2.png) -3. Configure oauth2_proxy values in the file oauth2-proxy.yaml with the values: +3. Configure oauth2_proxy values in the file [`oauth2-proxy.yaml`](https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/auth/oauth-external-auth/oauth2-proxy.yaml) with the values: - OAUTH2_PROXY_CLIENT_ID with the github `` - OAUTH2_PROXY_CLIENT_SECRET with the github `` - OAUTH2_PROXY_COOKIE_SECRET with value of `python -c 'import os,base64; print(base64.b64encode(os.urandom(16)).decode("ascii"))'` -4. Customize the contents of the file dashboard-ingress.yaml: +4. Customize the contents of the file [`dashboard-ingress.yaml`](https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/auth/oauth-external-auth/dashboard-ingress.yaml): Replace `__INGRESS_HOST__` with a valid FQDN and `__INGRESS_SECRET__` with a Secret with a valid SSL certificate. diff --git a/docs/examples/customization/custom-errors/README.md b/docs/examples/customization/custom-errors/README.md index a6a1d5aca8ca..6ced0d7cd56b 100644 --- a/docs/examples/customization/custom-errors/README.md +++ b/docs/examples/customization/custom-errors/README.md @@ -28,7 +28,7 @@ service/nginx-errors ClusterIP 10.0.0.12 80/TCP 10s If you do not already have an instance of the NGINX Ingress controller running, deploy it according to the [deployment guide][deploy], then follow these steps: -1. Edit the `nginx-ingress-controller` Deployment and set the value of the `--default-backend` flag to the name of the +1. Edit the `nginx-ingress-controller` Deployment and set the value of the `--default-backend-service` flag to the name of the newly created error backend. 2. Edit the `nginx-configuration` ConfigMap and create the key `custom-http-errors` with a value of `404,503`. diff --git a/docs/examples/grpc/README.md b/docs/examples/grpc/README.md index ee6f42e704d4..43f0fec9e5e0 100644 --- a/docs/examples/grpc/README.md +++ b/docs/examples/grpc/README.md @@ -13,7 +13,7 @@ nginx controller. for the ingress). 3. You have the nginx-ingress controller installed in typical fashion (must be at least - [quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0](https://quay.io/kubernetes-ingress-controller/nginx-ingress-controller) + [quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0](https://quay.io/kubernetes-ingress-controller/nginx-ingress-controller) for grpc support. 4. You have a backend application running a gRPC server and listening for TCP traffic. If you prefer, you can use the diff --git a/docs/examples/psp/README.md b/docs/examples/psp/README.md index 8fe0d4350c62..e93c01b64610 100644 --- a/docs/examples/psp/README.md +++ b/docs/examples/psp/README.md @@ -15,7 +15,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast ``` Now that the pod security policy is applied, we can continue as usual by applying the -[mandatory.yaml](https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.28.0/deploy/static/mandatory.yaml) +[mandatory.yaml](https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.29.0/deploy/static/mandatory.yaml) according to the [Installation Guide](../../deploy/index.md). Note: PSP permissions must be granted before to the creation of the Deployment and the ReplicaSet. diff --git a/docs/examples/static-ip/nginx-ingress-controller.yaml b/docs/examples/static-ip/nginx-ingress-controller.yaml index fca0e2ab235a..871dd73ff0fb 100644 --- a/docs/examples/static-ip/nginx-ingress-controller.yaml +++ b/docs/examples/static-ip/nginx-ingress-controller.yaml @@ -24,7 +24,7 @@ spec: # hostNetwork: true terminationGracePeriodSeconds: 60 containers: - - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0 + - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.29.0 name: nginx-ingress-controller readinessProbe: httpGet: diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index e4d30529ab00..db0e932aaef7 100755 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -596,6 +596,10 @@ Enables or disables [HTTP/2](http://nginx.org/en/docs/http/ngx_http_v2_module.ht Sets the gzip Compression Level that will be used. _**default:**_ 5 +## gzip-min-length + +Minimum length of responses to be returned to the client before it is eligible for gzip compression, in bytes. _**default:**_ 256 + ## gzip-types Sets the MIME types in addition to "text/html" to compress. The special value "\*" matches any MIME type. Responses with the "text/html" type are always compressed if `[use-gzip](#use-gzip)` is enabled. diff --git a/hack/generate-e2e-suite-doc.sh b/hack/generate-e2e-suite-doc.sh new file mode 100755 index 000000000000..cfcc5504045d --- /dev/null +++ b/hack/generate-e2e-suite-doc.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Copyright 2020 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ -n "$DEBUG" ]; then + set -x +fi + +set -o errexit +set -o nounset +set -o pipefail + +URL="https://github.com/kubernetes/ingress-nginx/tree/master/" +DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P) + +echo " + +# e2e test suite for [NGINX Ingress Controller]($URL) + +" + +for FILE in `find $DIR/test/e2e -name "*.go"`;do + # describe definition + DESCRIBE=$(cat $FILE | grep -n -oP 'Describe.*') + # line number + DESCRIBE_LINE=$(echo $DESCRIBE | cut -f1 -d ':') + # clean describe, extracting the string + DESCRIBE=$(echo $DESCRIBE | sed -En 's/.*"(.*)".*/\1/p') + + FILE_URL=$(echo $FILE | sed "s|${DIR}/|${URL}|g") + echo " +### [$DESCRIBE]($FILE_URL#L$DESCRIBE_LINE) +" + + # extract Tests + ITS=$(cat $FILE | grep -n -oP 'It\(.*') + while IFS= read -r line; do + IT_LINE=$(echo $line | cut -f1 -d ':') + IT=$(echo $line | sed -En 's/.*"(.*)".*/\1/p') + echo "- [$IT]($FILE_URL#L$IT_LINE)" + done <<< "$ITS" +done diff --git a/hack/print-e2e-suite.sh b/hack/print-e2e-suite.sh new file mode 100755 index 000000000000..e6b083d58145 --- /dev/null +++ b/hack/print-e2e-suite.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright 2020 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ -n "$DEBUG" ]; then + set -x +fi + +set -o errexit +set -o nounset +set -o pipefail + +DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P) + +$DIR/test/e2e/e2e.test \ + -ginkgo.noColor \ + -ginkgo.dryRun | sed "s|$DIR/|File: |g" | sed 's/•//g' | tail -n+5 | head -n-3 diff --git a/images/nginx/38cb695de87cfeadcba5eeaf57f39e41d529aa1f.tar.gz b/images/nginx/38cb695de87cfeadcba5eeaf57f39e41d529aa1f.tar.gz deleted file mode 100644 index b1e05c55b9a0..000000000000 Binary files a/images/nginx/38cb695de87cfeadcba5eeaf57f39e41d529aa1f.tar.gz and /dev/null differ diff --git a/images/nginx/Makefile b/images/nginx/Makefile index da8deb47a3c2..232fce9b3349 100644 --- a/images/nginx/Makefile +++ b/images/nginx/Makefile @@ -12,8 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +.DEFAULT_GOAL:=container + +# set default shell +SHELL=/bin/bash -o pipefail + # 0.0.0 shouldn't clobber any released builds -TAG ?= 0.97 +TAG ?= 0.98 REGISTRY ?= quay.io/kubernetes-ingress-controller IMGNAME = nginx @@ -25,39 +30,26 @@ EMPTY := SPACE := $(EMPTY) $(EMPTY) COMMA := , -.PHONY: all -all: container - .PHONY: container container: DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ - --no-cache \ --progress plain \ --platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \ --tag $(IMAGE):$(TAG) rootfs # https://github.com/docker/buildx/issues/59 $(foreach PLATFORM,$(PLATFORMS), \ - DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ - --load \ - --progress plain \ - --platform $(PLATFORM) \ - --tag $(IMAGE)-$(PLATFORM):$(TAG) rootfs;) - -ifeq ($(ARCH), amd64) - # This is for to maintain the backward compatibility - docker tag $(MULTI_ARCH_IMG):$(TAG) $(IMAGE):$(TAG) -endif + DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ + --load \ + --progress plain \ + --platform $(PLATFORM) \ + --tag $(IMAGE)-$(PLATFORM):$(TAG) rootfs;) .PHONY: push push: container $(foreach PLATFORM,$(PLATFORMS), \ docker push $(IMAGE)-$(PLATFORM):$(TAG);) -ifeq ($(ARCH), amd64) - docker push $(IMAGE):$(TAG) -endif - .PHONY: release release: push echo "done" diff --git a/images/nginx/rootfs/Dockerfile b/images/nginx/rootfs/Dockerfile index 59558ceb1aca..e4955d42a546 100644 --- a/images/nginx/rootfs/Dockerfile +++ b/images/nginx/rootfs/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. -FROM --platform=$BUILDPLATFORM alpine:3.11 as builder +FROM alpine:3.11 as builder COPY . / @@ -21,7 +21,7 @@ RUN apk add -U bash \ && /build.sh # Use a multi-stage build -FROM --platform=$BUILDPLATFORM alpine:3.11 +FROM alpine:3.11 ENV PATH=$PATH:/usr/local/luajit/bin:/usr/local/nginx/sbin:/usr/local/nginx/bin diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 6ef7cda28dc6..ab96b22dd2a6 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -393,6 +393,10 @@ type Configuration struct { // gzip Compression Level that will be used GzipLevel int `json:"gzip-level,omitempty"` + // Minimum length of responses to be sent to the client before it is eligible + // for gzip compression, in bytes. + GzipMinLength int `json:"gzip-min-length,omitempty"` + // MIME types in addition to "text/html" to compress. The special value “*” matches any MIME type. // Responses with the “text/html” type are always compressed if UseGzip is enabled GzipTypes string `json:"gzip-types,omitempty"` @@ -695,6 +699,7 @@ func NewDefault() Configuration { HSTSPreload: false, IgnoreInvalidHeaders: true, GzipLevel: 5, + GzipMinLength: 256, GzipTypes: gzipTypes, KeepAlive: 75, KeepAliveRequests: 100, diff --git a/internal/ingress/controller/store/store.go b/internal/ingress/controller/store/store.go index c7b6eba8ee87..819c0d79c035 100644 --- a/internal/ingress/controller/store/store.go +++ b/internal/ingress/controller/store/store.go @@ -531,87 +531,58 @@ func New( return name == configmap || name == tcp || name == udp } - cmEventHandler := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - cm := obj.(*corev1.ConfigMap) - key := k8s.MetaNamespaceKey(cm) - - triggerUpdate := false - - // updates to configuration configmaps can trigger an update - if changeTriggerUpdate(key) { - recorder.Eventf(cm, corev1.EventTypeNormal, "CREATE", fmt.Sprintf("ConfigMap %v", key)) - triggerUpdate = true - if key == configmap { - store.setConfig(cm) - } + handleCfgMapEvent := func(key string, cfgMap *corev1.ConfigMap, eventName string) { + // updates to configuration configmaps can trigger an update + triggerUpdate := false + if changeTriggerUpdate(key) { + triggerUpdate = true + recorder.Eventf(cfgMap, corev1.EventTypeNormal, eventName, fmt.Sprintf("ConfigMap %v", key)) + if key == configmap { + store.setConfig(cfgMap) } + } - ings := store.listers.IngressWithAnnotation.List() - for _, ingKey := range ings { - key := k8s.MetaNamespaceKey(ingKey) - ing, err := store.getIngress(key) - if err != nil { - klog.Errorf("could not find Ingress %v in local store: %v", key, err) - continue - } + ings := store.listers.IngressWithAnnotation.List() + for _, ingKey := range ings { + key := k8s.MetaNamespaceKey(ingKey) + ing, err := store.getIngress(key) + if err != nil { + klog.Errorf("could not find Ingress %v in local store: %v", key, err) + continue + } - if parser.AnnotationsReferencesConfigmap(ing) { - recorder.Eventf(cm, corev1.EventTypeNormal, "CREATE", fmt.Sprintf("ConfigMap %v", key)) - store.syncIngress(ing) - triggerUpdate = true - } + if parser.AnnotationsReferencesConfigmap(ing) { + store.syncIngress(ing) + continue } if triggerUpdate { - updateCh.In() <- Event{ - Type: ConfigurationEvent, - Obj: obj, - } + store.syncIngress(ing) + } + } + + if triggerUpdate { + updateCh.In() <- Event{ + Type: ConfigurationEvent, + Obj: cfgMap, } + } + } + + cmEventHandler := cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + cfgMap := obj.(*corev1.ConfigMap) + key := k8s.MetaNamespaceKey(cfgMap) + handleCfgMapEvent(key, cfgMap, "CREATE") }, UpdateFunc: func(old, cur interface{}) { if reflect.DeepEqual(old, cur) { return } - // used to limit the number of events - triggerUpdate := false - - cm := cur.(*corev1.ConfigMap) - key := k8s.MetaNamespaceKey(cm) - // updates to configuration configmaps can trigger an update - if changeTriggerUpdate(key) { - recorder.Eventf(cm, corev1.EventTypeNormal, "UPDATE", fmt.Sprintf("ConfigMap %v", key)) - triggerUpdate = true - } - - if key == configmap { - store.setConfig(cm) - } - - ings := store.listers.IngressWithAnnotation.List() - for _, ingKey := range ings { - key := k8s.MetaNamespaceKey(ingKey) - ing, err := store.getIngress(key) - if err != nil { - klog.Errorf("could not find Ingress %v in local store: %v", key, err) - continue - } - - if parser.AnnotationsReferencesConfigmap(ing) { - recorder.Eventf(cm, corev1.EventTypeNormal, "UPDATE", fmt.Sprintf("ConfigMap %v", key)) - store.syncIngress(ing) - triggerUpdate = true - } - } - - if triggerUpdate { - updateCh.In() <- Event{ - Type: ConfigurationEvent, - Obj: cur, - } - } + cfgMap := cur.(*corev1.ConfigMap) + key := k8s.MetaNamespaceKey(cfgMap) + handleCfgMapEvent(key, cfgMap, "UPDATE") }, } diff --git a/internal/ingress/controller/template/configmap_test.go b/internal/ingress/controller/template/configmap_test.go index f4c5e9ab78a8..6b0d51c6b99a 100644 --- a/internal/ingress/controller/template/configmap_test.go +++ b/internal/ingress/controller/template/configmap_test.go @@ -65,6 +65,7 @@ func TestMergeConfigMapToStruct(t *testing.T) { "error-log-path": "/var/log/test/error.log", "use-gzip": "true", "gzip-level": "9", + "gzip-min-length": "1024", "gzip-types": "text/html", "proxy-real-ip-cidr": "1.1.1.1/8,2.2.2.2/24", "bind-address": "1.1.1.1,2.2.2.2,3.3.3,2001:db8:a0b:12f0::1,3731:54:65fe:2::a7,33:33:33::33::33", @@ -85,6 +86,7 @@ func TestMergeConfigMapToStruct(t *testing.T) { def.ProxySendTimeout = 2 def.UseProxyProtocol = true def.GzipLevel = 9 + def.GzipMinLength = 1024 def.GzipTypes = "text/html" def.ProxyRealIPCIDR = []string{"1.1.1.1/8", "2.2.2.2/24"} def.BindAddressIpv4 = []string{"1.1.1.1", "2.2.2.2"} diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index fb0613f2ca2d..70ff1252ca2c 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -13,9 +13,10 @@ # limitations under the License. ARG BASE_IMAGE -ARG VERSION -FROM --platform=$BUILDPLATFORM ${BASE_IMAGE} +FROM ${BASE_IMAGE} + +ARG VERSION LABEL org.opencontainers.image.title="NGINX Ingress Controller for Kubernetes" LABEL org.opencontainers.image.documentation="https://kubernetes.github.io/ingress-nginx/" diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 7132cae1b281..5c76bafbd560 100755 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -239,7 +239,7 @@ http { gzip on; gzip_comp_level {{ $cfg.GzipLevel }}; gzip_http_version 1.1; - gzip_min_length 256; + gzip_min_length {{ $cfg.GzipMinLength}}; gzip_types {{ $cfg.GzipTypes }}; gzip_proxied any; gzip_vary on; diff --git a/test/e2e-image/Dockerfile b/test/e2e-image/Dockerfile index dbb374a01d2f..202a0f5bd0c5 100644 --- a/test/e2e-image/Dockerfile +++ b/test/e2e-image/Dockerfile @@ -10,15 +10,16 @@ RUN apk add -U --no-cache \ libc6-compat \ openssl +RUN curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash \ + && helm repo add stable https://kubernetes-charts.storage.googleapis.com \ + && helm repo update + COPY --from=BASE /go/bin/ginkgo /usr/local/bin/ COPY --from=BASE /usr/local/bin/kubectl /usr/local/bin/ COPY e2e.sh /e2e.sh -COPY cloud-generic /cloud-generic -COPY cluster-wide /cluster-wide -COPY overlay /overlay COPY namespace-overlays /namespace-overlays -RUN sed -E -i 's|^- .*deploy/cloud-generic$|- ../cloud-generic|' /overlay/kustomization.yaml + COPY wait-for-nginx.sh / COPY e2e.test / diff --git a/test/e2e-image/Makefile b/test/e2e-image/Makefile index aa5469bfe51c..78986ec06ce2 100644 --- a/test/e2e-image/Makefile +++ b/test/e2e-image/Makefile @@ -22,8 +22,6 @@ endif cp ../e2e/e2e.test . cp ../e2e/wait-for-nginx.sh . - cp -r ../../deploy/cloud-generic . - cp -r ../../deploy/cluster-wide . docker buildx build \ --load \ diff --git a/test/e2e-image/namespace-overlays/custom-health-check-path/deployment-patch.yaml b/test/e2e-image/namespace-overlays/custom-health-check-path/deployment-patch.yaml deleted file mode 100644 index 79df7fdb4c24..000000000000 --- a/test/e2e-image/namespace-overlays/custom-health-check-path/deployment-patch.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- op: replace - path: /spec/template/spec/containers/0/livenessProbe/httpGet/path - value: /not-healthz -- op: replace - path: /spec/template/spec/containers/0/livenessProbe/httpGet/port - value: 9090 -- op: replace - path: /spec/template/spec/containers/0/readinessProbe/httpGet/path - value: /not-healthz -- op: replace - path: /spec/template/spec/containers/0/readinessProbe/httpGet/port - value: 9090 -- op: add - path: /spec/template/spec/containers/0/args/- - value: --health-check-path=/not-healthz -- op: add - path: /spec/template/spec/containers/0/args/- - value: --healthz-port=9090 diff --git a/test/e2e-image/namespace-overlays/custom-health-check-path/kustomization.yaml b/test/e2e-image/namespace-overlays/custom-health-check-path/kustomization.yaml deleted file mode 100644 index afc13557d6de..000000000000 --- a/test/e2e-image/namespace-overlays/custom-health-check-path/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -patchesJson6902: - - target: - group: apps - version: v1 - kind: Deployment - name: nginx-ingress-controller - path: deployment-patch.yaml -bases: -- ../../overlay diff --git a/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml b/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml new file mode 100644 index 000000000000..d2f7b9d8f2c1 --- /dev/null +++ b/test/e2e-image/namespace-overlays/custom-health-check-path/values.yaml @@ -0,0 +1,33 @@ +controller: + image: + repository: ingress-controller/nginx-ingress-controller + tag: 1.0.0-dev + extraArgs: + healthz-port: "9090" + # e2e tests do not require information about ingress status + update-status: "false" + + scope: + enabled: true + config: + worker-processes: "1" + readinessProbe: + port: 9090 + initialDelaySeconds: 1 + livenessProbe: + port: 9090 + initialDelaySeconds: 1 + podLabels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + service: + type: NodePort + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + +defaultBackend: + enabled: false + +rbac: + create: false diff --git a/test/e2e-image/namespace-overlays/forwarded-port-headers/deployment-patch.yaml b/test/e2e-image/namespace-overlays/forwarded-port-headers/deployment-patch.yaml deleted file mode 100644 index 649858a08717..000000000000 --- a/test/e2e-image/namespace-overlays/forwarded-port-headers/deployment-patch.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- op: replace - path: /spec/template/spec/containers/0/ports/0/containerPort - value: 1080 -- op: replace - path: /spec/template/spec/containers/0/ports/1/containerPort - value: 1443 -- op: add - path: /spec/template/spec/containers/0/args/- - value: --http-port=1080 -- op: add - path: /spec/template/spec/containers/0/args/- - value: --https-port=1443 diff --git a/test/e2e-image/namespace-overlays/forwarded-port-headers/kustomization.yaml b/test/e2e-image/namespace-overlays/forwarded-port-headers/kustomization.yaml deleted file mode 100644 index cf4b4ea84648..000000000000 --- a/test/e2e-image/namespace-overlays/forwarded-port-headers/kustomization.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -patchesJson6902: - - target: - group: apps - version: v1 - kind: Deployment - name: nginx-ingress-controller - path: deployment-patch.yaml - - target: - version: v1 - kind: Service - name: ingress-nginx - path: service-patch.yaml -bases: -- ../../overlay diff --git a/test/e2e-image/namespace-overlays/forwarded-port-headers/service-patch.yaml b/test/e2e-image/namespace-overlays/forwarded-port-headers/service-patch.yaml deleted file mode 100644 index 39442f99101d..000000000000 --- a/test/e2e-image/namespace-overlays/forwarded-port-headers/service-patch.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- op: replace - path: /spec/ports/0/targetPort - value: 1080 -- op: replace - path: /spec/ports/1/targetPort - value: 1443 diff --git a/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml b/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml new file mode 100644 index 000000000000..c83e1728775d --- /dev/null +++ b/test/e2e-image/namespace-overlays/forwarded-port-headers/values.yaml @@ -0,0 +1,34 @@ +controller: + image: + repository: ingress-controller/nginx-ingress-controller + tag: 1.0.0-dev + containerPort: + http: "1080" + https: "1443" + + extraArgs: + http-port: "1080" + https-port: "1443" + # e2e tests do not require information about ingress status + update-status: "false" + + scope: + enabled: true + + config: + worker-processes: "1" + podLabels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + service: + name: ingress-nginx + type: NodePort + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + +defaultBackend: + enabled: false + +rbac: + create: false diff --git a/test/e2e-image/overlay/deployment-e2e.yaml b/test/e2e-image/overlay/deployment-e2e.yaml deleted file mode 100644 index 2219414f8dac..000000000000 --- a/test/e2e-image/overlay/deployment-e2e.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - template: - spec: - terminationGracePeriodSeconds: 0 - initContainers: - - name: enable-coredump - image: busybox - command: - - /bin/sh - - -c - - | - ulimit -c unlimited - echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern - sysctl -w fs.suid_dumpable=2 - securityContext: - privileged: true - containers: - - name: nginx-ingress-controller - livenessProbe: - timeoutSeconds: 1 - initialDelaySeconds: 1 - periodSeconds: 2 - readinessProbe: - timeoutSeconds: 1 - initialDelaySeconds: 1 - periodSeconds: 2 - lifecycle: - preStop: - exec: - command: - - /wait-shutdown diff --git a/test/e2e-image/overlay/deployment-namespace-patch.yaml b/test/e2e-image/overlay/deployment-namespace-patch.yaml deleted file mode 100644 index f0f1fddd8a28..000000000000 --- a/test/e2e-image/overlay/deployment-namespace-patch.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: add - path: /spec/template/spec/containers/0/args/-1 - value: "--watch-namespace=$(POD_NAMESPACE)" diff --git a/test/e2e-image/overlay/kustomization.yaml b/test/e2e-image/overlay/kustomization.yaml deleted file mode 100644 index 8b357e1345fa..000000000000 --- a/test/e2e-image/overlay/kustomization.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../../../deploy/cloud-generic -configMapGenerator: -- name: nginx-configuration - behavior: merge - literals: - - worker-processes=1 -patchesStrategicMerge: -- deployment-e2e.yaml -- service-protocol-tcp.yaml -patchesJson6902: -- path: deployment-namespace-patch.yaml - target: - group: apps - kind: Deployment - name: nginx-ingress-controller - version: v1 -- path: service-cluster-patch.yaml - target: - kind: Service - name: ingress-nginx - version: v1 -- path: role.yaml - target: - group: rbac.authorization.k8s.io - kind: Role - name: nginx-ingress-role - version: v1beta1 -images: -- name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller - newName: ingress-controller/nginx-ingress-controller - newTag: dev diff --git a/test/e2e-image/overlay/role.yaml b/test/e2e-image/overlay/role.yaml deleted file mode 100644 index 5e1430e939cc..000000000000 --- a/test/e2e-image/overlay/role.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: add - path: /rules/1/resourceNames/-1 - value: "ingress-controller-leader-testclass" diff --git a/test/e2e-image/overlay/service-cluster-patch.yaml b/test/e2e-image/overlay/service-cluster-patch.yaml deleted file mode 100644 index 0465d3804669..000000000000 --- a/test/e2e-image/overlay/service-cluster-patch.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- op: remove - path: /spec/externalTrafficPolicy -- op: remove - path: /spec/type diff --git a/test/e2e-image/overlay/service-protocol-tcp.yaml b/test/e2e-image/overlay/service-protocol-tcp.yaml deleted file mode 100644 index c49626fcd1ba..000000000000 --- a/test/e2e-image/overlay/service-protocol-tcp.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: ingress-nginx -spec: - ports: - - name: http - port: 80 - targetPort: 80 - protocol: TCP - - name: https - port: 443 - targetPort: 443 - protocol: TCP diff --git a/test/e2e/annotations/affinity.go b/test/e2e/annotations/affinity.go index 801ab5fecefc..2b55e3b9a150 100644 --- a/test/e2e/annotations/affinity.go +++ b/test/e2e/annotations/affinity.go @@ -33,7 +33,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Affinity/Sticky Sessions", func() { +var _ = framework.DescribeAnnotation("affinity session-cookie-name", func() { f := framework.NewDefaultFramework("affinity") BeforeEach(func() { diff --git a/test/e2e/annotations/alias.go b/test/e2e/annotations/alias.go index 30756a532cba..799f90a2b887 100644 --- a/test/e2e/annotations/alias.go +++ b/test/e2e/annotations/alias.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Alias", func() { +var _ = framework.DescribeAnnotation("server-alias", func() { f := framework.NewDefaultFramework("alias") BeforeEach(func() { diff --git a/test/e2e/annotations/approot.go b/test/e2e/annotations/approot.go index 9b0c65b2b62e..24d6884b2dc8 100644 --- a/test/e2e/annotations/approot.go +++ b/test/e2e/annotations/approot.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Approot", func() { +var _ = framework.DescribeAnnotation("app-root", func() { f := framework.NewDefaultFramework("approot") BeforeEach(func() { diff --git a/test/e2e/annotations/auth.go b/test/e2e/annotations/auth.go index 6b6e897d4fbd..04d5f4222450 100644 --- a/test/e2e/annotations/auth.go +++ b/test/e2e/annotations/auth.go @@ -33,7 +33,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Auth", func() { +var _ = framework.DescribeAnnotation("auth-*", func() { f := framework.NewDefaultFramework("auth") BeforeEach(func() { diff --git a/test/e2e/annotations/authtls.go b/test/e2e/annotations/authtls.go index eb46397a7744..300b4853f6c7 100644 --- a/test/e2e/annotations/authtls.go +++ b/test/e2e/annotations/authtls.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - AuthTLS", func() { +var _ = framework.DescribeAnnotation("auth-tls-*", func() { f := framework.NewDefaultFramework("authtls") BeforeEach(func() { diff --git a/test/e2e/annotations/backendprotocol.go b/test/e2e/annotations/backendprotocol.go index 75b1ec9eec9d..04483e68058b 100644 --- a/test/e2e/annotations/backendprotocol.go +++ b/test/e2e/annotations/backendprotocol.go @@ -22,7 +22,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Backendprotocol", func() { +var _ = framework.DescribeAnnotation("backend-protocol", func() { f := framework.NewDefaultFramework("backendprotocol") BeforeEach(func() { diff --git a/test/e2e/annotations/canary.go b/test/e2e/annotations/canary.go index 1c4b45366932..ae8f55ab287f 100644 --- a/test/e2e/annotations/canary.go +++ b/test/e2e/annotations/canary.go @@ -31,7 +31,7 @@ const ( canaryService = "echo-canary" ) -var _ = framework.IngressNginxDescribe("Annotations - canary", func() { +var _ = framework.DescribeAnnotation("canary-*", func() { f := framework.NewDefaultFramework("canary") BeforeEach(func() { diff --git a/test/e2e/annotations/clientbodybuffersize.go b/test/e2e/annotations/clientbodybuffersize.go index e718fa1aab22..35ece33f481b 100644 --- a/test/e2e/annotations/clientbodybuffersize.go +++ b/test/e2e/annotations/clientbodybuffersize.go @@ -22,7 +22,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Client-Body-Buffer-Size", func() { +var _ = framework.DescribeAnnotation("client-body-buffer-size", func() { f := framework.NewDefaultFramework("clientbodybuffersize") BeforeEach(func() { diff --git a/test/e2e/annotations/connection.go b/test/e2e/annotations/connection.go index 36a16d78fb7a..f27105f02369 100644 --- a/test/e2e/annotations/connection.go +++ b/test/e2e/annotations/connection.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Connection", func() { +var _ = framework.DescribeAnnotation("connection-proxy-header", func() { f := framework.NewDefaultFramework("connection") BeforeEach(func() { diff --git a/test/e2e/annotations/cors.go b/test/e2e/annotations/cors.go index d5ca52e315af..6ef0683714fe 100644 --- a/test/e2e/annotations/cors.go +++ b/test/e2e/annotations/cors.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - CORS", func() { +var _ = framework.DescribeAnnotation("cors-*", func() { f := framework.NewDefaultFramework("cors") BeforeEach(func() { diff --git a/test/e2e/annotations/customhttperrors.go b/test/e2e/annotations/customhttperrors.go index 78714b0297dd..54fc2aa9e4de 100644 --- a/test/e2e/annotations/customhttperrors.go +++ b/test/e2e/annotations/customhttperrors.go @@ -31,7 +31,7 @@ func errorBlockName(upstreamName string, errorCode string) string { return fmt.Sprintf("@custom_%s_%s", upstreamName, errorCode) } -var _ = framework.IngressNginxDescribe("Annotations - custom-http-errors", func() { +var _ = framework.DescribeAnnotation("custom-http-errors", func() { f := framework.NewDefaultFramework("custom-http-errors") BeforeEach(func() { diff --git a/test/e2e/annotations/default_backend.go b/test/e2e/annotations/default_backend.go index 1285bc23b9c2..7ce4a1bec9e0 100644 --- a/test/e2e/annotations/default_backend.go +++ b/test/e2e/annotations/default_backend.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - custom default-backend", func() { +var _ = framework.DescribeAnnotation("default-backend", func() { f := framework.NewDefaultFramework("default-backend") BeforeEach(func() { diff --git a/test/e2e/annotations/fastcgi.go b/test/e2e/annotations/fastcgi.go index 4a01987d6a21..7946cc79870d 100644 --- a/test/e2e/annotations/fastcgi.go +++ b/test/e2e/annotations/fastcgi.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - FastCGI", func() { +var _ = framework.DescribeAnnotation("backend-protocol - FastCGI", func() { f := framework.NewDefaultFramework("fastcgi") BeforeEach(func() { diff --git a/test/e2e/annotations/forcesslredirect.go b/test/e2e/annotations/forcesslredirect.go index 38b584596006..ac7768e3abba 100644 --- a/test/e2e/annotations/forcesslredirect.go +++ b/test/e2e/annotations/forcesslredirect.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Forcesslredirect", func() { +var _ = framework.DescribeAnnotation("force-ssl-redirect", func() { f := framework.NewDefaultFramework("forcesslredirect") BeforeEach(func() { diff --git a/test/e2e/annotations/fromtowwwredirect.go b/test/e2e/annotations/fromtowwwredirect.go index 3785cbdf670a..3501c62e498f 100644 --- a/test/e2e/annotations/fromtowwwredirect.go +++ b/test/e2e/annotations/fromtowwwredirect.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - from-to-www-redirect", func() { +var _ = framework.DescribeAnnotation("from-to-www-redirect", func() { f := framework.NewDefaultFramework("fromtowwwredirect") BeforeEach(func() { diff --git a/test/e2e/annotations/grpc.go b/test/e2e/annotations/grpc.go index f1c767a3f409..69c95226cceb 100644 --- a/test/e2e/annotations/grpc.go +++ b/test/e2e/annotations/grpc.go @@ -36,7 +36,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - GRPC", func() { +var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { f := framework.NewDefaultFramework("grpc") It("should use grpc_pass in the configuration file", func() { diff --git a/test/e2e/annotations/http2pushpreload.go b/test/e2e/annotations/http2pushpreload.go index 2b132676f0c2..fb12ee55d3dd 100644 --- a/test/e2e/annotations/http2pushpreload.go +++ b/test/e2e/annotations/http2pushpreload.go @@ -22,7 +22,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - HTTP2 Push Preload", func() { +var _ = framework.DescribeAnnotation("http2-push-preload", func() { f := framework.NewDefaultFramework("http2pushpreload") BeforeEach(func() { diff --git a/test/e2e/annotations/influxdb.go b/test/e2e/annotations/influxdb.go index 96a061165dd0..adad17c28870 100644 --- a/test/e2e/annotations/influxdb.go +++ b/test/e2e/annotations/influxdb.go @@ -36,7 +36,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - influxdb", func() { +var _ = framework.DescribeAnnotation("influxdb-*", func() { f := framework.NewDefaultFramework("influxdb") BeforeEach(func() { diff --git a/test/e2e/annotations/ipwhitelist.go b/test/e2e/annotations/ipwhitelist.go index 47e3379e2952..726988741112 100644 --- a/test/e2e/annotations/ipwhitelist.go +++ b/test/e2e/annotations/ipwhitelist.go @@ -24,7 +24,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - IPWhiteList", func() { +var _ = framework.DescribeAnnotation("whitelist-source-range", func() { f := framework.NewDefaultFramework("ipwhitelist") BeforeEach(func() { diff --git a/test/e2e/annotations/log.go b/test/e2e/annotations/log.go index 6c6a839391d1..617dd6332445 100644 --- a/test/e2e/annotations/log.go +++ b/test/e2e/annotations/log.go @@ -23,7 +23,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Log", func() { +var _ = framework.DescribeAnnotation("enable-access-log enable-rewrite-log", func() { f := framework.NewDefaultFramework("log") BeforeEach(func() { diff --git a/test/e2e/annotations/mirror.go b/test/e2e/annotations/mirror.go index 4ce64bcb0d6d..63679caa435f 100644 --- a/test/e2e/annotations/mirror.go +++ b/test/e2e/annotations/mirror.go @@ -25,7 +25,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Mirror", func() { +var _ = framework.DescribeAnnotation("mirror-*", func() { f := framework.NewDefaultFramework("mirror") host := "mirror.foo.com" diff --git a/test/e2e/annotations/modsecurity.go b/test/e2e/annotations/modsecurity.go index 4b3035008577..5f65a6ad4439 100644 --- a/test/e2e/annotations/modsecurity.go +++ b/test/e2e/annotations/modsecurity.go @@ -23,7 +23,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - ModSecurityLocation", func() { +var _ = framework.DescribeAnnotation("modsecurity owasp", func() { f := framework.NewDefaultFramework("modsecuritylocation") BeforeEach(func() { diff --git a/test/e2e/annotations/proxy.go b/test/e2e/annotations/proxy.go index f0eca994c0fc..e7d3e0297972 100644 --- a/test/e2e/annotations/proxy.go +++ b/test/e2e/annotations/proxy.go @@ -25,7 +25,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() { +var _ = framework.DescribeAnnotation("proxy-*", func() { f := framework.NewDefaultFramework("proxy") host := "proxy.foo.com" @@ -178,8 +178,8 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() { It("should build proxy next upstream", func() { annotations := map[string]string{ "nginx.ingress.kubernetes.io/proxy-next-upstream": "error timeout http_502", - "nginx.ingress.kubernetes.io/proxy-next-upstream-timeout": "10", - "nginx.ingress.kubernetes.io/proxy-next-upstream-tries": "5", + "nginx.ingress.kubernetes.io/proxy-next-upstream-timeout": "999999", + "nginx.ingress.kubernetes.io/proxy-next-upstream-tries": "888888", } ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations) @@ -187,9 +187,9 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() { f.WaitForNginxServer(host, func(server string) bool { - return strings.Contains(server, "proxy_next_upstream error timeout http_502;") && - strings.Contains(server, "proxy_next_upstream_timeout 10;") && - strings.Contains(server, "proxy_next_upstream_tries 5;") + return strings.Contains(server, "error timeout http_502;") && + strings.Contains(server, "999999;") && + strings.Contains(server, "888888;") }) }) @@ -200,15 +200,15 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() { f.SetNginxConfigMapData(map[string]string{ "proxy-next-upstream": "timeout http_502", - "proxy-next-upstream-timeout": "53", - "proxy-next-upstream-tries": "44", + "proxy-next-upstream-timeout": "999999", + "proxy-next-upstream-tries": "888888", }) f.WaitForNginxServer(host, func(server string) bool { - return strings.Contains(server, "proxy_next_upstream timeout http_502;") && - strings.Contains(server, "proxy_next_upstream_timeout 53;") && - strings.Contains(server, "proxy_next_upstream_tries 44;") + return strings.Contains(server, "timeout http_502;") && + strings.Contains(server, "999999;") && + strings.Contains(server, "888888;") }) }) diff --git a/test/e2e/annotations/proxyssl.go b/test/e2e/annotations/proxyssl.go index 4b32a904cf1b..a70f616210d5 100644 --- a/test/e2e/annotations/proxyssl.go +++ b/test/e2e/annotations/proxyssl.go @@ -25,7 +25,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - ProxySSL", func() { +var _ = framework.DescribeAnnotation("proxy-ssl-*", func() { f := framework.NewDefaultFramework("proxyssl") BeforeEach(func() { diff --git a/test/e2e/annotations/redirect.go b/test/e2e/annotations/redirect.go index 362acc483c82..afb429c283a0 100644 --- a/test/e2e/annotations/redirect.go +++ b/test/e2e/annotations/redirect.go @@ -34,7 +34,7 @@ func noRedirectPolicyFunc(gorequest.Request, []gorequest.Request) error { return http.ErrUseLastResponse } -var _ = framework.IngressNginxDescribe("Annotations - Redirect", func() { +var _ = framework.DescribeAnnotation("permanen-redirect permanen-redirect-code", func() { f := framework.NewDefaultFramework("redirect") It("should respond with a standard redirect code", func() { diff --git a/test/e2e/annotations/rewrite.go b/test/e2e/annotations/rewrite.go index 0669b25b10d3..0c8b5c0fd09f 100644 --- a/test/e2e/annotations/rewrite.go +++ b/test/e2e/annotations/rewrite.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Rewrite", func() { +var _ = framework.DescribeAnnotation("rewrite-target use-regex enable-rewrite-log", func() { f := framework.NewDefaultFramework("rewrite") BeforeEach(func() { diff --git a/test/e2e/annotations/satisfy.go b/test/e2e/annotations/satisfy.go index cf9293d2bcbb..34130f57a2da 100644 --- a/test/e2e/annotations/satisfy.go +++ b/test/e2e/annotations/satisfy.go @@ -30,7 +30,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - SATISFY", func() { +var _ = framework.DescribeAnnotation("satisfy", func() { f := framework.NewDefaultFramework("satisfy") BeforeEach(func() { diff --git a/test/e2e/annotations/serversnippet.go b/test/e2e/annotations/serversnippet.go index 594410003673..6f763cdf6968 100644 --- a/test/e2e/annotations/serversnippet.go +++ b/test/e2e/annotations/serversnippet.go @@ -24,7 +24,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - ServerSnippet", func() { +var _ = framework.DescribeAnnotation("server-snippet", func() { f := framework.NewDefaultFramework("serversnippet") BeforeEach(func() { diff --git a/test/e2e/annotations/snippet.go b/test/e2e/annotations/snippet.go index 7f0277bf3fa8..218081011fb9 100644 --- a/test/e2e/annotations/snippet.go +++ b/test/e2e/annotations/snippet.go @@ -22,7 +22,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Configurationsnippet", func() { +var _ = framework.DescribeAnnotation("configuration-snippet", func() { f := framework.NewDefaultFramework("configurationsnippet") BeforeEach(func() { diff --git a/test/e2e/annotations/sslciphers.go b/test/e2e/annotations/sslciphers.go index 22d948c50b59..6008c5854f5d 100644 --- a/test/e2e/annotations/sslciphers.go +++ b/test/e2e/annotations/sslciphers.go @@ -23,7 +23,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - SSL CIPHERS", func() { +var _ = framework.DescribeAnnotation("ssl-ciphers", func() { f := framework.NewDefaultFramework("sslciphers") BeforeEach(func() { diff --git a/test/e2e/annotations/upstreamhashby.go b/test/e2e/annotations/upstreamhashby.go index ea997295c313..af0f8190038f 100644 --- a/test/e2e/annotations/upstreamhashby.go +++ b/test/e2e/annotations/upstreamhashby.go @@ -72,7 +72,7 @@ func startIngress(f *framework.Framework, annotations map[string]string) map[str return podMap } -var _ = framework.IngressNginxDescribe("Annotations - UpstreamHashBy", func() { +var _ = framework.DescribeAnnotation("upstream-hash-by-*", func() { f := framework.NewDefaultFramework("upstream-hash-by") BeforeEach(func() { diff --git a/test/e2e/annotations/upstreamvhost.go b/test/e2e/annotations/upstreamvhost.go index 08235f30c469..178d327688a9 100644 --- a/test/e2e/annotations/upstreamvhost.go +++ b/test/e2e/annotations/upstreamvhost.go @@ -22,7 +22,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - Upstreamvhost", func() { +var _ = framework.DescribeAnnotation("upstream-vhost", func() { f := framework.NewDefaultFramework("upstreamvhost") BeforeEach(func() { diff --git a/test/e2e/annotations/xforwardedprefix.go b/test/e2e/annotations/xforwardedprefix.go index b0871e9e9439..665b9ae2113e 100644 --- a/test/e2e/annotations/xforwardedprefix.go +++ b/test/e2e/annotations/xforwardedprefix.go @@ -25,7 +25,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Annotations - X-Forwarded-Prefix", func() { +var _ = framework.DescribeAnnotation("x-forwarded-prefix", func() { f := framework.NewDefaultFramework("xforwardedprefix") BeforeEach(func() { diff --git a/test/e2e/dbg/main.go b/test/e2e/dbg/main.go index b7187b77bc81..569ef7867a7c 100644 --- a/test/e2e/dbg/main.go +++ b/test/e2e/dbg/main.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Debug Tool", func() { +var _ = framework.IngressNginxDescribe("Debug CLI", func() { f := framework.NewDefaultFramework("debug-tool") host := "foo.com" diff --git a/test/e2e/defaultbackend/custom_default_backend.go b/test/e2e/defaultbackend/custom_default_backend.go index 472eadbcfbc0..1a8f2d8f7654 100644 --- a/test/e2e/defaultbackend/custom_default_backend.go +++ b/test/e2e/defaultbackend/custom_default_backend.go @@ -32,7 +32,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Custom Default Backend", func() { +var _ = framework.IngressNginxDescribe("[Default Backend] custom service", func() { f := framework.NewDefaultFramework("custom-default-backend") BeforeEach(func() { diff --git a/test/e2e/defaultbackend/default_backend.go b/test/e2e/defaultbackend/default_backend.go index 1a8c10be04d2..89f0e7bd2bd8 100644 --- a/test/e2e/defaultbackend/default_backend.go +++ b/test/e2e/defaultbackend/default_backend.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Default backend", func() { +var _ = framework.IngressNginxDescribe("[Default Backend]", func() { f := framework.NewDefaultFramework("default-backend") It("should return 404 sending requests when only a default backend is running", func() { diff --git a/test/e2e/defaultbackend/ssl.go b/test/e2e/defaultbackend/ssl.go index ae01c01e8b6f..d3c22b1db7c3 100644 --- a/test/e2e/defaultbackend/ssl.go +++ b/test/e2e/defaultbackend/ssl.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Default backend - SSL", func() { +var _ = framework.IngressNginxDescribe("[Default Backend] SSL", func() { f := framework.NewDefaultFramework("default-backend") It("should return a self generated SSL certificate", func() { diff --git a/test/e2e/defaultbackend/with_hosts.go b/test/e2e/defaultbackend/with_hosts.go index 2d7af3bc51c5..2e7578b71b9b 100644 --- a/test/e2e/defaultbackend/with_hosts.go +++ b/test/e2e/defaultbackend/with_hosts.go @@ -30,7 +30,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Default backend with hosts", func() { +var _ = framework.IngressNginxDescribe("[Default Backend] change default settings", func() { f := framework.NewDefaultFramework("default-backend-hosts") host := "foo.com" diff --git a/test/e2e/framework/deployment.go b/test/e2e/framework/deployment.go index a126084306b7..ba423add9bc1 100644 --- a/test/e2e/framework/deployment.go +++ b/test/e2e/framework/deployment.go @@ -51,7 +51,7 @@ func (f *Framework) NewEchoDeploymentWithReplicas(replicas int) { // replicas is configurable and // name is configurable func (f *Framework) NewEchoDeploymentWithNameAndReplicas(name string, replicas int) { - deployment := newDeployment(name, f.Namespace, "ingress-controller/echo:dev", 80, int32(replicas), + deployment := newDeployment(name, f.Namespace, "ingress-controller/echo:1.0.0-dev", 80, int32(replicas), []string{ "openresty", }, @@ -329,7 +329,7 @@ func newDeployment(name, namespace, image string, port int32, replicas int32, co // NewHttpbinDeployment creates a new single replica deployment of the httpbin image in a particular namespace. func (f *Framework) NewHttpbinDeployment() { - f.NewDeployment(HTTPBinService, "ingress-controller/httpbin:dev", 80, 1) + f.NewDeployment(HTTPBinService, "ingress-controller/httpbin:1.0.0-dev", 80, 1) } // NewDeployment creates a new deployment in a particular namespace. diff --git a/test/e2e/framework/fastcgi_helloserver.go b/test/e2e/framework/fastcgi_helloserver.go index e7b3aca62c12..9f2cde41bfb0 100644 --- a/test/e2e/framework/fastcgi_helloserver.go +++ b/test/e2e/framework/fastcgi_helloserver.go @@ -58,7 +58,7 @@ func (f *Framework) NewNewFastCGIHelloServerDeploymentWithReplicas(replicas int3 Containers: []corev1.Container{ { Name: "fastcgi-helloserver", - Image: "ingress-controller/fastcgi-helloserver:dev", + Image: "ingress-controller/fastcgi-helloserver:1.0.0-dev", Env: []corev1.EnvVar{}, Ports: []corev1.ContainerPort{ { diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 686ceec50b86..abc1a1f74167 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -145,7 +145,17 @@ func (f *Framework) AfterEach() { // IngressNginxDescribe wrapper function for ginkgo describe. Adds namespacing. func IngressNginxDescribe(text string, body func()) bool { - return ginkgo.Describe("[ingress-nginx] "+text, body) + return ginkgo.Describe(text, body) +} + +// DescribeAnnotation wrapper function for ginkgo describe. Adds namespacing. +func DescribeAnnotation(text string, body func()) bool { + return ginkgo.Describe("[Annotations] "+text, body) +} + +// DescribeSetting wrapper function for ginkgo describe. Adds namespacing. +func DescribeSetting(text string, body func()) bool { + return ginkgo.Describe("[Setting] "+text, body) } // MemoryLeakIt is wrapper function for ginkgo It. Adds "[MemoryLeak]" tag and makes static analysis easier. @@ -158,7 +168,7 @@ func (f *Framework) GetNginxIP() string { s, err := f.KubeClientSet. CoreV1(). Services(f.Namespace). - Get("ingress-nginx", metav1.GetOptions{}) + Get("nginx-ingress-controller", metav1.GetOptions{}) gomega.Expect(err).NotTo(gomega.HaveOccurred(), "unexpected error obtaining NGINX IP address") return s.Spec.ClusterIP } @@ -168,7 +178,7 @@ func (f *Framework) GetNginxPodIP() []string { e, err := f.KubeClientSet. CoreV1(). Endpoints(f.Namespace). - Get("ingress-nginx", metav1.GetOptions{}) + Get("nginx-ingress-controller", metav1.GetOptions{}) gomega.Expect(err).NotTo(gomega.HaveOccurred(), "unexpected error obtaining NGINX IP address") eips := make([]string, 0) for _, s := range e.Subsets { @@ -262,7 +272,7 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b } func (f *Framework) getNginxConfigMap() (*v1.ConfigMap, error) { - return f.getConfigMap("nginx-configuration") + return f.getConfigMap("nginx-ingress-controller") } func (f *Framework) getConfigMap(name string) (*v1.ConfigMap, error) { @@ -281,36 +291,19 @@ func (f *Framework) getConfigMap(name string) (*v1.ConfigMap, error) { return config, err } -// GetNginxConfigMapData gets ingress-nginx's nginx-configuration map's data -func (f *Framework) GetNginxConfigMapData() (map[string]string, error) { - config, err := f.getNginxConfigMap() - if err != nil { - return nil, err - } - if config.Data == nil { - config.Data = map[string]string{} - } - - return config.Data, err -} - -// SetNginxConfigMapData sets ingress-nginx's nginx-configuration configMap data +// SetNginxConfigMapData sets ingress-nginx's nginx-ingress-controller configMap data func (f *Framework) SetNginxConfigMapData(cmData map[string]string) { - f.SetConfigMapData("nginx-configuration", cmData) -} - -func (f *Framework) SetConfigMapData(name string, cmData map[string]string) { - config, err := f.getConfigMap(name) + cfgMap, err := f.getConfigMap("nginx-ingress-controller") gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(config).NotTo(gomega.BeNil(), "expected a configmap but none returned") + gomega.Expect(cfgMap).NotTo(gomega.BeNil(), "expected a configmap but none returned") - config.Data = cmData + cfgMap.Data = cmData _, err = f.KubeClientSet. CoreV1(). ConfigMaps(f.Namespace). - Update(config) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + Update(cfgMap) + gomega.Expect(err).NotTo(gomega.HaveOccurred(), "unexpected error updating configuration configmap") time.Sleep(5 * time.Second) } @@ -326,15 +319,20 @@ func (f *Framework) CreateConfigMap(name string, data map[string]string) { gomega.Expect(err).NotTo(gomega.HaveOccurred(), "failed to create configMap") } -// UpdateNginxConfigMapData updates single field in ingress-nginx's nginx-configuration map data +// UpdateNginxConfigMapData updates single field in ingress-nginx's nginx-ingress-controller map data func (f *Framework) UpdateNginxConfigMapData(key string, value string) { - config, err := f.GetNginxConfigMapData() - gomega.Expect(err).NotTo(gomega.HaveOccurred(), "unexpected error reading configmap") + config, err := f.getConfigMap("nginx-ingress-controller") + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(config).NotTo(gomega.BeNil(), "expected a configmap but none returned") - config[key] = value + config.Data[key] = value - f.SetNginxConfigMapData(config) - time.Sleep(1 * time.Second) + _, err = f.KubeClientSet. + CoreV1(). + ConfigMaps(f.Namespace). + Update(config) + gomega.Expect(err).NotTo(gomega.HaveOccurred(), "unexpected error updating configuration configmap") + time.Sleep(5 * time.Second) } // DeleteNGINXPod deletes the currently running pod. It waits for the replacement pod to be up. diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index d64dcf233b4d..d29caa868e43 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -36,10 +36,10 @@ import ( const ( // Poll how often to poll for conditions - Poll = 3 * time.Second + Poll = 2 * time.Second // DefaultTimeout time to wait for operations to complete - DefaultTimeout = 3 * time.Minute + DefaultTimeout = 2 * time.Minute ) func nowStamp() string { diff --git a/test/e2e/gracefulshutdown/shutdown.go b/test/e2e/gracefulshutdown/shutdown.go index 46d4a6f45590..735299688e79 100755 --- a/test/e2e/gracefulshutdown/shutdown.go +++ b/test/e2e/gracefulshutdown/shutdown.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Shutdown ingress controller", func() { +var _ = framework.IngressNginxDescribe("[Shutdown] ingress controller", func() { f := framework.NewDefaultFramework("shutdown-ingress-controller") host := "shutdown" diff --git a/test/e2e/gracefulshutdown/slow_requests.go b/test/e2e/gracefulshutdown/slow_requests.go index adbd95467373..de52304c7db7 100644 --- a/test/e2e/gracefulshutdown/slow_requests.go +++ b/test/e2e/gracefulshutdown/slow_requests.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Graceful Shutdown - Slow Requests", func() { +var _ = framework.IngressNginxDescribe("[Shutdown] Graceful shutdown with pending request", func() { f := framework.NewDefaultFramework("shutdown-slow-requests") BeforeEach(func() { diff --git a/test/e2e/leaks/lua_ssl.go b/test/e2e/leaks/lua_ssl.go index 2b91ac40d02a..9df7982351eb 100644 --- a/test/e2e/leaks/lua_ssl.go +++ b/test/e2e/leaks/lua_ssl.go @@ -33,7 +33,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("DynamicCertificates", func() { +var _ = framework.IngressNginxDescribe("[Memory Leak] Dynamic Certificates", func() { f := framework.NewDefaultFramework("lua-dynamic-certificates") BeforeEach(func() { diff --git a/test/e2e/loadbalance/configmap.go b/test/e2e/loadbalance/configmap.go index 236d1e875fca..2f1429f8002a 100644 --- a/test/e2e/loadbalance/configmap.go +++ b/test/e2e/loadbalance/configmap.go @@ -25,7 +25,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Load Balance - Configmap value", func() { +var _ = framework.DescribeSetting("[Load Balancer] load-balance", func() { f := framework.NewDefaultFramework("lb-configmap") BeforeEach(func() { diff --git a/test/e2e/loadbalance/ewma.go b/test/e2e/loadbalance/ewma.go index 1a63e20ffa46..24641787c543 100644 --- a/test/e2e/loadbalance/ewma.go +++ b/test/e2e/loadbalance/ewma.go @@ -29,13 +29,15 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Load Balance - EWMA", func() { +var _ = framework.DescribeSetting("[Load Balancer] EWMA", func() { f := framework.NewDefaultFramework("ewma") BeforeEach(func() { f.NewEchoDeploymentWithReplicas(3) - f.UpdateNginxConfigMapData("worker-processes", "2") - f.UpdateNginxConfigMapData("load-balance", "ewma") + f.SetNginxConfigMapData(map[string]string{ + "worker-processes": "2", + "load-balance": "ewma"}, + ) }) It("does not fail requests", func() { diff --git a/test/e2e/loadbalance/round_robin.go b/test/e2e/loadbalance/round_robin.go index a16a9ddf0e5d..ebb6bcd96765 100644 --- a/test/e2e/loadbalance/round_robin.go +++ b/test/e2e/loadbalance/round_robin.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Load Balance - Round Robin", func() { +var _ = framework.DescribeSetting("[Load Balancer] round-robin", func() { f := framework.NewDefaultFramework("round-robin") BeforeEach(func() { @@ -37,10 +37,6 @@ var _ = framework.IngressNginxDescribe("Load Balance - Round Robin", func() { f.UpdateNginxConfigMapData("worker-processes", "1") }) - AfterEach(func() { - f.UpdateNginxConfigMapData("worker-processes", "") - }) - It("should evenly distribute requests with round-robin (default algorithm)", func() { host := "load-balance.com" diff --git a/test/e2e/lua/dynamic_certificates.go b/test/e2e/lua/dynamic_certificates.go index 2855d40cfcf2..a18f6bbe070f 100644 --- a/test/e2e/lua/dynamic_certificates.go +++ b/test/e2e/lua/dynamic_certificates.go @@ -33,7 +33,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() { +var _ = framework.IngressNginxDescribe("[Lua] dynamic certificates", func() { f := framework.NewDefaultFramework("dynamic-certificate") host := "foo.com" diff --git a/test/e2e/lua/dynamic_configuration.go b/test/e2e/lua/dynamic_configuration.go index 92916fb03144..263e16932019 100644 --- a/test/e2e/lua/dynamic_configuration.go +++ b/test/e2e/lua/dynamic_configuration.go @@ -43,7 +43,7 @@ const ( waitForLuaSync = 5 * time.Second ) -var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() { +var _ = framework.IngressNginxDescribe("[Lua] dynamic configuration", func() { f := framework.NewDefaultFramework("dynamic-configuration") BeforeEach(func() { diff --git a/test/e2e/run.sh b/test/e2e/run.sh index 97ebea1adb19..6e054645bf3a 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -54,7 +54,8 @@ fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export TAG=dev +# Use 1.0.0-dev to make sure we use the latest configuration in the helm template +export TAG=1.0.0-dev export ARCH=amd64 export REGISTRY=ingress-controller diff --git a/test/e2e/security/request_smuggling.go b/test/e2e/security/request_smuggling.go index 09bb6d909ca9..64aa98247324 100644 --- a/test/e2e/security/request_smuggling.go +++ b/test/e2e/security/request_smuggling.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Request smuggling", func() { +var _ = framework.IngressNginxDescribe("[Security] request smuggling", func() { f := framework.NewDefaultFramework("request-smuggling") BeforeEach(func() { diff --git a/test/e2e/servicebackend/service_backend.go b/test/e2e/servicebackend/service_backend.go index 79db74f32f23..9c946e652942 100644 --- a/test/e2e/servicebackend/service_backend.go +++ b/test/e2e/servicebackend/service_backend.go @@ -32,7 +32,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Service backend - 503", func() { +var _ = framework.IngressNginxDescribe("[Service] backend status code 503", func() { f := framework.NewDefaultFramework("service-backend") It("should return 503 when backend service does not exist", func() { diff --git a/test/e2e/servicebackend/service_externalname.go b/test/e2e/servicebackend/service_externalname.go index 51d83273b557..e9156af99852 100644 --- a/test/e2e/servicebackend/service_externalname.go +++ b/test/e2e/servicebackend/service_externalname.go @@ -32,7 +32,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Service Type ExternalName", func() { +var _ = framework.IngressNginxDescribe("[Service] Type ExternalName", func() { f := framework.NewDefaultFramework("type-externalname") It("works with external name set to incomplete fdqn", func() { diff --git a/test/e2e/settings/configmap_change.go b/test/e2e/settings/configmap_change.go index 5565565c90d0..5d8e6cd5c657 100644 --- a/test/e2e/settings/configmap_change.go +++ b/test/e2e/settings/configmap_change.go @@ -26,7 +26,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Configmap change", func() { +var _ = framework.DescribeSetting("Configmap change", func() { f := framework.NewDefaultFramework("configmap-change") BeforeEach(func() { @@ -39,12 +39,9 @@ var _ = framework.IngressNginxDescribe("Configmap change", func() { ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil) f.EnsureIngress(ing) - wlKey := "whitelist-source-range" - wlValue := "1.1.1.1" - By("adding a whitelist-source-range") - f.UpdateNginxConfigMapData(wlKey, wlValue) + f.UpdateNginxConfigMapData("whitelist-source-range", "1.1.1.1") checksumRegex := regexp.MustCompile(`Configuration checksum:\s+(\d+)`) checksum := "" diff --git a/test/e2e/settings/custom_header.go b/test/e2e/settings/custom_header.go new file mode 100644 index 000000000000..b41357b99dda --- /dev/null +++ b/test/e2e/settings/custom_header.go @@ -0,0 +1,103 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package settings + +import ( + "fmt" + "net/http" + "strings" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/parnurzeal/gorequest" + + "k8s.io/ingress-nginx/test/e2e/framework" +) + +var _ = framework.DescribeSetting("Add custom headers", func() { + f := framework.NewDefaultFramework("custom-header") + host := "custom-header" + + BeforeEach(func() { + f.NewEchoDeployment() + ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil) + f.EnsureIngress(ing) + }) + + AfterEach(func() { + }) + + It("Add a custom header", func() { + customHeader := "X-A-Custom-Header" + customHeaderValue := "customHeaderValue" + + h := make(map[string]string) + h[customHeader] = customHeaderValue + + f.CreateConfigMap("add-headers-configmap", h) + + wlKey := "add-headers" + wlValue := f.Namespace + "/add-headers-configmap" + + f.UpdateNginxConfigMapData(wlKey, wlValue) + + f.WaitForNginxConfiguration(func(server string) bool { + return strings.Contains(server, fmt.Sprintf("more_set_headers \"%s: %s\";", customHeader, customHeaderValue)) + }) + + resp, _, errs := gorequest.New(). + Get(f.GetURL(framework.HTTP)). + Set("Host", host). + End() + + Expect(errs).Should(BeEmpty()) + Expect(resp.StatusCode).Should(Equal(http.StatusOK)) + Expect(resp.Header.Get(customHeader)).Should(ContainSubstring(customHeaderValue)) + }) + + It("Add multiple custom headers", func() { + firstCustomHeader := "X-First" + firstCustomHeaderValue := "Prepare for trouble!" + secondCustomHeader := "X-Second" + secondCustomHeaderValue := "And make it double!" + + h := make(map[string]string) + h[firstCustomHeader] = firstCustomHeaderValue + h[secondCustomHeader] = secondCustomHeaderValue + + f.CreateConfigMap("add-headers-configmap-two", h) + + wlKey := "add-headers" + wlValue := f.Namespace + "/add-headers-configmap-two" + + f.UpdateNginxConfigMapData(wlKey, wlValue) + + f.WaitForNginxConfiguration(func(server string) bool { + return strings.Contains(server, fmt.Sprintf("more_set_headers \"%s: %s\";", firstCustomHeader, firstCustomHeaderValue)) && strings.Contains(server, fmt.Sprintf("more_set_headers \"%s: %s\";", secondCustomHeader, secondCustomHeaderValue)) + }) + + resp, _, errs := gorequest.New(). + Get(f.GetURL(framework.HTTP)). + Set("Host", host). + End() + + Expect(errs).Should(BeEmpty()) + Expect(resp.StatusCode).Should(Equal(http.StatusOK)) + Expect(resp.Header.Get(firstCustomHeader)).Should(ContainSubstring(firstCustomHeaderValue)) + Expect(resp.Header.Get(secondCustomHeader)).Should(ContainSubstring(secondCustomHeaderValue)) + }) +}) diff --git a/test/e2e/settings/customize_health_check_path.go b/test/e2e/settings/customize_health_check_path.go deleted file mode 100644 index 1d787200badd..000000000000 --- a/test/e2e/settings/customize_health_check_path.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package settings - -import ( - "strings" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/ingress-nginx/test/e2e/framework" -) - -var _ = framework.IngressNginxDescribe("Customize health check path", func() { - f := framework.NewDefaultFramework("custom-health-check-path") - - Context("with a plain HTTP ingress", func() { - It("should return HTTP/1.1 200 OK on custom health check path and port", func() { - - f.WaitForNginxConfiguration(func(server string) bool { - return strings.Contains(server, "location /not-healthz") - }) - - err := framework.WaitForPodsReady(f.KubeClientSet, framework.DefaultTimeout, 1, f.Namespace, metav1.ListOptions{ - LabelSelector: "app.kubernetes.io/name=ingress-nginx", - }) - - Expect(err).NotTo(HaveOccurred()) - }) - }) -}) diff --git a/test/e2e/settings/default_ssl_certificate.go b/test/e2e/settings/default_ssl_certificate.go index 71307b93925a..b5edfe6ccdbb 100644 --- a/test/e2e/settings/default_ssl_certificate.go +++ b/test/e2e/settings/default_ssl_certificate.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("default-ssl-certificate", func() { +var _ = framework.IngressNginxDescribe("[SSL] [Flag] default-ssl-certificate", func() { f := framework.NewDefaultFramework("default-ssl-certificate") var tlsConfig *tls.Config secretName := "my-custom-cert" diff --git a/test/e2e/settings/disable_catch_all.go b/test/e2e/settings/disable_catch_all.go index 37b9dba6c849..3f24f0dd1cde 100644 --- a/test/e2e/settings/disable_catch_all.go +++ b/test/e2e/settings/disable_catch_all.go @@ -31,7 +31,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Disabled catch-all", func() { +var _ = framework.IngressNginxDescribe("[Flag] disable-catch-all", func() { f := framework.NewDefaultFramework("disabled-catch-all") BeforeEach(func() { diff --git a/test/e2e/settings/forwarded_headers.go b/test/e2e/settings/forwarded_headers.go index dcfbd4de63e0..255a74788e82 100644 --- a/test/e2e/settings/forwarded_headers.go +++ b/test/e2e/settings/forwarded_headers.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("X-Forwarded headers", func() { +var _ = framework.DescribeSetting("use-forwarded-headers", func() { f := framework.NewDefaultFramework("forwarded-headers") setting := "use-forwarded-headers" diff --git a/test/e2e/settings/geoip2.go b/test/e2e/settings/geoip2.go index 78d444023e06..8ba8c917749d 100644 --- a/test/e2e/settings/geoip2.go +++ b/test/e2e/settings/geoip2.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Geoip2", func() { +var _ = framework.DescribeSetting("Geoip2", func() { f := framework.NewDefaultFramework("geoip2") host := "geoip2" diff --git a/test/e2e/settings/global_access_block.go b/test/e2e/settings/global_access_block.go index 61d1a1b5a17a..e5a52e89f3c7 100644 --- a/test/e2e/settings/global_access_block.go +++ b/test/e2e/settings/global_access_block.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Global access block", func() { +var _ = framework.DescribeSetting("[Security] block-*", func() { f := framework.NewDefaultFramework("global-access-block") host := "global-access-block" @@ -47,8 +47,6 @@ var _ = framework.IngressNginxDescribe("Global access block", func() { strings.Contains(cfg, "deny 10.0.0.0/8;") }) - // This test works for minikube, but may have problems with real kubernetes clusters, - // especially if connection is done via Internet. In this case, the test should be disabled/removed. resp, _, errs := gorequest.New(). Get(f.GetURL(framework.HTTP)). Set("Host", host). diff --git a/test/e2e/settings/global_external_auth.go b/test/e2e/settings/global_external_auth.go index c6ae0bc389dd..8cedde762601 100755 --- a/test/e2e/settings/global_external_auth.go +++ b/test/e2e/settings/global_external_auth.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Global External Auth", func() { +var _ = framework.DescribeSetting("[Security] global-auth-url", func() { f := framework.NewDefaultFramework("global-external-auth") host := "global-external-auth" diff --git a/test/e2e/settings/ingress_class.go b/test/e2e/settings/ingress_class.go index e96916c58283..b3eae73ce070 100644 --- a/test/e2e/settings/ingress_class.go +++ b/test/e2e/settings/ingress_class.go @@ -30,7 +30,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Ingress class", func() { +var _ = framework.IngressNginxDescribe("[Flag] ingress-class", func() { f := framework.NewDefaultFramework("ingress-class") BeforeEach(func() { diff --git a/test/e2e/settings/listen_nondefault_ports.go b/test/e2e/settings/listen_nondefault_ports.go index 8e6f7903e56c..7c4a55943a18 100644 --- a/test/e2e/settings/listen_nondefault_ports.go +++ b/test/e2e/settings/listen_nondefault_ports.go @@ -30,7 +30,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Listen on nondefault ports", func() { +var _ = framework.IngressNginxDescribe("[Flag] custom HTTP and HTTPS ports", func() { host := "forwarded-headers" diff --git a/test/e2e/settings/lua_shared_dicts.go b/test/e2e/settings/lua_shared_dicts.go index 01aeaffb3264..1412e612ef17 100644 --- a/test/e2e/settings/lua_shared_dicts.go +++ b/test/e2e/settings/lua_shared_dicts.go @@ -23,7 +23,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("LuaSharedDict", func() { +var _ = framework.DescribeSetting("[Lua] lua-shared-dicts", func() { f := framework.NewDefaultFramework("lua-shared-dicts") host := "lua-shared-dicts" diff --git a/test/e2e/settings/main_snippet.go b/test/e2e/settings/main_snippet.go index 0a7d4e4cc04b..2bd764c2535e 100644 --- a/test/e2e/settings/main_snippet.go +++ b/test/e2e/settings/main_snippet.go @@ -24,7 +24,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Main Snippet", func() { +var _ = framework.DescribeSetting("main-snippet", func() { f := framework.NewDefaultFramework("main-snippet") mainSnippet := "main-snippet" diff --git a/test/e2e/settings/modsecurity_snippet.go b/test/e2e/settings/modsecurity_snippet.go index 399002f5ebab..3c396586e1c9 100644 --- a/test/e2e/settings/modsecurity_snippet.go +++ b/test/e2e/settings/modsecurity_snippet.go @@ -24,7 +24,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Modsecurity Snippet", func() { +var _ = framework.DescribeSetting("[Security] modsecurity-snippet", func() { f := framework.NewDefaultFramework("modsecurity-snippet") It("should add value of modsecurity-snippet setting to nginx config", func() { diff --git a/test/e2e/settings/multi_accept.go b/test/e2e/settings/multi_accept.go index 94d1349fe745..b5c33c6cf3aa 100644 --- a/test/e2e/settings/multi_accept.go +++ b/test/e2e/settings/multi_accept.go @@ -24,7 +24,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Multi Accept", func() { +var _ = framework.DescribeSetting("enable-multi-accept", func() { multiAccept := "enable-multi-accept" f := framework.NewDefaultFramework(multiAccept) diff --git a/test/e2e/settings/no_auth_locations.go b/test/e2e/settings/no_auth_locations.go index 95bef6c0248e..60486fee6ceb 100644 --- a/test/e2e/settings/no_auth_locations.go +++ b/test/e2e/settings/no_auth_locations.go @@ -32,7 +32,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("No Auth locations", func() { +var _ = framework.DescribeSetting("[Security] no-auth-locations", func() { f := framework.NewDefaultFramework("no-auth-locations") setting := "no-auth-locations" diff --git a/test/e2e/settings/pod_security_policy.go b/test/e2e/settings/pod_security_policy.go index b7cbf5bd001f..e080df1c3339 100644 --- a/test/e2e/settings/pod_security_policy.go +++ b/test/e2e/settings/pod_security_policy.go @@ -17,7 +17,6 @@ limitations under the License. package settings import ( - "fmt" "net/http" "strings" @@ -39,7 +38,7 @@ const ( ingressControllerPSP = "ingress-controller-psp" ) -var _ = framework.IngressNginxDescribe("Pod Security Policies", func() { +var _ = framework.IngressNginxDescribe("[Security] Pod Security Policies", func() { f := framework.NewDefaultFramework("pod-security-policies") BeforeEach(func() { @@ -49,7 +48,7 @@ var _ = framework.IngressNginxDescribe("Pod Security Policies", func() { Expect(err).NotTo(HaveOccurred(), "creating Pod Security Policy") } - role, err := f.KubeClientSet.RbacV1().ClusterRoles().Get(fmt.Sprintf("nginx-ingress-clusterrole-%v", f.Namespace), metav1.GetOptions{}) + role, err := f.KubeClientSet.RbacV1().Roles(f.Namespace).Get("nginx-ingress-controller", metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred(), "getting ingress controller cluster role") Expect(role).NotTo(BeNil()) @@ -60,7 +59,7 @@ var _ = framework.IngressNginxDescribe("Pod Security Policies", func() { Verbs: []string{"use"}, }) - _, err = f.KubeClientSet.RbacV1().ClusterRoles().Update(role) + _, err = f.KubeClientSet.RbacV1().Roles(f.Namespace).Update(role) Expect(err).NotTo(HaveOccurred(), "updating ingress controller cluster role to use a pod security policy") // update the deployment just to trigger a rolling update and the use of the security policy diff --git a/test/e2e/settings/pod_security_policy_volumes.go b/test/e2e/settings/pod_security_policy_volumes.go index 3dee8d677994..02e423cc8b5b 100644 --- a/test/e2e/settings/pod_security_policy_volumes.go +++ b/test/e2e/settings/pod_security_policy_volumes.go @@ -17,7 +17,6 @@ limitations under the License. package settings import ( - "fmt" "net/http" "strings" @@ -35,7 +34,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Pod Security Policies with volumes", func() { +var _ = framework.IngressNginxDescribe("[Security] Pod Security Policies with volumes", func() { f := framework.NewDefaultFramework("pod-security-policies-volumes") It("should be running with a Pod Security Policy", func() { @@ -45,7 +44,7 @@ var _ = framework.IngressNginxDescribe("Pod Security Policies with volumes", fun Expect(err).NotTo(HaveOccurred(), "creating Pod Security Policy") } - role, err := f.KubeClientSet.RbacV1().ClusterRoles().Get(fmt.Sprintf("nginx-ingress-clusterrole-%v", f.Namespace), metav1.GetOptions{}) + role, err := f.KubeClientSet.RbacV1().Roles(f.Namespace).Get("nginx-ingress-controller", metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred(), "getting ingress controller cluster role") Expect(role).NotTo(BeNil()) @@ -56,7 +55,7 @@ var _ = framework.IngressNginxDescribe("Pod Security Policies with volumes", fun Verbs: []string{"use"}, }) - _, err = f.KubeClientSet.RbacV1().ClusterRoles().Update(role) + _, err = f.KubeClientSet.RbacV1().Roles(f.Namespace).Update(role) Expect(err).NotTo(HaveOccurred(), "updating ingress controller cluster role to use a pod security policy") err = framework.UpdateDeployment(f.KubeClientSet, f.Namespace, "nginx-ingress-controller", 1, diff --git a/test/e2e/settings/proxy_host.go b/test/e2e/settings/proxy_host.go index ca6198a62332..11dbf0566e0c 100644 --- a/test/e2e/settings/proxy_host.go +++ b/test/e2e/settings/proxy_host.go @@ -29,7 +29,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Proxy host variable", func() { +var _ = framework.IngressNginxDescribe("Dynamic $proxy_host", func() { test := "proxy-host" f := framework.NewDefaultFramework(test) diff --git a/test/e2e/settings/proxy_protocol.go b/test/e2e/settings/proxy_protocol.go index 60038a735e11..cd9a902185a6 100644 --- a/test/e2e/settings/proxy_protocol.go +++ b/test/e2e/settings/proxy_protocol.go @@ -28,7 +28,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Proxy Protocol", func() { +var _ = framework.DescribeSetting("use-proxy-protocol", func() { f := framework.NewDefaultFramework("proxy-protocol") setting := "use-proxy-protocol" diff --git a/test/e2e/settings/server_tokens.go b/test/e2e/settings/server_tokens.go index 27f96ff7469c..def1eac2a7a0 100644 --- a/test/e2e/settings/server_tokens.go +++ b/test/e2e/settings/server_tokens.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Server Tokens", func() { +var _ = framework.DescribeSetting("server-tokens", func() { f := framework.NewDefaultFramework("server-tokens") serverTokens := "server-tokens" diff --git a/test/e2e/settings/tls.go b/test/e2e/settings/tls.go index b692e496d69c..22f408585ed2 100644 --- a/test/e2e/settings/tls.go +++ b/test/e2e/settings/tls.go @@ -34,7 +34,7 @@ func noRedirectPolicyFunc(gorequest.Request, []gorequest.Request) error { return http.ErrUseLastResponse } -var _ = framework.IngressNginxDescribe("Settings - TLS)", func() { +var _ = framework.DescribeSetting("[SSL] TLS protocols, ciphers and headers)", func() { f := framework.NewDefaultFramework("settings-tls") host := "settings-tls" diff --git a/test/e2e/ssl/http_redirect.go b/test/e2e/ssl/http_redirect.go index 9274d93ec011..ae24260c5c84 100644 --- a/test/e2e/ssl/http_redirect.go +++ b/test/e2e/ssl/http_redirect.go @@ -27,7 +27,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("sslredirect", func() { +var _ = framework.IngressNginxDescribe("[SSL] redirect to HTTPS", func() { f := framework.NewDefaultFramework("sslredirect") BeforeEach(func() { diff --git a/test/e2e/ssl/secret_update.go b/test/e2e/ssl/secret_update.go index 407f1548ceb3..2b3abf00be8a 100644 --- a/test/e2e/ssl/secret_update.go +++ b/test/e2e/ssl/secret_update.go @@ -32,7 +32,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("SSL", func() { +var _ = framework.IngressNginxDescribe("[SSL] secret update", func() { f := framework.NewDefaultFramework("ssl") BeforeEach(func() { diff --git a/test/e2e/status/update.go b/test/e2e/status/update.go index c744c33cffd6..03d6cd835334 100644 --- a/test/e2e/status/update.go +++ b/test/e2e/status/update.go @@ -34,7 +34,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("Status Update [Status]", func() { +var _ = framework.IngressNginxDescribe("[Status] status update", func() { f := framework.NewDefaultFramework("status-update") host := "status-update" address := getHostIP() @@ -45,20 +45,23 @@ var _ = framework.IngressNginxDescribe("Status Update [Status]", func() { err = framework.UpdateDeployment(f.KubeClientSet, f.Namespace, "nginx-ingress-controller", 1, func(deployment *appsv1.Deployment) error { - args := deployment.Spec.Template.Spec.Containers[0].Args - args = append(args, fmt.Sprintf("--apiserver-host=http://%s:%d", address.String(), port)) - args = append(args, "--publish-status-address=1.1.0.0") + args := []string{} // flags --publish-service and --publish-status-address are mutually exclusive - var index int - for k, v := range args { + + for _, v := range deployment.Spec.Template.Spec.Containers[0].Args { if strings.Contains(v, "--publish-service") { - index = k - break + continue } + + if strings.Contains(v, "--update-status") { + continue + } + + args = append(args, v) } - if index > -1 { - args[index] = "" - } + + args = append(args, fmt.Sprintf("--apiserver-host=http://%s:%d", address.String(), port)) + args = append(args, "--publish-status-address=1.1.0.0") deployment.Spec.Template.Spec.Containers[0].Args = args _, err := f.KubeClientSet.AppsV1().Deployments(f.Namespace).Update(deployment) @@ -103,7 +106,7 @@ var _ = framework.IngressNginxDescribe("Status Update [Status]", func() { } }() - err = wait.Poll(10*time.Second, 4*time.Minute, func() (done bool, err error) { + err = wait.Poll(5*time.Second, 4*time.Minute, func() (done bool, err error) { ing, err = f.KubeClientSet.NetworkingV1beta1().Ingresses(f.Namespace).Get(host, metav1.GetOptions{}) if err != nil { return false, nil diff --git a/test/e2e/tcpudp/tcp.go b/test/e2e/tcpudp/tcp.go index 20e82c7c6037..35eb78493a7a 100644 --- a/test/e2e/tcpudp/tcp.go +++ b/test/e2e/tcpudp/tcp.go @@ -34,7 +34,7 @@ import ( "k8s.io/ingress-nginx/test/e2e/framework" ) -var _ = framework.IngressNginxDescribe("TCP Feature", func() { +var _ = framework.IngressNginxDescribe("[TCP] tcp-services", func() { f := framework.NewDefaultFramework("tcp") It("should expose a TCP service", func() { @@ -62,7 +62,7 @@ var _ = framework.IngressNginxDescribe("TCP Feature", func() { svc, err := f.KubeClientSet. CoreV1(). Services(f.Namespace). - Get("ingress-nginx", metav1.GetOptions{}) + Get("nginx-ingress-controller", metav1.GetOptions{}) Expect(err).To(BeNil(), "unexpected error obtaining ingress-nginx service") Expect(svc).NotTo(BeNil(), "expected a service but none returned") @@ -121,7 +121,7 @@ var _ = framework.IngressNginxDescribe("TCP Feature", func() { svc, err := f.KubeClientSet. CoreV1(). Services(f.Namespace). - Get("ingress-nginx", metav1.GetOptions{}) + Get("nginx-ingress-controller", metav1.GetOptions{}) Expect(err).To(BeNil(), "unexpected error obtaining ingress-nginx service") Expect(svc).NotTo(BeNil(), "expected a service but none returned") diff --git a/test/e2e/wait-for-nginx.sh b/test/e2e/wait-for-nginx.sh index e7698d0b2dfe..bf4197dc78ed 100755 --- a/test/e2e/wait-for-nginx.sh +++ b/test/e2e/wait-for-nginx.sh @@ -36,50 +36,160 @@ function on_exit { } trap on_exit EXIT -CLUSTER_WIDE="$DIR/cluster-wide-$NAMESPACE" +cat << EOF | kubectl apply --namespace=$NAMESPACE -f - +# Required for e2e tcp tests +kind: ConfigMap +apiVersion: v1 +metadata: + name: tcp-services + namespace: $NAMESPACE + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + +--- + +# Source: nginx-ingress/templates/controller-role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + name: nginx-ingress-controller +rules: + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - "" + resources: + - configmaps + - pods + - secrets + - endpoints + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - update + - watch + - apiGroups: + - extensions + - "networking.k8s.io" # k8s 1.14+ + resources: + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - extensions + - "networking.k8s.io" # k8s 1.14+ + resources: + - ingresses/status + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + resourceNames: + - ingress-controller-leader-nginx + verbs: + - get + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - apiGroups: + - "" + resources: + - endpoints + verbs: + - create + - get + - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +# Source: nginx-ingress/templates/controller-rolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + name: nginx-ingress-controller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: nginx-ingress-controller +subjects: + - kind: ServiceAccount + name: nginx-ingress + namespace: $NAMESPACE -mkdir "$CLUSTER_WIDE" - -cat << EOF > "$CLUSTER_WIDE/kustomization.yaml" -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: -- ../cluster-wide -nameSuffix: "-$NAMESPACE" -EOF - -OVERLAY="$DIR/overlay-$NAMESPACE" - -mkdir "$OVERLAY" - -cat << EOF > "$OVERLAY/kustomization.yaml" -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: $NAMESPACE -bases: -- ../overlay -- ../cluster-wide-$NAMESPACE EOF # Use the namespace overlay if it was requested if [[ ! -z "$NAMESPACE_OVERLAY" && -d "$DIR/namespace-overlays/$NAMESPACE_OVERLAY" ]]; then echo "Namespace overlay $NAMESPACE_OVERLAY is being used for namespace $NAMESPACE" - OVERLAY="$DIR/namespace-overlays/$NAMESPACE" - mkdir "$OVERLAY" - cat << EOF > "$OVERLAY/kustomization.yaml" -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: $NAMESPACE -bases: -- ../../namespace-overlays/$NAMESPACE_OVERLAY -- ../../cluster-wide-$NAMESPACE + helm install nginx-ingress stable/nginx-ingress \ + --namespace=$NAMESPACE \ + --wait \ + --values "$DIR/namespace-overlays/$NAMESPACE_OVERLAY/values.yaml" +else + cat << EOF | helm install nginx-ingress stable/nginx-ingress --namespace=$NAMESPACE --wait --values - +controller: + image: + repository: ingress-controller/nginx-ingress-controller + tag: 1.0.0-dev + scope: + enabled: true + config: + worker-processes: "1" + readinessProbe: + initialDelaySeconds: 1 + livenessProbe: + initialDelaySeconds: 1 + podLabels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + service: + type: NodePort + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + extraArgs: + tcp-services-configmap: $NAMESPACE/tcp-services + # e2e tests do not require information about ingress status + update-status: "false" + terminationGracePeriodSeconds: 1 + +defaultBackend: + enabled: false + +rbac: + create: false EOF -fi -kubectl apply --kustomize "$OVERLAY" - -# wait for the deployment and fail if there is an error before starting the execution of any test -kubectl rollout status \ - --request-timeout=3m \ - --namespace $NAMESPACE \ - deployment nginx-ingress-controller +fi