Commit graph

63 commits

Author SHA1 Message Date
Marco Ebert
75c77e5dc3
Metrics: Disable by default. (#12095) 2024-10-07 20:34:22 +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
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
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
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
guessi
788b3606b1
Keep project name display aligned (#9920) 2023-05-05 09:31:13 -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
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
Aleksandr Lebedev
69b3e7e8c1
Update command line arguments documentation (#9224)
* update cli-arguents.md with latest version flags.go

* correct punctuation in pkg/flag/flags.go
2022-12-26 13:23:26 -08:00
Dmitry Bashkatov
e6ff97fbbe
Consistent prometheus metric names and documentation (#8728)
* clean prometheus metrics

- add new histogram metrics with consistent names
- deprecate summary metrics with inconsistent names

* update prometheus metrics tests

* remove ingress_upstream_header_seconds metric

It hasn't been released so it is safe. Use header_duration_seconds metric.

* add documentation on prometheus metrics
2022-09-30 08:00:36 -07:00
Edvin N
63edd3befd
Document internal-logger-address cli arg (#8873)
Signed-off-by: Edvin Norling <edvin.norling@xenit.se>

Signed-off-by: Edvin Norling <edvin.norling@xenit.se>
2022-08-22 16:14:09 -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
Ricardo Katz
89ed571d2a
Implement object deep inspector (#8456) 2022-04-11 07:06:07 -07: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
Bhumij Gupta
6d4c51c31f
Added docs for --ingress-class-by-name flag in the cli arguments page (#7624)
* Added docs for --ingress-class-by-name flag in the cli arguments page

Signed-off-by: bhumijgupta <bhumijgupta@gmail.com>

* Updated docs to match the flag description in code

Signed-off-by: bhumijgupta <bhumijgupta@gmail.com>
2021-12-23 13:32:30 -08:00
Reinhard Nägele
e9c297e74d
Fix names in documentation (#7940)
* Fix names in documentation

This fixes the documentation to reflect the name change from
`nginx-ingress` to `ingress-nginx`.

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>

* Revert accidental changelog update

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
2021-11-28 13:11:22 -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
FBLGit
a714fb69db
This PR: (#7514)
<!--- Provide a general summary of your changes in the Title above --->
<!--- Why is this change required? What problem does it solve? -->

Introduces the CLI command flag `--disable-full-test`

By default, it doesn't alter the current behavior of the tests performed by the admission controller.
With or Without the flag, a full checkOverlap is actioned, without any alteration
and the object `pcfg` is created with the whole set of ingreses.

If the flag is set to true, it does manipulate the size of `pcfg` up to the content of $this single ingress.

This is achieved by overriding pcfg content by just the last slice that got recently appended to the object `ings`
```
	if n.cfg.DisableFullValidationTest {
		_, _, pcfg = n.getConfiguration(ings[len(ings)-1:])
	}
```

The following steps of generateTemplate and testTemplate are significally reduced to a signle scenario
```
    content, err := n.generateTemplate(cfg, *pcfg)
    ...
    err = n.testTemplate(content)
```

This flag doesn't avoid the proper testing of collisions, neither bad syntaxis within the rendered
configuration of the ingress.

But it does eliminate a scenario, which I wasn't able to produce, where by for some reason even proper rendering
and valid values, without collisions of host/path may end into an invalid nginx.conf

The reasoning for this Feature is:
- Test duration increases by the number of ingresses in the cluster.
- File size grows to very important numbers 150-200Mb on clusters with just 2000~ ingresses.
- Tests in that scenario, takes approximately 20s using the last 0.48.1 improvements
- Produces a considerable memory consumption, as well as CPU, compute, that affects directly the containers
  that serve traffic.

Since the flag is trully optional, and by default is disabled I fell as a good thing to have that can definitively
help on large-scale scenarios that still want to have a reasonable set of tests in place at a lower cost.

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

<!--- 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. -->
Tested with the build kit the following scenarios on a cluster with 1000~ ingresses:
- With Flag Disabled or Flag, not present (current status as per 0.48.1)

collision scenario (wrong snippet content):
`kubectl apply -f ../collision-syntax.yaml  0.18s user 0.05s system 3% cpu 6.639 total`

collisions scenario (duplicated host):
`kubectl apply -f ../collision-host.yaml  0.17s user 0.05s system 3% cpu 6.245 total`

create/update:
`kubectl apply -f ing-215.yaml  0.16s user 0.05s system 3% cpu 5.845 total`

- With Flag Enabled (true):
collision scenario (wrong snippet content):
`kubectl apply -f ../collision.yaml  0.18s user 0.02s system 57% cpu 0.347 total`

collision scenario (duplicated host):
`kubectl apply -f ../collision.yaml  0.21s user 0.06s system 85% cpu 0.318 total`

create/update:
`kubectl apply -f ing-973.yaml  0.17s user 0.03s system 72% cpu 0.271 total`

As part of the test, I did verified that the created nginx for the test was of a smaller size, and that it didnt affect negatively the final nginx.conf (of a much larger side) where this was merged by the next steps in place after the validation. I couldn't observe any other change in the behaviour and so far the routine looks simple and non harmful.

<!--- 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! -->
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I've read the [CONTRIBUTION](https://github.com/kubernetes/ingress-nginx/blob/main/CONTRIBUTING.md) guide
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

For the test part, I would need to understand the placement and test case that this would require, I wasn't able to see an existing scenario for this
2021-09-07 10:53:16 -07:00
Maksim Nabokikh
4c4013904a
Add a flag to specify address to bind the healthz server (#7541)
* Add a flag to specify address to bind the healthz server

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

* Add healthz host to the helm chart

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

* Apply suggestions from code review

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
2021-08-26 05:13:23 -07:00
Sergey Shakuto
45995525e7 Retry to download maxmind DB if it fails (#7242)
* Retry to download maxmind DB if it fails.

Signed-off-by: Sergey Shakuto <sshakuto@infoblox.com>

* Add retries count arg, move retry logic into DownloadGeoLite2DB function

Signed-off-by: Sergey Shakuto <sshakuto@infoblox.com>

* Reorder parameters in DownloadGeoLite2DB

Signed-off-by: Sergey Shakuto <sshakuto@infoblox.com>

* Remove hardcoded value

Signed-off-by: Sergey Shakuto <sshakuto@infoblox.com>
2021-08-10 11:24:39 -07:00
AnaClaudia
ef714ae52f Allow multiple publish status addresses 2021-02-26 16:57:54 -05:00
Björn Carlsson
54b13bd216 Add flag to allow setting a shutdown grace period 2021-01-27 14:09:04 +01:00
Josh Soref
a8728f3d2c Spelling 2020-12-15 16:10:48 -05:00
Tore Lønøy
903e511b9d fix: log warning if empty ingress class is monitored. Improve docs related to --ingress-class 2020-08-21 09:25:43 +02:00
Mason Staugler
a3f2be6b90 Fixup docs for the ingress-class flag.
According to this issue, there is no way to handle all ingress classes.

https://github.com/kubernetes/ingress-nginx/issues/3101
2020-06-26 13:12:48 -04:00
Manuel Alejandro de Brito Fontes
9c6873a55d Remove deprecated flags and update docs 2020-04-12 10:07:33 -04:00
Manuel Alejandro de Brito Fontes
2c5819e1b3
Add flag to allow custom ingress status update intervals (#5050) 2020-02-10 16:52:50 -03:00
Matthew Wickman
ad17d71387 Adding some documentation about the use of metrics-per-host and enable-metrics cmd line flags 2019-10-17 17:22:49 -06:00
Manuel Alejandro de Brito Fontes
d5d2b4037c
Fix ports collision when hostNetwork=true (#4617) 2019-09-28 17:30:57 -03:00
Oguzhan Inan
cbc5d3a917
duplicate argument "--disable-catch-all" 2019-07-22 14:48:23 +03:00
Elvin Efendi
cd25a0c17a adjust docs 2019-07-01 10:24:09 -04:00
Thibault Jamet
1cd17cd12c
Implement a validation webhook
In case some ingress have a syntax error in the snippet configuration,
the freshly generated configuration will not be reloaded to prevent tearing down existing rules.
Although, once inserted, this configuration is preventing from any other valid configuration to be inserted as it remains in the ingresses of the cluster.
To solve this problem, implement an optional validation webhook that simulates the addition of the ingress to be added together with the rest of ingresses.
In case the generated configuration is not validated by nginx, deny the insertion of the ingress.

In case certificates are mounted using kubernetes secrets, when those
changes, keys are automatically updated in the container volume, and the
controller reloads it using the filewatcher.

Related changes:

- Update vendors
- Extract useful functions to check configuration with an additional ingress
- Update documentation for validating webhook
- Add validating webhook examples
- Add a metric for each syntax check success and errors
- Add more certificate generation examples
2019-04-18 19:07:04 +02:00
Elvin Efendi
1d59e4f1fe enable dynamic SSL mode by default 2019-03-17 14:58:06 -04:00
Alex Kursell
1e96671e26 Remove sort-backends flag from cli docs 2019-03-12 14:48:05 -04:00
Alex Kursell
68038eec63 Make sure cli-arguments doc is in alphabetical order 2019-03-12 14:43:05 -04:00
Alex Kursell
d8fe2d992b Remove useless nodeip call and deprecate --force-namespace-isolation 2019-03-11 18:19:13 -04:00
Manuel Alejandro de Brito Fontes
34b0580225
Replace Status port using a socket 2019-02-06 18:00:10 -03:00
Maxime Ginters
1678d99a03 Add --disable-catch-all option to disable catch-all server 2018-12-21 13:22:26 -05:00
Manuel Alejandro de Brito Fontes
6eac5785ac
Rever TCP/UDP documentation removal and links (#3456) 2018-11-21 23:24:34 -03:00
crystaljade
8f93b9847d
Update cli-arguments.md 2018-11-02 13:48:00 +08:00
crystaljade
b80540c3af
Update cli-arguments.md 2018-11-02 13:17:52 +08:00
samuela
decdf72f26 "diretly" typo (#3263)
* "diretly" typo
2018-10-27 08:17:45 -03:00
Hui Chen
b276800d2c remote the command args of enable-dynamic-configuration 2018-10-16 10:52:19 +08:00
Elvin Efendi
14815c546c update docs 2018-09-25 21:49:37 -04:00
Manuel de Brito Fontes
4ffe3a2fdd
Update mkdocs 2018-09-13 17:52:15 -03:00