Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

[nginx-ingress-controller] Improve docs and examples #1130

Merged
merged 3 commits into from
Jun 23, 2016

Conversation

aledbf
Copy link
Contributor

@aledbf aledbf commented Jun 2, 2016

No description provided.

@simonswine
Copy link
Contributor

@aledbf 👍 nice work this really makes the docs way better.

I think you are missing the global/config-map ssl-redirect option (#850).

@aledbf
Copy link
Contributor Author

aledbf commented Jun 8, 2016

@simonswine done. Do you have another suggestion/missing thing?

@aledbf aledbf changed the title WIP: [nginx-ingress-controller] Improve docs and examples [nginx-ingress-controller] Improve docs and examples Jun 14, 2016
@aledbf
Copy link
Contributor Author

aledbf commented Jun 15, 2016

ping @bprashanth


Please check the [tcp services](examples/custom-configuration/README.md) example
### Custom NGINX upstream checks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just call this health checks, instead of using "upstream" in the heading

@bprashanth
Copy link

What do you think about breaking this out into 2 docs, a high level readme that just explains ingress as it exists cross-platform (or maybe also has TCP UDP etc but nothing about upstreams, custom health, auth etc) and a customization/nginx specific doc that details each annotation and how to use it?

@aledbf aledbf force-pushed the improve-docs branch 5 times, most recently from 6bc0c3a to f3bfeac Compare June 16, 2016 18:53
@aledbf
Copy link
Contributor Author

aledbf commented Jun 16, 2016

@bprashanth done

@@ -0,0 +1,389 @@
## Contents
* [Custom NGINX configuration](#custom-nginx-configuration)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customizing nginx

there are 3 ways to customize nginx

  1. annoations: annotate the ingress, use this if you want to expose a few site specific features
  2. config map: create a stand alone config map, use this if you want a lot of completey different features (reword)
  3. custom template: when do people want this?

Annotations

The following annotaitons are supported:
table of annotations -> links to sections below

Authentication
Rewrite
...

Config Map

Custom Template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* [Authentication](#authentication)
* [Rewrite](#rewrite)
* [Rate limiting](#rate-limiting)
* [Secure NGINX upstreams](#secure-nginx-upstreams)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secure-nginx-upstreams is an annotation name we can't easily adopt to the other controllers. Suggest naming with the assumption that we will bubble these up as fields, no loss if we don't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Renamed to secure-upstreams

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a better term for upstreams, backends maybe? something more generic. I wouldn't know what upstreams is if I only use haproyx.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is there motivation for calling it "upstreams" that I'm missing (either in nginx or if you want to keep upstreams for some reason)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason. Renamed to secure-backends

@bprashanth
Copy link

Getting better with each pass. sorry for the delay, just trying to do a decent review :)

@aledbf aledbf force-pushed the improve-docs branch 4 times, most recently from 4932274 to 8ba891c Compare June 20, 2016 18:59

1. config map: create a stand alone config map, use this if you want a different global configuration
2. annoations: [annotate the ingress](#annotations), use this if you want a specific configuration for the site defined in the ingress rule
3. custom template: when do people want this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i meant actually describe when people might want a cusomt template, maybe give an example?

|[ingress.kubernetes.io/ssl-redirect](#server-side-https-enforcement-through-redirect)|true or false|
|[ingress.kubernetes.io/upstream-max-fails](#custom-nginx-upstream-checks)|number|
|[ingress.kubernetes.io/upstream-fail-timeout](#custom-nginx-upstream-checks)|number|
|[ingress.kubernetes.io/secure-backends](#secure-backends)|true or false|
Copy link

@mgoodness mgoodness Jun 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the annotation is ingress.kubernetes.io/secure-upstream. That's what works for me, anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgoodness the name will change to avoid specific nginx or haproxy terminologies
(suggested by @bprashanth)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well i guess if it's ingress.kubernetes.io/secure-upstream already we should change the implementation so the new annotation works, deprecate the old one (just document as deprecated, kill after a few releases, maybe send out an even if anyone uses it)?

@aledbf
Copy link
Contributor Author

aledbf commented Jun 22, 2016

just document as deprecated

I will add a note of this in the changelog before the next release

@bprashanth
Copy link

alright, I think we can iterate on this with follow up prs if needed. It's a big step forward for docs!

@bprashanth bprashanth merged commit 45bdc24 into kubernetes-retired:master Jun 23, 2016
@aledbf aledbf deleted the improve-docs branch June 23, 2016 14:50
aledbf pushed a commit to aledbf/contrib that referenced this pull request Nov 10, 2016
[nginx-ingress-controller] Improve docs and examples
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants