Commit graph

978 commits

Author SHA1 Message Date
James Strong
843a16a8f8
Release updates for v1.1.0 (#7964) 2021-11-23 15:07:46 -08:00
James Strong
d4a6ade65f
update default block list,docs, tests (#7942)
* update default block list,docs, tests

* fix config for admin test

* gofmt

* remove the err return
2021-11-23 09:06:17 -08:00
Ricardo Katz
727f4cb925
Release v1.0.5 documents (#7924)
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
2021-11-15 17:11:26 -08:00
Ricardo Katz
15567b07c0
Trim spaces from badword items (#7921) 2021-11-15 20:37:29 -03:00
Robert Steele
b7ac27a671
Update Bare Metal anchor link (#7914) 2021-11-15 13:58:48 -08:00
Mac Chaffee
3c08f002f9
Rewrite multiple-ingress.md to work with v1 (#7608)
* Rewrite multiple-ingress.md to work with v1

* Fix --controller-class flag docs
2021-11-15 12:20:49 -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
James Strong
8333c8c127
update docs with a warning about cert chain order (#7908) 2021-11-12 11:34:29 -08:00
sandipanpanda
af232df1af
Update anchor links of Nodeport from #nodeport to #type-nodeport (#7899)
* Update anchor link from #nodeport to #type-nodeport in baremetal.md

* Update anchor link from #nodeport to #type-nodeport in baremetal.md
2021-11-11 09:42:09 -08:00
Gerald Pape
017e1ecde3
Fix Ingress resources in docs (#7579)
* fix Ingress resources in docs

Signed-off-by: Gerald Pape <gerald@giantswarm.io>

* move to ingressClassName

* fix more Ingress resource examples

* empty commit

Signed-off-by: Gerald Pape <gerald@giantswarm.io>

* make NOTES.txt aware of version + add notice about ingress version to examples main page

* add link to legacy documentation

Signed-off-by: Gerald Pape <gerald@giantswarm.io>
2021-11-09 07:43:49 -08:00
James Strong
b7b2714b69
Update proxy-set-header example (#7898)
The Example was directed to the repo markdown and not the site. 

/kind documentation
2021-11-08 22:15:39 -08:00
Jérôme Petazzoni
ce165f9078
Try to improve the installation guide (#7757)
* move generic instructions to the beginning of the file
* add an example of ingress resource creation
* simplify a few commands to make them shorter and simpler
* add short paragraphs about PROXY protocol and traffic policy

This tries to address the concerns I expressed in #7701.
2021-11-05 13:50:40 -07:00
Sablu Miah
62ab435958
Fix Formatting/Typo (#7894)
Quick simple typo/formatting fix to keep consistency with direct sections below
2021-11-05 13:34:41 -07:00
Christopher Larivière
65b8eeddec
Support cors-allow-origin with multiple origins (#7614)
* Add Initial support for multiple cors origins in nginx

- bump cluster version for `make dev-env`
- add buildOriginRegex function in nginx.tmpl
- add e2e 4 e2e tests for cors.go
- refers to feature request #5496

* add tests + use search to identify '*' origin

* add tests + use search to identify '*' origin

Signed-off-by: Christopher Larivière <lariviere.c@gmail.com>

* fix "should enable cors test" looking at improper values

* Modify tests and add some logic for origin validation

- add origin validation in cors ingress annotations
- add extra tests to validate regex
- properly escape regex using "QuoteMeta"
- fix some copy/paste errors

* add TrimSpace and length validation before adding a new origin

* modify documentation for cors and remove dangling comment

* add support for optional port mapping on origin

* support single-level wildcard subdomains + tests

* Remove automatic `*` fonctionality from incorrect origins

- use []string instead of basic string to avoid reparsing in template.go
- fix typo in docs
- modify template to properly enable only if the whole block is enabled
- modify cors parsing
- test properly by validating that the value returned is the proper
  origin
- update unit tests and annotation tests

* Re-add `*` when no cors origins are supplied + fix tests

- fix e2e tests to allow for `*`
- re-add `*` to cors parsing if trimmed cors-allow-origin is empty
(supplied but empty) and if it wasn't supplied at all.

* remove unecessary logic for building cors origin + remove comments

- add some edge cases in e2e tests
- rework logic for building cors origin

there was no need for logic in template.go for buildCorsOriginRegex
if there is a `*` it ill be short-circuited by first if.

if it's a wildcard domain or any domain (without a wildcard), it MUST
match the main/cors.go regex format.

if there's a star in a wildcard domain, it must be replaced with
`[A-Za-z0-9]+`

* add missing check in e2e tests
2021-11-02 12:31:42 -07:00
Rahil Patel
c8ab4dc307
add brotli-min-length configuration option (#7854)
* add `brotli-min-length` configuration option

* add e2e tests for brotli

* include check for expected content type

* fix header and format
2021-11-02 04:52:59 -07:00
counter2015
ed34f6c93d
fix ingress syntax. (#7867) 2021-11-01 17:12:58 -07:00
Paul McDonald
8467124c24
Update upgrade.md (#7828)
Updated to the same release name in the installation guide
2021-10-27 10:05:25 -07:00
Jessica Andersson
4da87d128d
improves text format for readability (#7855)
Small text format changes to section "I have more than one controller running in my cluster, and I want to use the new spec?" to allow for better readability.
2021-10-27 06:31:26 -07:00
Vladimir Varankin
987a721723
update documentation and templates for aws nlb (#7662) 2021-10-25 10:47:02 -07:00
Thibault Guittet
6b9865c607
Update Bare-metal NodePort URL anchor (#7687) 2021-10-24 14:38:21 -07:00
Matthew Silverman
7d5452d00b
configmap: option to not trust incoming tracing spans (#7045)
* validate the sender of tracing spans

* add location-specific setting
2021-10-24 14:36:21 -07:00
Davide Icardi
c6adeb8f8c
improve basic usage documentation (#7661) 2021-10-24 12:20:21 -07:00
Mara Sophie Grosch
21bab108f4
mention CVE-2021-25742 in annotations doc (#7843)
Referring to CVE-2021-25742 in the annotations doc at the description of `configuration-snippet`.
2021-10-24 12:08:22 -07:00
Long Wu Yuan
0b24ade145
fixed issue 7807 (#7814) 2021-10-22 10:30:38 -07:00
Maxence Boutet
8611ecb7c9
Fix not rendered markdown list (#7825) 2021-10-19 20:37:57 -07:00
Ricardo Katz
14f6b32032
Release v1.0.4 (#7805)
Signed-off-by: Ricardo Pchevuzinske Katz <rkatz@vmware.com>
2021-10-12 20:25:48 -07:00
Enes Kirimi
710d0db9a5
Expand docker desktop installation with an attention block (#7730) 2021-10-10 11:50:37 -07:00
mitchldtn
4ad67e125e
Update index.md (#7766)
Proposal to add information to Helm Installation

I can into an issue recently which cost me the better part of an afternoon and evening. The only information about some changes, I was not aware of, was in this blog post about improvements in 1.18.

The information about the errors I was receiving lead me to dead ends prior to finding that blog post. `IngressClass` and `ingressClassName` are thrown around a lot and it can be confusing but it helped me to eventually find a solution.

I kept getting `Error: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata ...` and could not figure out how to fix it.

I believe adding the proposed changes, or a version of them, would help eliminate that frustration I experienced for other users that may run into these issues.
2021-10-10 11:36:38 -07:00
Jun Gu
0963a45922
docs: Remove extra symbol (#7765)
Signed-off-by: jun.gu <gujun4990@outlook.com>
2021-10-08 05:44:59 -07:00
Long Wu Yuan
5fec4e885d
removed space in example helm install command from docs (#7775) 2021-10-07 18:55:51 -07:00
Ricardo Katz
bdea0c8e46
Release v1.0.3 (#7743)
Signed-off-by: Ricardo Pchevuzinske Katz <rkatz@vmware.com>
2021-10-04 07:17:09 -07:00
Zackky Muhammad
b219555e75
docs(index): fix typo helm value example (#7734) 2021-10-03 13:59:07 -07:00
Konstantin Chukhlomin
ee16726790
Update docs/example/rewrite (sudden stickyingress) (#7733) 2021-10-01 06:11:23 -07:00
Long Wu Yuan
be9a7bea4a
added example to install multiple instances of controller (#7718) 2021-09-28 09:08:43 -07:00
Claudiu Belu
c0f61039e4
Updates E2E test images registry (#7704)
We're moving away from google.com gcp projects. These images are now on community-owned infra.
2021-09-27 09:42:18 -03:00
Ricardo Katz
3eb5ec28fe
Release v1.0.2 (#7709)
* Release v1.0.2

* Apply suggestions from code review

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

* Fix changelog

Co-authored-by: Jintao Zhang <tao12345666333@163.com>
2021-09-27 00:25:27 -03:00
Austin Wise
15385c6d56
Tweak documentation formating about deprecated apiVersion values. (#7663)
* Tweak documentation formating about deprecated `apiVersion` values.

* retweak after rebase
2021-09-26 10:48:22 -07:00
pierre villard
1a5c0b7ed2
Correct a mistake (#7690) 2021-09-24 04:01:24 -07:00
Noah Ispas
f66f87fc21
preparing release v1.0.1 (#7681)
* preparing release v1.0.1

* update shas to newest promoted image

* update changelog of helm chart

* change requests from PR
2021-09-22 05:12:02 -07:00
Ricardo Katz
4fc57dcc49
Change enable-snippet to allow-snippet-annotation (#7670)
Signed-off-by: Ricardo Pchevuzinske Katz <rkatz@vmware.com>
2021-09-20 16:52:23 -07:00
Long Wu Yuan
c6bf056327
added example multiple controller install to faq (#7668) 2021-09-20 03:28:10 -07:00
Ricardo Katz
5e6ab651ec
Add option to force enabling snippet directives (#7665)
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
2021-09-19 12:40:08 -07:00
Jennifer Kirsch
314cc6c2dc
Replace kube-lego docs with cert-manager (#7659)
Since kube-lego has not been maintained in quite a while,
I thought it would be best to remove the documentation about it
and replace it with information about cert-manager.
2021-09-19 11:06:08 -07:00
iugastefan922
5c6a28464b
additional info for the custom-headers documentation page (#7603)
* added another documentation example

* added end of file newline

* Revert "added end of file newline"

This reverts commit 2d196ffba3.

* added another documentation example
2021-09-16 14:23:27 -07:00
agile6v
557a765754
fix typos. (#7640) 2021-09-15 11:30:12 -07:00
Jennifer Kirsch
ff2b743a94
Only build nginx-errors for linux/amd64 (#7625)
* Fix wrong image location used in nginx-errors example config

* Only build nginx-errors for linux/amd64
2021-09-12 10:08:06 -07:00
Jennifer Kirsch
c9a00fbc73
Fix old tag of custom error pages used in example (#7460)
* Fix old tag of custom error pages used in example

* Move nginx-errors to k8s registry

Since the setup for the custom-error-messages was really different from
the other images that are build using cloudbuild, I changed it to "fit
in better"

* Use Go version 1.17 for custom-error-pages

Since Go >= 1.16 required the use of modules, I also initialized the module using the name k8s.io/ingress-nginx/custom-error-pages
2021-09-09 04:38:11 -07:00
Renan Gonçalves
48601bcd0e
Allow the usage of Services as Upstream on a global level (#7469)
It is possible to change this behavior on an ingress level, which works
well when you only have a few of them. When running several dozen
ingress and with a high change rate of running pods it makes it easier
to define this configuration on a global level.

This change is completely backwards compatible, only adding the
possibility of defining a new key in the configmap.
2021-09-07 12:47:15 -07: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
Ray
cf9ae96d72
Additional AuthTLS assertions and doc change to demonstrate auth-tls-secret enables the other AuthTLS annotations (#7202)
* Fix indentation of nested list in AuthTLS annotations

Also, put `<annotation>`: <description text>` on a single line in
Markdown markup, which will match what gets rendered eventually.

On the other hand, for the line on auth-tls-secret (This annotation
expects the Secret name in the form "namespace/secretName"), its
Markdown markup suggests that the author wanted the line to start on its
own line, but currently this gets rendered on the same line. It's nice
for this to be on its own line, since it's kind of a "note" about the
annotation syntax. Format/indent the markup appropriately so that it
shows up on its line.

* Fix indentation of nested list in CORS annotations

Also, put `<annotation>`: <description text>` on a single line in
Markdown markup, which will match what gets rendered eventually.

On the other hand, for lines noting the allowed characters (This is a
multi-valued field...), its Markdown markup suggests that the author
wanted the line to start on its own line, but currently this gets
rendered on the same line. It's nice for this to be on its own line,
since it's kind of a "note" about the annotation syntax. Format/indent
the markup appropriately so that it shows up on its line.

* Replace f.HTTPTestClientWithTLSConfig() in AuthTLS E2E, the odd one out for requests without client certs

* Demonstrate and document that auth-tls-secret enables the other AuthTLS annotations like verify client, depth

* Split E2E for auth-tls-error-page and *-pass-certificate-to-upstream
2021-09-07 10:35:16 -07:00