Ingress NGINX Controller for Kubernetes
Find a file
Mateusz Gozdek 9acf62d867
images/kube-webhook-certgen/rootfs: add support for patching APIService objects (#7641)
* images/kube-webhook-certgen/rootfs/pkg/k8s: return err from functions

Initially only from some to preserve existing behavior.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: make patching return error

So we don't call log.Fatal in so many places, which makes code testable.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: require context

So initialize top-level contexts in tests and CLI, then pass them around
all the way down, so there is an ability e.g. to add timeouts to patch
operations, if needed and to follow general conventions.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: support patching APIService

APIService object is very similar to MutatingWebhookConfiguration and
ValidatingWebhookConfiguration objects, so support for patching it
shouldn't be too much of a burden.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: use new patch API

So old function PatchWebhookConfigurations can be unexported and CLI can
be extended to also support patching APIService.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/pkg/k8s: unexport old patch function

PatchObjects should be now used instead.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: add .gitignore

To ignore manually built binaries during development process.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: test patching

By adding a PatchConfig and Patch function, it is now possible to test
logic of flag validation, which was previously tied to CLI options.

This commit adds nice set of tests covering existing logic.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: improve formatting

Those strings will be changed anyway in future commits, so at first we
can properly capitalize used names.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs/cmd: support patching APIService

As logic for creating a CA certificate and patching an object is almost
the same for both webhook configuration and API services, this commit
adds support to kube-webhook-certgen CLI to also patch APIService
objects, so they can be served over TLS as well.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>

* images/kube-webhook-certgen/rootfs: pass failure policy by value

k8s.k8s.patchWebhookConfigurations() always dereferences it and we do
not do a nil check, so the code may panic in some conditions, so it's
safer to just pass it by value, as it's just a wrapped string.

Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
2021-09-26 10:44:22 -07:00
.github Change legacy branch in GH action 2021-09-22 09:30:44 -03:00
build Update e2e-test-runner image (#7648) 2021-09-16 10:01:46 -07:00
charts/ingress-nginx preparing release v1.0.1 (#7681) 2021-09-22 05:12:02 -07:00
cmd Add new flag to watch ingressclass by name instead of spec (#7609) 2021-09-10 10:14:01 -07:00
deploy preparing release v1.0.1 (#7681) 2021-09-22 05:12:02 -07:00
docs Correct a mistake (#7690) 2021-09-24 04:01:24 -07:00
hack Change builder in a new attempt to make it run 2021-09-04 01:06:51 -03:00
images images/kube-webhook-certgen/rootfs: add support for patching APIService objects (#7641) 2021-09-26 10:44:22 -07:00
internal Change enable-snippet to allow-snippet-annotation (#7670) 2021-09-20 16:52:23 -07:00
rootfs fix typos. (#7640) 2021-09-15 11:30:12 -07:00
test Change enable-snippet to allow-snippet-annotation (#7670) 2021-09-20 16:52:23 -07:00
version Refactor version helper (#4437) 2019-08-13 13:46:16 -04:00
.codecov.yml Migrate to codecov.io (#2120) 2018-02-20 08:27:02 -08:00
.gitignore Update go version, modules and remove ioutil 2021-08-06 14:15:21 -03:00
.luacheckrc Enable lj-releng tool to lint lua code. 2020-06-09 18:01:35 +08:00
Changelog.md add 0.49.1 to changelog (#7692) 2021-09-24 04:03:23 -07:00
cloudbuild.yaml Changing gcb builder (#7584) 2021-09-02 12:15:46 -07:00
code-of-conduct.md Update code-of-conduct.md (#1842) 2017-12-20 15:34:27 -03:00
CONTRIBUTING.md Fix broken get started link in contributing doc (#7248) 2021-06-19 12:40:50 -07:00
go.mod Update ingress to go 1.17 (#7521) 2021-08-23 14:25:25 -07:00
go.sum Retry to download maxmind DB if it fails (#7242) 2021-08-10 11:24:39 -07:00
LICENSE Initial commit 2016-11-04 23:54:14 +01:00
Makefile Update NGINX base image to v1.19 (#7643) 2021-09-16 05:07:46 -07:00
mkdocs.yml Remove "Development" from Welcome page (#7150) 2021-05-23 06:39:38 -07:00
OWNERS update OWNERS and aliases files (#7365) 2021-07-16 06:24:09 -07:00
OWNERS_ALIASES update OWNERS and aliases files (#7365) 2021-07-16 06:24:09 -07:00
README.md add 0.49.1 to changelog (#7692) 2021-09-24 04:03:23 -07:00
RELEASE.md improve docs for release - added step to edit README for support matrix (#7537) 2021-08-24 19:00:40 -07:00
SECURITY.md Add SECURITY.md 2020-07-27 16:01:17 -06:00
SECURITY_CONTACTS Add security contacts (#7642) 2021-09-15 12:24:12 -07:00
stable.txt preparing release v1.0.1 (#7681) 2021-09-22 05:12:02 -07:00
TAG Trigger v1.0.1 release (#7679) 2021-09-21 04:58:23 -07:00

NGINX Ingress Controller

Go Report Card GitHub license GitHub stars GitHub stars FOSSA Status

Overview

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

Learn more about Ingress on the main Kubernetes documentation site.

Get started

See the Getting Started document.

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 to find out about feature changes. For detailed changes for each release; please check the Changelog.md file. For detailed changes on the ingress-nginx helm chart, please check the following CHANGELOG.md file.

Support Versions table

Ingress-nginx version k8s supported version Alpine Version Nginx Version
v1.0.1 1.22, 1.21, 1.20, 1.19 3.14.2 1.19.9
v1.0.0 1.22, 1.21, 1.20, 1.19 3.13.5 1.20.1
v0.49.1 1.21, 1.20, 1.19 3.14.2 1.19.9
v0.49.0 1.21, 1.20, 1.19 3.13.5 1.20.1
v0.48.1 1.21, 1.20, 1.19 3.13.5 1.20.1
v0.47.0 1.21, 1.20, 1.19 3.13.5 1.20.1
v0.46.0 1.21, 1.20, 1.19 3.13.2 1.19.6

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 kind 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.

    • Check out the open issues, especially help-wanted ones.

    • 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.

  • Support: Join the the #ingress-nginx-users channel inside the Kubernetes Slack to ask questions or get support from the maintainers and other users.

    • The github issues in the repository are exclusively for bug reports and feature requests.
  • Discuss: Tweet using the #IngressNginx hashtag.

License

Apache License 2.0