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

Commit

Permalink
Merge pull request #1786 from aledbf/custom-funcs-docs
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

[nginx-ingress-controller] Add docs about go template

Address #1711 (comment)
  • Loading branch information
Kubernetes Submit Queue authored Sep 26, 2016
2 parents 9167e7b + c127c11 commit 4b63551
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ingress/controllers/nginx/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ Use the [custom-template](examples/custom-template/README.md) example as a guide

**Please note the template is tied to the go code. Be sure to no change names in the variable `$cfg`**

To know more about the template please check the [Go template package](https://golang.org/pkg/text/template/)
Additionally to the built-in functions provided by the go package this were added:
- empty: returns true if the specified parameter (string) is empty
- contains: [strings.Contains](https://golang.org/pkg/strings/#Contains)
- hasPrefix: [strings.HasPrefix](https://golang.org/pkg/strings/#Contains)
- hasSuffix: [strings.HasSuffix](https://golang.org/pkg/strings/#HasSuffix)
- toUpper: [strings.ToUpper](https://golang.org/pkg/strings/#ToUpper)
- toLower: [strings.ToLower](https://golang.org/pkg/strings/#ToLower)
- buildLocation: helper to build the NGINX Location section in each server
- buildProxyPass: builds the reverse proxy configuration
- buildRateLimitZones: helper to build all the required rate limit zones
- buildRateLimit: helper to build a limit zone inside a location if contains a rate limit annotation


### Custom NGINX upstream checks

Expand Down

0 comments on commit 4b63551

Please sign in to comment.