Ingress NGINX Controller for Kubernetes
Find a file
Jacek Nykis 61e699267c
Improve HTTP method label handling in prometheus metrics
## What this PR does / why we need it:

This PR addresses #10208 by checking whether the request method is valid.
For invalid methods we set `method="invalid_method"` label so that operators
can stil see traffic in the metrics but without unbound label value.

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which addresses an issue)
- [ ] 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

## How Has This Been Tested?

I tested by building the image locally using `make build && make image`
and running the image in minikube.
The change has a fairly narrow scope so should be low risk.

## Checklist:
<!--- 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! -->
- [ ] 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.
2025-01-20 22:45:22 +00:00
.github CI: Update KIND images. (#12553) 2024-12-21 17:58:09 +01:00
build Bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#12627) 2025-01-06 20:12:30 +01:00
changelog Release controller v1.12.0/v1.11.4/v1.10.6 & chart v4.12.0/v4.11.4/v4.10.6. (#12619) 2025-01-03 01:44:14 +01:00
charts/ingress-nginx Release controller v1.12.0/v1.11.4/v1.10.6 & chart v4.12.0/v4.11.4/v4.10.6. (#12619) 2025-01-03 01:44:14 +01:00
cmd Fix minor typos (#11935) 2024-09-06 15:59:43 +01:00
deploy Release controller v1.12.0/v1.11.4/v1.10.6 & chart v4.12.0/v4.11.4/v4.10.6. (#12619) 2025-01-03 01:44:14 +01:00
docs Release controller v1.12.0/v1.11.4/v1.10.6 & chart v4.12.0/v4.11.4/v4.10.6. (#12619) 2025-01-03 01:44:14 +01:00
hack Deploy: Use LoadBalancer for KIND. (#12232) 2024-10-29 08:00:07 +01:00
images NGINX: Bump OpenTelemetry. (#12371) 2025-01-06 21:52:30 +01:00
internal Improve HTTP method label handling in prometheus metrics 2025-01-20 22:45:22 +00:00
magefiles Go: Bump to v1.23.4. (#12482) 2024-12-14 15:38:42 +01:00
pkg Metrics: Disable by default. (#12095) 2024-10-07 20:34:22 +01:00
rootfs Images: Bump Alpine to v3.21. (#12481) 2024-12-20 18:04:10 +01:00
test Bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#12627) 2025-01-06 20:12:30 +01:00
version Refactor version helper (#4437) 2019-08-13 13:46:16 -04:00
.ct.yaml refactor helm ci tests part I (#11178) 2024-03-31 13:21:33 -07:00
.gcloudignore add gcloud ignore 2023-06-23 09:31:00 -04:00
.gitignore Chart: Improve CI. (#12003) 2024-09-28 14:40:02 +01:00
.golangci.yml Bump golangci-lint on actions and disable deprecated linters (#12360) 2024-11-13 15:38:47 +00:00
.goreleaser.yaml Reimplement kubectl plugin release workflow (#8812) 2022-08-11 21:22:43 -07:00
.luacheckrc Lua: Remove plugins from .luacheckrc & E2E docs. (#11872) 2024-08-26 21:18:18 +02:00
Changelog.md Fix minor typos (#11935) 2024-09-06 15:59:43 +01:00
cloudbuild.yaml Images: Bump gcb-docker-gcloud to v20241217-ff46a068cd. (#12554) 2024-12-21 18:02:10 +01:00
code-of-conduct.md Update code-of-conduct.md (#1842) 2017-12-20 15:34:27 -03:00
CONTRIBUTING.md Tips for new contributors (#8924) 2022-09-19 06:15:23 -07:00
ginkgo_upgrade.md Correct typo from 'gingko' to 'ginkgo' (#10780) 2023-12-20 17:06:41 +01:00
go.mod Bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#12627) 2025-01-06 20:12:30 +01:00
go.sum Bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#12627) 2025-01-06 20:12:30 +01:00
go.work Go: Bump to v1.23.4. (#12482) 2024-12-14 15:38:42 +01:00
go.work.sum Bump github.com/onsi/ginkgo/v2 from 2.22.1 to 2.22.2 (#12627) 2025-01-06 20:12:30 +01:00
GOLANG_VERSION Go: Bump to v1.23.4. (#12482) 2024-12-14 15:38:42 +01:00
ISSUE_TRIAGE.md Fix typos in ISSUE_TRIAGE.md (#7863) 2021-11-04 04:52:03 -07:00
LICENSE Initial commit 2016-11-04 23:54:14 +01:00
Makefile Images: Bump Alpine to v3.21. (#12481) 2024-12-20 18:04:10 +01:00
MANUAL_RELEASE.md Chart: Improve CI. (#12003) 2024-09-28 14:40:02 +01:00
mkdocs.yml Chart: Remove Pod Security Policy. (#11971) 2024-09-15 17:03:24 +02:00
netlify.toml netlify: Only trigger preview when there are changes in docs. (#10144) 2023-06-27 11:50:32 -07:00
NEW_CONTRIBUTOR.md Fix minor typos (#11935) 2024-09-06 15:59:43 +01:00
NEW_RELEASE_PROCESS.md Add mage files for changelog 2023-01-19 11:46:01 -05:00
NGINX_BASE Images: Bump NGINX_BASE to v1.1.0. (#12580) 2024-12-24 01:50:09 +01:00
OWNERS rikatz is stepping down (#12486) 2024-12-15 18:42:43 +01:00
OWNERS_ALIASES Repository: Update owners. (#12519) 2024-12-21 23:36:09 +01:00
README.md Release controller v1.12.0/v1.11.4/v1.10.6 & chart v4.12.0/v4.11.4/v4.10.6. (#12619) 2025-01-03 01:44:14 +01:00
SECURITY.md Add SECURITY.md 2020-07-27 16:01:17 -06:00
SECURITY_CONTACTS rikatz is stepping down (#12486) 2024-12-15 18:42:43 +01:00

Ingress NGINX Controller

CII Best Practices Go Report Card GitHub license GitHub stars GitHub stars

Overview

ingress-nginx is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.

Learn more about Ingress on the Kubernetes documentation site.

Get started

See the Getting Started document.

Do not use in multi-tenant Kubernetes production installations. This project assumes that users that can create Ingress objects are administrators of the cluster. See the FAQ for more.

Troubleshooting

If you encounter issues, review the troubleshooting docs, file an issue, or talk to us on the #ingress-nginx channel on the Kubernetes Slack server.

Changelog

See the list of releases for all changes. For detailed changes for each release, please check the changelog-$version.md file for the release version. For detailed changes on the ingress-nginx helm chart, please check the changelog folder for a specific version. CHANGELOG-$current-version.md file.

Supported Versions table

Supported versions for the ingress-nginx project mean that we have completed E2E tests, and they are passing for the versions listed. Ingress-Nginx versions may work on older versions, but the project does not make that guarantee.

Supported Ingress-NGINX version k8s supported version Alpine Version Nginx Version Helm Chart Version
🔄 v1.12.0 1.32, 1.31, 1.30, 1.29, 1.28 3.21.0 1.25.5 4.12.0
🔄 v1.12.0-beta.0 1.32, 1.31, 1.30, 1.29, 1.28 3.20.3 1.25.5 4.12.0-beta.0
🔄 v1.11.4 1.30, 1.29, 1.28, 1.27, 1.26 3.21.0 1.25.5 4.11.4
🔄 v1.11.3 1.30, 1.29, 1.28, 1.27, 1.26 3.20.3 1.25.5 4.11.3
🔄 v1.11.2 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.11.2
🔄 v1.11.1 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.11.1
🔄 v1.11.0 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.11.0
v1.10.6 1.30, 1.29, 1.28, 1.27, 1.26 3.21.0 1.25.5 4.10.6
v1.10.5 1.30, 1.29, 1.28, 1.27, 1.26 3.20.3 1.25.5 4.10.5
v1.10.4 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.10.4
v1.10.3 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.10.3
v1.10.2 1.30, 1.29, 1.28, 1.27, 1.26 3.20.0 1.25.5 4.10.2
v1.10.1 1.30, 1.29, 1.28, 1.27, 1.26 3.19.1 1.25.3 4.10.1
v1.10.0 1.29, 1.28, 1.27, 1.26 3.19.1 1.25.3 4.10.0
v1.9.6 1.29, 1.28, 1.27, 1.26, 1.25 3.19.0 1.21.6 4.9.1
v1.9.5 1.28, 1.27, 1.26, 1.25 3.18.4 1.21.6 4.9.0
v1.9.4 1.28, 1.27, 1.26, 1.25 3.18.4 1.21.6 4.8.3
v1.9.3 1.28, 1.27, 1.26, 1.25 3.18.4 1.21.6 4.8.*
v1.9.1 1.28, 1.27, 1.26, 1.25 3.18.4 1.21.6 4.8.*
v1.9.0 1.28, 1.27, 1.26, 1.25 3.18.2 1.21.6 4.8.*
v1.8.4 1.27, 1.26, 1.25, 1.24 3.18.2 1.21.6 4.7.*
v1.7.1 1.27, 1.26, 1.25, 1.24 3.17.2 1.21.6 4.6.*
v1.6.4 1.26, 1.25, 1.24, 1.23 3.17.0 1.21.6 4.5.*
v1.5.1 1.25, 1.24, 1.23 3.16.2 1.21.6 4.4.*
v1.4.0 1.25, 1.24, 1.23, 1.22 3.16.2 1.19.10† 4.3.0
v1.3.1 1.24, 1.23, 1.22, 1.21, 1.20 3.16.2 1.19.10† 4.2.5

See this article if you want upgrade to the stable Ingress API.

Get Involved

Thanks for taking the time to join our community and start contributing!

  • This project adheres to the Kubernetes Community Code of Conduct. By participating in this project, you agree to abide by its terms.

  • Contributing: Contributions of all kinds are welcome!

    • Read CONTRIBUTING.md for information about setting up your environment, the workflow that we expect, and instructions on the developer certificate of origin that we require.
    • Join our Kubernetes Slack channel for developer discussion : #ingress-nginx-dev.
    • Submit GitHub issues for any feature enhancements, bugs, or documentation problems.
      • Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
    • Join our ingress-nginx-dev mailing list
  • Support:

License

Apache License 2.0