Commit graph

131 commits

Author SHA1 Message Date
Fabián Sellés Rosa
9940cbb571
Merge e9664c2566 into de1a4c463c 2025-02-17 09:50:33 -08:00
Jurgen Goelen
29d1e2014b
Annotations: Reload on custom header changes. (#11709) 2025-01-09 12:36:31 -08:00
Fabián Sellés Rosa
e9664c2566 Add disable path overlap validation flag
## What this PR does / why we need it:

In https://github.com/kubernetes/ingress-nginx/issues/5651 there was a
request to throw an error when there are two ingresses defining the same
host and path, which was implemented as part of the validation webhook.

  Despite of this there are clear rules on the ingress controller that
describes what the controller would do in [such situation (the oldest
rule wins)](https://github.com/kubernetes/ingress-nginx/blob/main/docs/how-it-works.md?plain=1#L27)

  Some users are relying on this validation behaviour to prevent
misconfigurations, but there are use cases where allowing it, maybe
temporarily, is helpful. Those use cases includes:

  - Splitting large ingresses objects in smaller ones https://github.com/kubernetes/ingress-nginx/issues/10820
  - Moving ingress objects between namespaces without downtime (like when you transfer an ingress from team A that owns namespace A to team B that owns namespace B) https://github.com/kubernetes/ingress-nginx/issues/10090

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

  ## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] CVE Report (Scanner found CVE and adding report)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only

  ## Which issue/s this PR fixes

It might help with #10820

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

  ## How Has This Been Tested?

building an image and testing it in a local cluster, will update later
with some real life scenarios

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
  ## Checklist:

- [X] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [X] I've read the [CONTRIBUTION](https://github.com/kubernetes/ingress-nginx/blob/main/CONTRIBUTING.md) guide
- [X] I have added unit and/or e2e tests to cover my changes.
- [X] All new and existing tests passed.

Change-Id: I9d4124d1c36876b06d63100cd10988eaf2f41db9
2024-11-26 15:58:34 +01:00
Marco Ebert
75c77e5dc3
Metrics: Disable by default. (#12095) 2024-10-07 20:34:22 +01:00
Nathan Baulch
4f23049374
Fix minor typos (#11935) 2024-09-06 15:59:43 +01:00
Marco Ebert
e9f6c8e8f2
Security: Follow-up on recent changes. (#11874) 2024-08-26 21:09:16 +01:00
Jon Carl
034c3ccad4
Metrics: Add --metrics-per-undefined-host argument. (#11818)
Signed-off-by: Jon Carl <grounded042@joncarl.com>
2024-08-26 20:09:11 +01:00
Seonghyeon Cho
8b20427d02
Update maxmind post link about geolite2 license changes (#11861)
Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
2024-08-25 21:12:02 +01:00
Ricardo Katz
21cd966d1c
Remove global-rate-limit feature (#11851) 2024-08-25 21:03:29 +01:00
Sebastian Rabenhorst
ffee96c58c
Add native histogram support for histogram metrics (#9971)
Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
2024-08-23 17:32:48 +01:00
Ricardo Katz
7b4e4e2fa1
Enable security features by default (#11819) 2024-08-23 04:45:51 +01:00
James Strong
6c404a572d
Merge pull request #9816 from nickorlow/main
Generate correct output on NumCPU() when using cgroups2
2024-08-12 14:53:36 -04:00
Long Wu Yuan
5639979cb5
removed tlsv1 & tlsv1.1 (#11343) 2024-05-28 11:37:30 -07:00
Nicholas Orlowsky
b2d67ff92b
fix tests 2024-05-20 14:37:46 +02:00
Nicholas Orlowsky
ac0f6fcd39
fix lint errors 2024-05-18 02:44:18 +02:00
Nicholas Orlowsky
9e79a36020
Merge branch 'kubernetes:main' into main 2024-05-18 02:10:37 +02:00
Christian Groschupp
1f4ee0e235
feat: add annotation to allow to add custom response headers (#9742)
* add custom headers

Signed-off-by: Christian Groschupp <christian@groschupp.org>

* add tests

Signed-off-by: Christian Groschupp <christian@groschupp.org>

* add docs

* update copyright

* change comments

* add e2e test customheaders

* add custom headers validation

* remove escapeLiteralDollar filter

* validate value in custom headers

* add regex for header value

* fix annotation test

* Revert "remove escapeLiteralDollar filter"

This reverts commit ab48392b60dee4ce146a4c17e046849f9633c7fb.

* add annotationConfig

* fix test

* fix golangci-lint findings

* fix: add missung exp module

---------

Signed-off-by: Christian Groschupp <christian@groschupp.org>
2024-04-09 03:25:22 -07:00
Matheus Fidelis
7c8af4928b
Controller: Make Leader Election TTL configurable. (#11142)
* feature(leader_ttl): feature to customize ttl to leader be re-elected

* fix(review): docs
2024-03-28 06:36:23 -07:00
Matheus Fidelis
9b63559cbb
feature(leader_election): flag to disable leader election feature on controller (#11064) 2024-03-06 05:59:22 -08:00
Zadkiel Aharonian
44e550ea72
fix: remove tcpproxy copy error handling 2023-11-29 16:00:40 +00:00
chriss-de
ad406b64d8
Add override for proxy_intercept_errors when using Custom HTTP Errors (#9497)
* added proxy-intercept-errors config option

* fixed error when comparing locations

* fixed missing location config from annotation
added e2e test

* reversed logic for proxy-intercept-errors to disable-proxy-intercept-errors

* reversed logic to disable-proxy-intercept-errors

* reversed logic

* default has to be false

* put comment in same line as return

* run gofmt

* fixing wrong Boilerplate header

* updated code to new IngressAnnotation interface

* fixes to satisfy PR comments

* synced with upstream; fixed typo

* gofumpt disableproxyintercepterrors.go

* gofumpt
2023-11-17 05:43:54 +01:00
Ricardo Katz
30820a5acc
Deprecate opentracing (#10615) 2023-11-05 01:58:35 +01:00
Chen Chen
b3060bfbd0
Fix golangci-lint errors (#10196)
* Fix golangci-lint errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix dupl errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix comments

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix errcheck lint errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix assert in e2e test

Signed-off-by: z1cheng <imchench@gmail.com>

* Not interrupt the waitForPodsReady

Signed-off-by: z1cheng <imchench@gmail.com>

* Replace string with constant

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix comments

Signed-off-by: z1cheng <imchench@gmail.com>

* Revert write file permision

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
2023-08-31 00:36:48 -07:00
logica
dd6145b2d3
Bump k8s.io/component-base from 0.26.4 to 0.27.4 (Replace Topology Aware Hints with Topology Aware Routing) (#10282)
* Bump k8s.io/component-base from 0.26.4 to 0.27.4

Bumps [k8s.io/component-base](https://github.com/kubernetes/component-base) from 0.26.4 to 0.27.4.
- [Commits](https://github.com/kubernetes/component-base/compare/v0.26.4...v0.27.4)

---
updated-dependencies:
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* changed annotation to TopologyMode

* fixed documents

* fixed test

* using api constraint for test deployment options

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-11 07:17:27 -07:00
Ricardo Katz
c5f348ea2e
Implement annotation validation (#9673)
* Add validation to all annotations

* Add annotation validation for fcgi

* Fix reviews and fcgi e2e

* Add flag to disable cross namespace validation

* Add risk, flag for validation, tests

* Add missing formating

* Enable validation by default on tests

* Test validation flag

* remove ajp from list

* Finalize validation changes

* Add validations to CI

* Update helm docs

* Fix code review

* Use a better name for annotation risk
2023-07-21 20:32:07 -07:00
Nicholas Orlowsky
c23cc0c338
Merge branch 'kubernetes:main' into main 2023-07-16 22:48:37 -05:00
Nicholas Orlowsky
0f4d054c07
gofmt 2023-07-16 23:47:43 -04:00
Nicholas Orlowsky
8621dfc66d
fix e2e tests for cgroups 2023-07-16 19:02:37 -04:00
Nicholas Orlowsky
3814e1f01f
write e2e tests for cgroups 2023-07-16 18:58:58 -04:00
Nicholas Orlowsky
8f86603dbd
Merge branch 'main' of github.com:nickorlow/ingress-nginx 2023-07-16 13:18:51 -04:00
Nicholas Orlowsky
a9f9793a1f
update default value for period when not set 2023-07-16 13:18:32 -04:00
Chen Chen
d44a8e0045
Fix golang-ci linter errors (#10128)
* Fix golang-ci linter errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix gofmt errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Add nolint comment to defaults.Backend in Configuration

Signed-off-by: z1cheng <imchench@gmail.com>

* Add #nosec comment to rand.New func

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix errcheck warnings

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix gofmt check

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix unit tests and comments

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
2023-07-03 05:50:52 -07:00
Jintao Zhang
cccba35005
Revert "Remove fastcgi feature" (#10081)
* Revert "Remove fastcgi feature (#9864)"

This reverts commit 90ed0ccdbe.

* revert fastcgi* annotations warning

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

---------

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2023-06-13 12:55:59 -07:00
Ricardo Katz
90ed0ccdbe
Remove fastcgi feature (#9864) 2023-06-11 13:33:47 -07:00
Nicholas Orlowsky
fddf4e034c fix formatting 2023-05-31 23:17:50 -05:00
Nicholas Orlowsky
c5dad5e461
removed e2e tests for cgroups2 and associated functions 2023-05-11 21:03:12 -04:00
Nicholas Orlowsky
6d96e111c8
try to figure out testing flags 2023-04-25 19:24:34 -05:00
Nicholas Orlowsky
3714c2c426
move error check 2023-04-25 10:19:07 -05:00
Nicholas Orlowsky
aa9a876217
typo 2023-04-24 11:34:21 -05:00
Nicholas Orlowsky
405a5aa44c
add some e2e tests (unfinished) + fix findMountPoint bug 2023-04-24 11:33:50 -05:00
Ricardo Katz
297036e169
Deprecate and remove influxdb feature (#9861) 2023-04-16 17:26:43 -07:00
Marco Cadetg
4e8d0b5836
Exclude socket metrics (#9770)
* exclude creation and exporting of socket metrics via flag

* make exclude metric naming more consistent

* fix connect time metric update

* add documentation

* e2e test

* improve creation of metric mapping
2023-04-11 01:01:18 -07:00
Nicholas Orlowsky
a080ea1f29
correct types 2023-03-31 00:58:43 -05:00
Nicholas Orlowsky
7f6472617b
declarations to assignments 2023-03-31 00:53:34 -05:00
Nicholas Orlowsky
3ae35a045d
ran gofmt 2023-03-31 00:52:14 -05:00
Nicholas Orlowsky
221e85f6f2
added version detecting 2023-03-31 00:36:12 -05:00
Nicholas Orlowsky
e4a11295ab
file parsing for Cgroup2 2023-03-30 11:48:58 -05:00
Ehsan Saei
c8cb9167d3
feat: OpenTelemetry module integration (#9062)
* OpenTelemetry module integration

* e2e test

* e2e test fix

* default OpentelemetryConfig

* e2e values

* mount otel module for otel test only

* propagate IS_CHROOT

* propagate IS_CHROOT e2e test

* code doc

* comments

* golint

* opentelemetry doc

* zipkin

* zipkin

* typo

* update e2e test OpenTelemetry value

* use opentelemetry value

* revert merge conflict

* fix

* format

* review comments

* clean
2023-03-22 11:58:22 -07:00
cui fliter
82e836fbe8
fix some comments (#9688)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-03-05 11:00:57 -08:00
杨刚 (成都)
080c905fab
code clean for fsnotify (#9571)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-02-16 06:11:39 -08:00