Commit graph

300 commits

Author SHA1 Message Date
Boris Kreitchman
d1dc3e827f
Config/Annotations: Add proxy-busy-buffers-size. (#12433) 2024-12-05 18:10:00 +00: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
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
chengjoey
e5c29d1ce4
Controller: Fix panic in alternative backend merging. (#11789) 2024-08-13 01:37:37 -07: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
Tony Li
b4cae70b52
remove _ssl_expire_time_seconds metric by identifier (#9706)
Signed-off-by: xiayu.lyt <xiayu.lyt@alibaba-inc.com>
2024-04-08 12:32:21 -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
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
Ricardo Katz
cf889c6c47
Disable user snippets per default (#10393)
* Disable user snippets per default

* Enable snippet on tests
2023-09-10 20:02:10 -07: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
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
Ricardo Katz
1282345be2
Admission warning (#9975)
* Add warning feature in admission code

* Apply suggestions from code review

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Add deprecation and validation path notice

---------

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-05-25 07:56:52 -07:00
Ricardo Katz
c540b58474
Validate path types (#9967)
* Validate path types

* Fix the year of header

* Update internal/ingress/controller/config/config.go

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

---------

Co-authored-by: Jintao Zhang <tao12345666333@163.com>
2023-05-20 04:58:18 -07: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
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
Sergei Kaznakhovskii
e4a66fd2f6
Fix canary-weight-total annotation ignored in rule backends (#9729)
* Missed canary weight total

    - added canary weight total for spec rules

* - added e2e test
2023-03-21 06:47:09 -07:00
Mitsuo Heijo
c5d73d58c6
migrate mitchellh/hashstructure to v2 (#9651) 2023-02-22 07:27:57 -08:00
Fish-pro
ac8dd3dd53
sets.String is deprecated: use generic Set instead. new ways: s1 := Set[string]{} s2 := New[string]() (#9589)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-16 06:05:48 -08:00
James Strong
01c9a2bf25
Revert Implement pathType validation (#9511) (#9607)
Signed-off-by: James Strong <strong.james.e@gmail.com>
2023-02-12 22:57:29 -08:00
James Strong
7d1c47ab54
Switch logic on path type validation and setting it to false (#9543)
* update path type validation to be false and update e2e test scripts

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

* update to make tests clear

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

* update test params

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

* Adding else per pr comments

Signed-off-by: James Strong <james.strong@chainguard.dev>

---------

Signed-off-by: James Strong <strong.james.e@gmail.com>
Signed-off-by: James Strong <james.strong@chainguard.dev>
2023-01-31 17:09:06 -08:00
Ricardo Katz
da98c744b9
Implement pathType validation (#9511) 2023-01-16 23:51:23 -03:00
Makhonin Alexey
39b5ce844b
Add new prometheus metric for orphaned ingress (#8230)
* Add new metric for orhaned ingress

* Fix const labels

* Fix after rebase
2023-01-16 04:22:51 -08:00
Tomas Hulata
5b2a9475dc
feat: support topology aware hints (#9165)
* support topology aware hints

Signed-off-by: tombokombo <tombo@sysart.tech>

* add flag to enable topology and fixes

Signed-off-by: tombokombo <tombo@sysart.tech>

* update readme

Signed-off-by: tombokombo <tombo@sysart.tech>

* add e2e test

Signed-off-by: tombokombo <tombo@sysart.tech>

* isolate topology test

Signed-off-by: tombokombo <tombo@sysart.tech>

* gofmt fix

Signed-off-by: tombokombo <tombo@sysart.tech>

Signed-off-by: tombokombo <tombo@sysart.tech>
2023-01-15 18:46:50 -08:00
Marcus Noble
e7bee5308e
added option to disable sync event creation (#8528)
* added option to disable event creation

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>

* Re-trigger github workflows

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2023-01-09 06:37:31 -08:00
Phil Nichol
8ed3a27e25
Adding ipdenylist annotation (#8795)
* feat: Add support for IP Deny List

* fixed gomod

* Update package

* go mod tidy

* Revert "go mod tidy"

This reverts commit e6a837e1e7.

* update ginko version

* Updates e2e tests

* fix test typo
2023-01-08 14:43:28 -08:00
Matthias Neugebauer
26fe69cb47
Add annotation for setting sticky cookie domain (#9088)
This adds the new annotation `nginx.ingress.kubernetes.io/session-cookie-domain`
for setting the cookie `Domain` attribute of the sticky cookie.

Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org>

Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org>
2022-09-28 07:28:37 -07:00
Tomas Hulata
3579ed0487
feat: switch from endpoints to endpointslices (#8890)
* endpointslices

Signed-off-by: tombokombo <tombo@sysart.tech>

* cleanup

Signed-off-by: tombokombo <tombo@sysart.tech>

* fix rbac

Signed-off-by: tombokombo <tombo@sysart.tech>

* fix comments

Signed-off-by: tombokombo <tombo@sysart.tech>

* cleanup store, add store tests

Signed-off-by: tombokombo <tombo@sysart.tech>

* fix copyright date

Signed-off-by: tombokombo <tombo@sysart.tech>

Signed-off-by: tombokombo <tombo@sysart.tech>
2022-09-23 12:38:04 -07:00
Harpreet singh
69318355b1
Fix defaultServer backend update for Ingress with defaultBackend. (#8825) 2022-08-22 16:26:23 -07:00
Zadkiel Aharonian
d5893d4a2e
fix(controller): typo in catch-all CheckIngress error message (#8905) 2022-08-22 16:20:16 -07:00
Ricardo Katz
4508493dfe
Clean old code and move helper functions (#8946) 2022-08-21 14:21:51 -07:00
Ricardo Katz
c86d50ecef
Move APIs to be used by both controller and configurer (#8854) 2022-07-21 17:32:48 -07:00
Filip Petkovski
4da96ea26a
Implement reporting status classes in metrics (#8548)
This commit introduces a backwards compatible command line option
--report-status-classes which will enable reporting response status classes
(2xx, 3xx..) instead of status codes in exported metrics.
2022-05-21 11:18:00 -07:00
David Shay
47a266df45
Fix for buggy ingress sync with retries (#8325) 2022-04-11 11:42:06 -07:00
Ricardo Katz
89ed571d2a
Implement object deep inspector (#8456) 2022-04-11 07:06:07 -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
Thibault Jamet
1e66a54974
Add a certificate info metric (#8253)
When the ingress controller loads certificates  (new ones or following a
secret update), it performs a series of check to ensure its validity.

In our systems, we detected a case where, when the secret object is
compromised, for example when the certificate does not match the secret
key, different pods of the ingress controller are serving a different
version of the certificate.

This behaviour is due to the cache mechanism of the ingress controller,
keeping the last known certificate in case of corruption. When this
happens, old ingress-controller pods will keep serving the old one,
while new pods, by failing to load the corrupted certificates, would
use the default certificate, causing invalid certificates for its
clients.

This generates a random error on the client side, depending on the
actual pod instance it reaches.

In order to allow detecting occurences of those situations, add a metric
to expose, for all ingress controlller pods, detailed informations of
the currently loaded certificate.

This will, for example, allow setting an alert when there is a
certificate discrepency across all ingress controller pods using a query
similar to `sum(nginx_ingress_controller_ssl_certificate_info{host="name.tld"})by(serial_number)`

This also allows to catch other exceptions loading certificates (failing
to load the certificate from the k8s API, ...

Co-authored-by: Daniel Ricart <danielricart@users.noreply.github.com>

Co-authored-by: Daniel Ricart <danielricart@users.noreply.github.com>
2022-02-24 07:08:32 -08:00
Yang
53a232f829
webhook: remove useless code. (#8236)
* webhook: remove useless code

Signed-off-by: SpecialYang <940129520@qq.com>

* Remove duplicated codec
2022-02-13 10:25:47 -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
Aditya Kamath
2aa34202c1
Allow to configure delay before controller exits (#8143)
* Allow to configure delay before controller exits

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

* Address comments

Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
2022-01-17 15:24:49 -08:00
serge-r
c0098f305c
Add ability to use custom prometheus buckets (#7171) 2022-01-14 17:27:41 -08:00
Josh Soref
079d0cd415
Report expired certificates (#8045) (#8046)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-23 12:02:29 -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
Yecheng Fu
5cff197bc5
add canary-weight-total annotation (#6338) 2021-12-07 08:40:00 -08:00