Commit graph

727 commits

Author SHA1 Message Date
James Strong
e1a16f6e74
Update nginx base image in one place (#8400)
* update files to use one base image file

Signed-off-by: James Strong <strong.james.e@gmail.com>

* add chart test as well

Signed-off-by: James Strong <strong.james.e@gmail.com>

* update e2e-test image building

Signed-off-by: James Strong <strong.james.e@gmail.com>

* update e2e base image arg

Signed-off-by: James Strong <strong.james.e@gmail.com>

* add current e2e so test run

Signed-off-by: James Strong <strong.james.e@gmail.com>

* working on fixing build

* getting dev-env and make release to work

* test

* i think buildx is working on mac

* updates

* why docker for mac and linux cli differ

* fix target arch

* fix target arch

* fix loag issue

* fix issue

* update the chroot docker file

* fix docker base build

* mac is the issue

* env not getting to the e2e deployment.go file

* fix pull issue

* fix pull issue

* move test scripts into test folder

* clean up ci

* updates for PR

* remove unnesscary var
2022-07-08 09:27:47 -07:00
Long Wu Yuan
8baac4214a
changed to alpine-v3.16 (#8793) 2022-07-08 06:57:46 -07:00
Long Wu Yuan
e1a0701802
change sha e2etestrunner and echoserver (#8740) 2022-06-26 07:48:59 -07:00
Long Wu Yuan
3348cd71e0
updated baseimage sha (#8737) 2022-06-24 09:44:57 -07:00
Long Wu Yuan
bb1f9deafd
developing k6 perftest (#8581) 2022-06-23 08:41:42 -07:00
Long Wu Yuan
96b6228a6b
changed k8s.gcr.io to registry.k8s.io (#8667) 2022-06-10 04:01:52 -07:00
Long Wu Yuan
2fc8a62d1a
removed unavailable flag (#8681) 2022-06-09 10:03:42 -07:00
Ricardo Katz
bd1eb048b7
Improve path rule (#8623)
* Improve path rule

* Add nginx configuration tests

* Revert framework changes

* Add test to patched directives

* Fix root conf test

* Add comment in new function
2022-05-26 06:23:24 -07:00
Ricardo Katz
4dfb3f2e9a
Fix tls1.0 test (#8632)
* Fix tls1.0 test

* fix algorithm
2022-05-25 17:49:22 -07:00
Ricardo Katz
d20a8268b5
Bump testrunner image (#8631) 2022-05-24 12:21:24 -07:00
Ricardo Katz
ac60ed85ab
Bump nginx image to version without core directives (#8625) 2022-05-24 06:10:06 -07:00
Maksim Nabokikh
2c27e66cc7
feat: always set auth cookie (#8213)
* feat: always set auth cookie

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* feat: Add annotation to always set auth cookie

* Add annotation
* Add global configmap key
* Provide unit tests and e2e tests
* Fix e2e documentation autogen script

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Regenerate e2e tests

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2022-05-19 15:27:53 -07:00
Long Wu Yuan
fc58e92b39
replaced go get ginkgo with go install ginkgo for DIND environ (#8569) 2022-05-10 01:49:43 -07:00
Long Wu Yuan
415305d47b
added debug to trace testgrid fail & suppressed breaking warning for kubectl version (#8561) 2022-05-08 04:27:18 -07:00
Long Wu Yuan
ec1b01092e
added debug commands (#8553) 2022-05-06 04:09:05 -07:00
kszafran
3230638160
Update default allowed CORS headers (#8459)
X-CustomHeader looks more like an example than a header we would want to
accept in production. Added Range as a useful header that enables
operations on resources that can be fetched in chunks.
2022-05-04 05:11:51 -07:00
Long Wu Yuan
6d9a39eda7
changes for release v1.2.0 (#8491) 2022-04-21 19:36:13 -07:00
Long Wu Yuan
2e1a4790bb
changed nginx base img tag to img built with alpine3.14.6 (#8479) 2022-04-15 21:37:10 -07:00
Chris Shino
f9372aa495
added new auth-tls-match-cn annotation (#8434)
* added new auth-tls-match-cn annotation

* added few more tests
2022-04-15 12:59:10 -07:00
Ricardo Katz
81c2afd975
update base images and protobuf gomod (#8478) 2022-04-15 12:53:12 -07:00
sskserk
d4b9b486e6
Upstream keepalive time (#8319)
* nginx 1.19.10 keepalive_time parameter

* nginx v1.19.10 base image

* keepalive_time documentation

* base image

* restore base image

* e2e test

* replace default value in test
2022-04-15 04:09:10 -07:00
Ricardo Katz
89ed571d2a
Implement object deep inspector (#8456) 2022-04-11 07:06:07 -07:00
Ricardo Katz
5737f16663
Update dependencies (#8455)
* Update more dependencies

* Fix e2e test for new ProbeHandler
2022-04-10 08:58:05 -07:00
Ricardo Katz
3def835a6a
Jail/chroot nginx process inside controller container (#8337)
* Initial work on chrooting nginx process

* More improvements in chroot

* Fix charts and some file locations

* Fix symlink on non chrooted container

* fix psp test

* Add e2e tests to chroot image

* Fix logger

* Add internal logger in controller

* Fix overlay for chrooted tests

* Fix tests

* fix boilerplates

* Fix unittest to point to the right pid

* Fix PR review
2022-04-08 21:48:04 -07:00
Gabor Lekeny
83ce21b4dd
Add keepalive support for auth requests (#8219)
* Add keepalive support for auth requests

* Fix typo

* Address PR comments

* Log warning when auth-url contains variable in its host:port
* Generate upstream name without replacing dots to underscores in server name
* Add comment in the nginx template when the keepalive upstream block is referenced

* Workaround for auth_request module ignores keepalive in upstream block

* The `auth_request` module does not support HTTP keepalives in upstream block:
  https://trac.nginx.org/nginx/ticket/1579
* As a workaround we use ngx.location.capture but unfortunately it does not
  support HTTP/2 so `use-http2` configuration parameter is needed.

* Handle PR comments

* Address PR comments

* Handle invalid values for int parameters

* Handle PR comments

* Fix e2e test
2022-04-08 20:22:04 -07:00
LongWuYuan
b9f50e691d base img update for e2e-test-runner & opentelemetry 2022-04-01 17:07:08 +05:30
Aditya Kamath
f1cb2b73ca
update nginx base image to new alpine 3.14.4 build - try 2 (#8409)
* update nginx base image to new alpine 3.14.4 build

Signed-off-by: James Strong <strong.james.e@gmail.com>

* update test image

Signed-off-by: James Strong <strong.james.e@gmail.com>

* Update nginx base image

Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>

Co-authored-by: James Strong <strong.james.e@gmail.com>
2022-03-31 13:43:04 -07:00
Ana Claudia Riekstin
ba7f295538
Fix 50% split between canary and mainline tests (#8315)
* fix 50% canary test

* fix past tense

* after code review

* revert go.sum and go.mod

* run gofmt
2022-03-16 06:25:49 -07:00
Maksim Nabokikh
1e2ce80846
fix: deny locations with invalid auth-url annotation (#8256)
* fix: deny locations with invalid auth-url annotation

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Delete duplicate test

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2022-03-01 02:13:51 -08:00
Elvin Efendi
04035cc1c2
Do not validate ingresses with unknown ingress class in admission webhook endpoint. (#8221) 2022-02-06 12:28:51 -08:00
Damien Mathieu
dcd552ceb5
use functional options to reduce number of methods creating an EchoDeployment (#8199) 2022-02-02 05:12:22 -08:00
Jintao Zhang
53ac0ddd42
Using Go install for misspell (#8191)
* chore: using go install misspell

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>

* chore: fix typo

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2022-01-26 18:52:50 -08:00
Ricardo Katz
a17181e43e
Update go in runner and release v1.1.1 (#8120)
* Update go in runner and release v1.1.1

* Update build/run-in-docker.sh

Co-authored-by: Jintao Zhang <tao12345666333@163.com>

Co-authored-by: Jintao Zhang <tao12345666333@163.com>
2022-01-09 20:37:11 -08:00
Ricardo Katz
38c73233f3
Remove deprecated libraries, update other libs, add ci v1.23 (#8118) 2022-01-09 16:29:12 -08:00
Tobias Salzmann
ce9deaa332
Add stream-snippet as a ConfigMap and Annotation option (#8029)
* stream snippet

* gofmt -s
2021-12-23 11:46:30 -08:00
Moh Basher
fea7fed6da
Disable default modsecurity_rules_file if modsecurity-snippet is specified (#8021)
* Disabled default modsecurity_rules_file if modsecurity-snippet is specifed

The default modsecurity_rules_file overwrites the ModSecurity-snippet if it is specified with custom config settings like "SecRuleEngine On". This will not let Modsecurity be in blocking mode even if "SecRuleEngine On" is specified in the ModSecurity-snippet configuration

* Remove unnecessary comments

Only have the default Modsecurity conf settings in case Modsecurity configuration snippet is not present and remove unnecessary comments

* Fixed modsecurity default file only if Modsecurity snippet present

Fixed if condition  Modsecurity snippet present have modsecurity default config file

* Added e2e test to disabling modsecurity conf

Added e2e in case modsecurity-snippet enabled to disable settings in default modsecurity.conf

* Validate writing to a different location

Validate also modsecurity to write to a different location instead of the default directory

* Fixed the formatting

* Fixed if empty ModsecuritySnippet

* Fixed ModsecuritySnippet condition

* Fixed the condition also in ingress controller template

* Removed the default config condition  in ingress controller template

* Fixed the default config condition in ingress controller template

* Fixed pull-ingress-nginx-test

* Revert "Fixed the default config condition in ingress controller template"

This reverts commit 9d38eca40f.

* Revert template_test

* Adjusted the formating %v
2021-12-23 03:34:38 -08:00
Yecheng Fu
5cff197bc5
add canary-weight-total annotation (#6338) 2021-12-07 08:40:00 -08:00
Kamil Hristov
042e426b01
Improve admission e2e-tests (#7953)
Check if the message equals an expected value for checks without errors.
2021-11-28 18:33:22 -08:00
James Strong
d4a6ade65f
update default block list,docs, tests (#7942)
* update default block list,docs, tests

* fix config for admin test

* gofmt

* remove the err return
2021-11-23 09:06:17 -08:00
Ricardo Katz
b08d4278ad
Try to improve test speed (#7922) 2021-11-15 14:34:48 -08:00
zryfish
7203a0b8bd
support watch namespaces matched namespace selector (#7472)
skip caching namespaces at cluster scope if only watching single namespace

add --watch-namespace-selector in user guide

add e2e test
2021-11-12 11:46:28 -08:00
Ricardo Katz
67e13bf692
Add option to sanitize annotation inputs (#7874)
* Add option to sanitize annotation inputs

* Fix e2e tests after string sanitization

* Add proxy_pass and serviceaccount as denied values
2021-11-12 11:40:30 -08:00
Christopher Larivière
100057d0c5
fix missing \- in regex expression for CORS wildcard domain (#7904) 2021-11-11 10:26:08 -08:00
Christopher Larivière
65b8eeddec
Support cors-allow-origin with multiple origins (#7614)
* Add Initial support for multiple cors origins in nginx

- bump cluster version for `make dev-env`
- add buildOriginRegex function in nginx.tmpl
- add e2e 4 e2e tests for cors.go
- refers to feature request #5496

* add tests + use search to identify '*' origin

* add tests + use search to identify '*' origin

Signed-off-by: Christopher Larivière <lariviere.c@gmail.com>

* fix "should enable cors test" looking at improper values

* Modify tests and add some logic for origin validation

- add origin validation in cors ingress annotations
- add extra tests to validate regex
- properly escape regex using "QuoteMeta"
- fix some copy/paste errors

* add TrimSpace and length validation before adding a new origin

* modify documentation for cors and remove dangling comment

* add support for optional port mapping on origin

* support single-level wildcard subdomains + tests

* Remove automatic `*` fonctionality from incorrect origins

- use []string instead of basic string to avoid reparsing in template.go
- fix typo in docs
- modify template to properly enable only if the whole block is enabled
- modify cors parsing
- test properly by validating that the value returned is the proper
  origin
- update unit tests and annotation tests

* Re-add `*` when no cors origins are supplied + fix tests

- fix e2e tests to allow for `*`
- re-add `*` to cors parsing if trimmed cors-allow-origin is empty
(supplied but empty) and if it wasn't supplied at all.

* remove unecessary logic for building cors origin + remove comments

- add some edge cases in e2e tests
- rework logic for building cors origin

there was no need for logic in template.go for buildCorsOriginRegex
if there is a `*` it ill be short-circuited by first if.

if it's a wildcard domain or any domain (without a wildcard), it MUST
match the main/cors.go regex format.

if there's a star in a wildcard domain, it must be replaced with
`[A-Za-z0-9]+`

* add missing check in e2e tests
2021-11-02 12:31:42 -07:00
Rahil Patel
c8ab4dc307
add brotli-min-length configuration option (#7854)
* add `brotli-min-length` configuration option

* add e2e tests for brotli

* include check for expected content type

* fix header and format
2021-11-02 04:52:59 -07:00
Matthew Silverman
7d5452d00b
configmap: option to not trust incoming tracing spans (#7045)
* validate the sender of tracing spans

* add location-specific setting
2021-10-24 14:36:21 -07:00
Ricardo Katz
97e39e79e2
Add e2e test for non ingressclass enabled ingress (#7785) 2021-10-10 16:18:37 -07:00
Claudiu Belu
c0f61039e4
Updates E2E test images registry (#7704)
We're moving away from google.com gcp projects. These images are now on community-owned infra.
2021-09-27 09:42:18 -03:00
Ricardo Katz
6885ab2281
Update base nginx image to the corrected version (#7705) 2021-09-26 16:24:23 -07:00
Ricardo Katz
4fc57dcc49
Change enable-snippet to allow-snippet-annotation (#7670)
Signed-off-by: Ricardo Pchevuzinske Katz <rkatz@vmware.com>
2021-09-20 16:52:23 -07:00