Commit graph

572 commits

Author SHA1 Message Date
Thibault Jamet
1cd17cd12c
Implement a validation webhook
In case some ingress have a syntax error in the snippet configuration,
the freshly generated configuration will not be reloaded to prevent tearing down existing rules.
Although, once inserted, this configuration is preventing from any other valid configuration to be inserted as it remains in the ingresses of the cluster.
To solve this problem, implement an optional validation webhook that simulates the addition of the ingress to be added together with the rest of ingresses.
In case the generated configuration is not validated by nginx, deny the insertion of the ingress.

In case certificates are mounted using kubernetes secrets, when those
changes, keys are automatically updated in the container volume, and the
controller reloads it using the filewatcher.

Related changes:

- Update vendors
- Extract useful functions to check configuration with an additional ingress
- Update documentation for validating webhook
- Add validating webhook examples
- Add a metric for each syntax check success and errors
- Add more certificate generation examples
2019-04-18 19:07:04 +02:00
Kubernetes Prow Robot
34734edc6e
Merge pull request #4005 from Shopify/proxy-next-upstream-timeout
Support proxy_next_upstream_timeout
2019-04-15 09:10:09 -07:00
Alex Kursell
ffeb1fe348 Support proxy_next_upstream_timeout 2019-04-15 11:08:57 -04:00
Elvin Efendi
13a7e2c5d0 refactor GetFakeSSLCert 2019-04-14 09:35:48 -04:00
Kubernetes Prow Robot
4c37e0e4b7
Merge pull request #4004 from Shopify/no-valgrind
Remove valgrind
2019-04-13 20:48:01 -07:00
Elvin Efendi
b1a6aa2973 make sure unit test create fakecertificate 2019-04-13 16:35:52 -04:00
Elvin Efendi
417af76e97 properly handle default and custom default certs in dynamic ssl mode 2019-04-13 12:32:06 -04:00
Alex Kursell
ae592821c6 Remove valgrind 2019-04-12 12:09:52 -04:00
Elvin Efendi
fc6e7c9be0 fix dynamic cert bug 2019-04-09 22:11:21 -04:00
Kubernetes Prow Robot
d3f9fbb8fb
Merge pull request #3960 from Shopify/fix-add-headers-segfault
Fix segfault on reference to nonexistent configmap
2019-04-04 08:52:53 -07:00
Manuel Alejandro de Brito Fontes
951f7d7c1b
Refactor equals 2019-04-03 22:39:32 -03:00
Alex Kursell
f6beef960d Fix segfault on reference to nonexistent configmap 2019-04-02 16:39:42 -04:00
Kubernetes Prow Robot
39ecab8d5a
Merge pull request #3954 from Shopify/lb-configmap
Fix load-balance configmap value
2019-04-02 05:10:34 -07:00
Alex Kursell
4f819b6256 Fix load-balance configmap value 2019-04-01 15:55:36 -04:00
Kubernetes Prow Robot
b87cc5a1a6
Merge pull request #3786 from Shopify/rewrite-x-forwarded-prefix
Fix x-forwarded-prefix annotation
2019-03-31 16:18:32 -07:00
Elvin Efendi
496ff07bf1 replace some of the Nginx configuration to Lua code 2019-03-31 12:04:52 -04:00
Kubernetes Prow Robot
4bee401d16
Merge pull request #3947 from vncntvandriessche/bug/silent-custom-default-certificate-failure
Adds a log warning when falling back to default fake cert
2019-03-31 08:42:32 -07:00
Alex Kursell
188295550c Simplify x-forwarded-prefix annotation 2019-03-29 16:25:25 -04:00
Vincent Van Driessche
23902058f9 Adds a log warning when falling back to default fake cert 2019-03-29 17:30:10 +01:00
Manuel Alejandro de Brito Fontes
14a9e9f3fa
Update dependencies client-go to release-11.0 and kubernetes-1.14.0 2019-03-28 20:43:18 -03:00
Manuel Alejandro de Brito Fontes
3ec1028d0b
Fix dynamic SSL certificate for aliases and redirect-from-to-www 2019-03-28 16:29:11 -03:00
Kubernetes Prow Robot
e624fe171d
Merge pull request #3839 from perprogramming/bugfix/panic-on-multiple-non-matching-canary
Fix panic on multiple non-matching canary
2019-03-27 16:46:48 -07:00
Kubernetes Prow Robot
614a2d43bc
Merge pull request #3895 from jacksontj/issue_3881
Correctly format ipv6 resolver config for lua
2019-03-14 11:22:27 -07:00
Kubernetes Prow Robot
189e2db412
Merge pull request #3889 from Shopify/simplify-controller-annotations
Separate out annotation assignment logic
2019-03-14 11:00:38 -07:00
Thomas Jackson
eba4a8b87c Correctly format ipv6 resolver config for lua
Fixes #3881
2019-03-14 10:00:24 -07:00
Kubernetes Prow Robot
e0793650d0
Merge pull request #3885 from aledbf/status
Refactor status update
2019-03-13 08:19:36 -07:00
Alex Kursell
d74cc69693 Separate out annotation assignment logic 2019-03-12 14:18:09 -04:00
Manuel Alejandro de Brito Fontes
f4e4335d8c
Only the leader updates metrics for SSL certificate expiration 2019-03-12 12:08:24 -03:00
Per Bernhardt
c995e13249 Improve text, error level, tests... 2019-03-12 15:57:36 +01:00
Alex Kursell
d8fe2d992b Remove useless nodeip call and deprecate --force-namespace-isolation 2019-03-11 18:19:13 -04:00
Manuel Alejandro de Brito Fontes
20a89480f0
Use full election leader ID 2019-03-11 13:11:27 -03:00
Manuel Alejandro de Brito Fontes
7c717cabcf
Add promehteus metric about leader election status 2019-03-11 13:11:27 -03:00
Manuel Alejandro de Brito Fontes
0a39425e8f
Refactor status update 2019-03-11 13:11:26 -03:00
Kubernetes Prow Robot
8e7480e0f1
Merge pull request #3853 from aledbf/remove-authbind
Remove authbind
2019-03-11 07:09:29 -07:00
Elvin Efendi
5667ea5d67 bugfix: when secret includes ca.crt store it on disk even in dynamic cert mode 2019-03-11 00:53:06 -04:00
Elvin Efendi
70df5e03e5 clean up certificate processing 2019-03-11 00:53:06 -04:00
Alejandro Pedraza
7ea245e6e6 Add test
Signed-off-by: Alejandro Pedraza <alejandro.pedraza@gmail.com>
2019-03-07 06:18:06 -05:00
Alejandro Pedraza
a3c87cf9cb Properly set ing.Service when there are multiple rules with different hosts using the same path
Fixes #3611

Signed-off-by: Alejandro Pedraza <alejandro.pedraza@gmail.com>
2019-03-07 06:06:24 -05:00
Manuel Alejandro de Brito Fontes
d898169484 Fix ssl-dh-param issue when secret does not exit 2019-03-05 16:31:33 -03:00
Manuel Alejandro de Brito Fontes
26f2b1330f Remove authbind 2019-03-05 10:08:34 -03:00
Alex Kursell
d3ac73be79 Remove session-cookie-hash annotation 2019-03-04 10:34:48 -05:00
Per Bernhardt
8a40e82ffb Fix panic on multiple non-matching canary 2019-03-04 12:30:59 +01:00
Mikhail Marchenko
8b3702c829 Enable access log for default backend
disable log on default_server
2019-02-26 11:14:31 +03:00
jasongwartz
3865e30a00 Changes CustomHTTPErrors annotation to use custom default backend
Updates e2e test

Removes focus from e2e test

Fixes renamed function

Adds tests for new template funcs

Addresses gofmt

Updates e2e test, fixes custom-default-backend test by creating service

Updates docs
2019-02-24 22:48:56 +01:00
Kubernetes Prow Robot
7b2495047f
Merge pull request #3781 from zoumo/proxy-buffer-number
feat: configurable proxy buffers number
2019-02-22 12:11:46 -08:00
Jim Zhang
6305e1d152 fix: run gofmt 2019-02-22 15:04:19 +08:00
Jim Zhang
dc63e5d185 fix: rename proxy-buffer-number to proxy-buffers-number 2019-02-22 10:21:17 +08:00
Taoge
24993f359f
- remove annoations in nginxcontroller struct 2019-02-21 19:14:11 +08:00
Jim Zhang
c92d29d462 feat: configurable proxy buffer number 2019-02-20 18:05:09 +08:00
Anthony Ho
ec04852526 Create custom annotation for satisfy "value" 2019-02-19 15:58:35 -05:00
Kubernetes Prow Robot
784d57ea69
Merge pull request #3695 from yowenter/patch-1
> Don't reload nginx when L4 endpoints changed
2019-02-19 11:27:11 -08:00
TaoGe
b03049c0af
> Don't reload nginx when L4 service pods changed
Since we use lua upstream for L4 service balancer. We don't need reload nginx when L4 service pod changed.
2019-02-19 14:31:45 +08:00
Manuel Alejandro de Brito Fontes
bef6ff9042
Do not log unnecessarily (#3771) 2019-02-16 20:56:18 -03:00
Alan J Castonguay
a29c27ed4c Datadog Opentracing support - part 2
This commit is part 2 of 2, adding configuration of the
Datadog Opentracing module to the controller.

Fixes half of #3752
2019-02-15 15:20:10 -05:00
Kubernetes Prow Robot
908a2ae506
Merge pull request #3764 from ElvinEfendi/cleanup-confusing-attribute
delete confusing CustomErrors attribute to make things more explicit
2019-02-14 03:26:21 -08:00
Elvin Efendi
adc128711b delete confusing CustomErrors attribute to make things more explicit 2019-02-13 22:41:02 -05:00
Kubernetes Prow Robot
c8d30755a9
Merge pull request #3748 from aledbf/update-image
Update nginx image
2019-02-13 15:14:08 -08:00
Alex Kursell
7e3304d4f9 Apply annotations to default location 2019-02-11 14:32:49 -05:00
Sebastiaan Tammer
fc5e99a151 Parse environment variables in OpenTracing configuration 2019-02-10 16:59:05 +01:00
Manuel Alejandro de Brito Fontes
7dc17a603d Update nginx image 2019-02-09 18:53:31 -03:00
Elvin Efendi
aca51a3d4e dont log unnecessarily 2019-02-07 13:22:02 -05:00
Kubernetes Prow Robot
ea9055b613
Merge pull request #3728 from Shopify/fix-test-list-ingresses
Fix flaky test
2019-02-07 07:08:56 -08:00
Kubernetes Prow Robot
4dd0365c01
Merge pull request #3734 from Shopify/remove-old-dicts
remove old unused lua dicts
2019-02-06 20:21:28 -08:00
Kubernetes Prow Robot
6386da7e6f
Merge pull request #3736 from Shopify/increase-log-level
do not unnecessarily log
2019-02-06 19:24:50 -08:00
Kubernetes Prow Robot
ef7d7cf7d1
Merge pull request #3667 from Shopify/fix-worker-connection-calculation
worker_connections should be less (3/4th) than worker_rlimit_nofile
2019-02-06 15:11:20 -08:00
Elvin Efendi
e7383bdf3d do not unnecessarily log 2019-02-06 17:39:38 -05:00
Elvin Efendi
d99390f402 remove old unused lua dicts 2019-02-06 17:33:16 -05:00
Kubernetes Prow Robot
17e788b8e1
Merge pull request #3684 from aledbf/health
Replace Status port using a socket
2019-02-06 13:49:08 -08:00
Manuel Alejandro de Brito Fontes
34b0580225
Replace Status port using a socket 2019-02-06 18:00:10 -03:00
Alex Kursell
b5a9f6c000 Fix flaky test 2019-02-05 18:02:21 -05:00
Elvin Efendi
638f965a8f worker_connections should be less than worker_rlimit_nofile 2019-02-02 22:30:36 -05:00
minherz
de2a1ece6d add header-value annotation
add new annotation (header-value)
parse it and propogate to lua script
alter balancer rule to include it into the canary routing logic
add e2e test to validate fallback for canary-by-header-value
add description of canary-by-header-value to documentation
2019-01-30 23:23:44 +02:00
Fernando Diaz
7b507095f4 Increase Unit Test Coverage for Templates
Increases the Coverage for nginx ingress template
functions. The majority of the added unit tests
are for checking the invalid type handling.
2019-01-29 22:55:44 -06:00
Kubernetes Prow Robot
bd248250be
Merge pull request #3702 from stamm/access_logs_params
Add params for access log
2019-01-28 07:30:00 -08:00
Rustam Zagirov
5dee6af957 add params for access log 2019-01-26 21:42:11 +03:00
Alex Kursell
ca74960905 Fix --disable-catch-all 2019-01-25 14:53:55 -05:00
Elvin Efendi
bdf6e47004 rename sysctlFSFileMax to rlimitMaxNumFiles to reflect what it actually does 2019-01-15 15:34:17 -05:00
Manuel Alejandro de Brito Fontes
e7236afc83 Fix invalid validation creating prometheus valid host values 2019-01-14 10:59:55 -03:00
Manuel Alejandro de Brito Fontes
b10b60f9ae
Revert max-worker-connections default value (#3660) 2019-01-13 10:53:18 -03:00
Manuel Alejandro de Brito Fontes
3483eb375e Remove flag sort-backends 2019-01-11 14:43:02 -03:00
Manuel Alejandro de Brito Fontes
a3bcbeb3d2
Add support for redirect https to https when from-to-www-redirect is defined 2019-01-10 20:59:49 -03:00
Shai Katz
edd87fbae3 add limit connection status code
add default conn status code

add missing colon

add limit connection status code
2019-01-09 19:31:10 +02:00
Maxime Ginters
7142791d41 Fix duplicate alternative backend merging 2019-01-08 11:52:08 -05:00
Maxime Ginters
3fa8395f7f Fix a bug in Ingress update handler 2019-01-08 09:28:42 -05:00
Kubernetes Prow Robot
8f57f9578d
Merge pull request #3586 from Shopify/disable-catch-all
Add --disable-catch-all option to disable catch-all server
2019-01-07 07:16:26 -08:00
Kubernetes Prow Robot
c326c55414
Merge pull request #3507 from aledbf/remove-temporal
Remove temporal configuration file after a while
2019-01-04 11:56:29 -08:00
Manuel Alejandro de Brito Fontes
c830a73255
Remove temporal configuration file after a while 2019-01-04 16:11:38 -03:00
Kubernetes Prow Robot
79bdfcbe84
Merge pull request #3620 from walkafwalka/server-alias-metrics
Added server alias to metrics
2019-01-04 11:10:39 -08:00
Kubernetes Prow Robot
2c3ce07135
Merge pull request #3396 from flugel-it/master
New balancer implementation: consistent hash subset
2019-01-04 10:31:03 -08:00
Aaron Walker
27ace6ba40
Fixed possibility of duplicate server.Alias 2019-01-03 12:09:31 -08:00
Kubernetes Prow Robot
c62dc221bf
Merge pull request #3615 from kppullin/fix-l4-external-names
Pass k8s `Service` data through to the TCP balancer script.
2019-01-03 06:53:56 -08:00
Diego Woitasen
60b983503b Consistent hashing to a subset of nodes. It works like consistent hash,
but instead of mapping to a single node, we map to a subset of nodes.
2019-01-03 01:32:52 -03:00
Kubernetes Prow Robot
71cc6df74f
Merge pull request #3174 from Shopify/rewrite-regex
Generalize Rewrite Block Creation and Deprecate AddBaseUrl (not backwards compatible)
2019-01-02 12:30:18 -08:00
Aaron Walker
cb4e376093
Added server alias to metrics 2019-01-02 12:23:59 -08:00
Kevin Pullin
f005d4c3ec L4 config - Only send Service.Spec instead of entire Service. 2019-01-02 09:32:57 -08:00
Kubernetes Prow Robot
6d8ffd99aa
Merge pull request #3582 from aledbf/sort-by-creation
Sort ingresses by creation timestamp
2019-01-02 07:42:05 -08:00
Kevin Pullin
f0173f0822 Pass k8s Service data through to the TCP balancer script.
Fixes broken L4 ExternalName services.

Details
---------

The `tcp_udp_balancer.lua` script checks if the property
`backend.service.spec["type"]` equals "ExternalName".  If so,
the script does a DNS lookup on the name in order to configure
the backend configuration.

However, before this commit, the k8s `Service` data was
_not_ set on the `Backend` struct passed into the `tcp_udp_balancer.lua`
script and therefore the ExternalName check always returned false.

This commit fixes the issue by setting the `Service` field on
the `Backend` struct. This also requires adding a new field to the
`L4Backend` struct first, so that it's available to set on the `Backend`.
2019-01-01 20:50:41 -08:00
ramnes
bf7b5ebd81 Add an option to automatically set worker_connections based on worker_rlimit_nofile 2018-12-27 18:36:19 +01:00
Manuel Alejandro de Brito Fontes
b2fa243b97
Sort ingresses by creation timestamp 2018-12-27 10:48:01 -03:00
Anish Ramasekar
382049a0bf Adds support for HTTP2 Push Preload annotation
update test for backendprotocols

Adds support for HTTP2 Push Preload annotation

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>

Adds support for HTTP2 Push Preload annotation

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>

Adds support for HTTP2 Push Preload annotation

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>

Adds support for HTTP2 Push Preload annotation

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>

Adds support for HTTP2 Push Preload annotation

Adds support for HTTP2 Push Preload annotation
2018-12-24 17:13:25 -02:00
Maxime Ginters
1678d99a03 Add --disable-catch-all option to disable catch-all server 2018-12-21 13:22:26 -05:00
Bryan Boreham
f33a2090dd Add a flag to make per-host metrics optional
When serving many hosts from one nginx, the metrics may become too
numerous for Prometheus.  Add a flag to disable the host label, so
that metrics are totalled across all hosts.
2018-12-21 17:31:54 +00:00
Fernando Diaz
429110aa13 Add Unit Tests for getIngressInformation
Adds a unit test for the getIngressInformation
function.
2018-12-18 11:10:48 -06:00
Elvin Efendi
7a00d52141 fix status updated: make sure ingress.status is copied 2018-12-17 16:19:02 +04:00
Kubernetes Prow Robot
ee3a8fe581
Merge pull request #3505 from Shopify/watch-pod-lua
Update lua configuration_data when number of controller pod change
2018-12-17 00:10:30 -08:00
Maxime Ginters
f90881b367 Update lua configuration_data when number of controller pod change 2018-12-14 13:34:54 -05:00
Zenara Daley
67654a6fd5 Generalize Rewrite Block Creation 2018-12-13 13:02:05 -05:00
Guihua Zhu
d22146f3b0 handle_error_when_executing_diff
Signed-off-by: Guihua Zhu <zhuguihua@cmss.chinamobile.com>
2018-12-12 13:49:17 +08:00
Kubernetes Prow Robot
8ae01a2cf9
Merge pull request #3525 from Shopify/order_independence_canary_ann
make canary ingresses independent of the order they were applied
2018-12-10 11:14:55 -08:00
Conor Landry
d5840a4071 make canary ingresses independent of the order they were applied 2018-12-10 13:17:05 -05:00
Kubernetes Prow Robot
f6f18a167d
Merge pull request #3532 from ArchangelSDY/ingress-update
Ignore updates of ingresses with invalid class
2018-12-07 04:28:14 -08:00
Maxime Ginters
af460f7e15 Fix a bug with Canary becoming main server 2018-12-06 11:04:32 -05:00
Archangel_SDY
ece5e1c678 Pass k8sStore to member functions by pointer
Passing `k8sStore` by value implies read and copy of `backendConfig`,
which is not protected by a mutex and may cause race conditions.
2018-12-06 22:11:19 +08:00
Archangel_SDY
d58dbde5e3 Add a mutex to protect against simultaneous read/write to backend config
This addresses issues found by race detector.
2018-12-06 22:02:17 +08:00
Archangel_SDY
9122c08b3e Ignore updates of ingress with invalid class 2018-12-06 22:02:17 +08:00
Zhenhai Gao
05d2baede6 Fix log output format
Signed-off-by: Zhenhai Gao <gaozh1988@live.com>
2018-12-06 09:59:31 +08:00
Manuel Alejandro de Brito Fontes
68f344233b Fix lint issues 2018-12-05 13:28:28 -03:00
Manuel Alejandro de Brito Fontes
1fed943b3d Update process-exporter methods 2018-12-05 13:28:10 -03:00
Manuel Alejandro de Brito Fontes
2fa55eabf6 Replace glog with klog 2018-12-05 13:27:55 -03:00
Manuel Alejandro de Brito Fontes
06d33c16b5
Allow to disable NGINX metrics 2018-12-05 10:14:35 -03:00
Kubernetes Prow Robot
c4ba23832a
Merge pull request #3474 from aledbf/improve-parsing
Improve parsing of annotations and use of Ingress wrapper
2018-12-05 03:33:18 -08:00
Manuel Alejandro de Brito Fontes
497246f8ba
Annotations cannot being empty 2018-12-02 16:07:46 -03:00
Manuel Alejandro de Brito Fontes
f78e2e3849
Only copy fields being used 2018-12-02 15:35:36 -03:00
Manuel Alejandro de Brito Fontes
67808c0ed8
Improve parsing of annotations and use of Ingress wrapper 2018-12-02 15:35:36 -03:00
Elvin Efendi
4eabd535f9 be consistent with what Nginx supports 2018-12-02 22:20:56 +04:00
Kubernetes Prow Robot
ccd7b890fd
Merge pull request #3492 from aledbf/fix-units
Fix data size validations
2018-12-02 09:01:12 -08:00
Andre Marianiello
b80b19902a Use opentracing_grpc_propagate_context when necessary 2018-12-01 16:31:10 -05:00
k8s-ci-robot
24f3e508b4
Merge pull request #3446 from Shopify/add_tests_merge_canary
add more testing for mergeAlternativeBackends
2018-11-30 14:22:44 -08:00
Manuel Alejandro de Brito Fontes
6098f6c0e7
Fix data size validations 2018-11-30 10:40:33 -03:00
Elvin Efendi
e93763da6a delete unused LoadBalanceAlgorithm 2018-11-28 14:49:37 +04:00
Elvin Efendi
60569137ca delete unused buildLoadBalancingConfig 2018-11-28 11:55:41 +04:00
k8s-ci-robot
710ea8c76f
Merge pull request #3333 from Shopify/dont-trust-by-default
breaking change: by default do not trust any client
2018-11-27 05:12:48 -08:00
Maxime Ginters
b6b221aebb Watch controller Pods list 2018-11-26 15:35:31 -05:00
Conor Landry
988189cf9f add more testing for mergeAlternativeBackends
- fix edge cases caught by new testing
2018-11-26 10:00:57 -05:00
k8s-ci-robot
003027b800
Merge pull request #3443 from aledbf/initial-reload
Remove initial log error during reconfiguration
2018-11-21 05:44:54 -08:00
Manuel Alejandro de Brito Fontes
5d4dc78926
Remove initial log error during reconfiguration 2018-11-21 09:28:04 -03:00
k8s-ci-robot
c99716aadf
Merge pull request #3437 from Shopify/ingress-annotations
Use struct to pack Ingress and its annotations
2018-11-21 00:41:58 -08:00
Manuel Alejandro de Brito Fontes
a5341822d5 Increase log level when there is an invalid size value 2018-11-20 15:09:03 -03:00
Maxime Ginters
12766cdfc6 Use struct to pack Ingress and its annotations 2018-11-20 09:38:22 -05:00
k8s-ci-robot
96f5ae6668
Merge pull request #3417 from Shopify/fix_canary_merge_self_def
bugfix: do not merge catch-all canary backends with itself
2018-11-20 05:03:52 -08:00
k8s-ci-robot
82721e575d
Merge pull request #3372 from Shopify/session-cookie-path
Add annotation for session affinity path
2018-11-19 07:25:32 -08:00
Zenara Daley
50b29feb4a Add annotation for session affinity path 2018-11-19 09:15:24 -05:00
Manuel Alejandro de Brito Fontes
af2dce901d
Fix tests 2018-11-18 08:17:18 -03:00
Manuel Alejandro de Brito Fontes
654eceda46
Add tcp e2e test 2018-11-16 21:07:52 -03:00
Manuel Alejandro de Brito Fontes
168f30d1ec Revert removal of support for TCP and UDP services 2018-11-16 13:48:47 -03:00
Conor Landry
ec28539e43 bugfix: do not merge catch-all canary backends with itself 2018-11-13 13:20:15 -05:00
k8s-ci-robot
a22c656f30
Merge pull request #3409 from Shopify/client-max-body-size
Convert isValidClientBodyBufferSize to something more generic
2018-11-13 08:36:06 -08:00
Maxime Ginters
0f3e2b9bf0 Convert isValidClientBodyBufferSize to something more generic and use it for client_max_body_size 2018-11-13 10:11:40 -05:00
mikeweiwei
2850fb538a fix logging calls 2018-11-13 16:02:27 +08:00
Elvin Efendi
5f3b48e16d breaking change: do not trust x-forwarded-* headers by default 2018-11-13 10:35:59 +04:00
k8s-ci-robot
950a2f9174
Merge pull request #3387 from xichengliudui/fix181109
Modify the wrong function name
2018-11-09 06:14:55 -08:00
xichengliudui
d2b1d37ee3 Modify the wrong function name 2018-11-08 15:17:40 -05:00
Fernando Diaz
5195600841 Allows ModSecurity to be configured per location
The following annotations will be added:

- enable-modsecurity
- enable-owasp-core-rules
- modsecurity-transaction-id

Fixes #3167
2018-11-06 22:24:31 -06:00
k8s-ci-robot
17cad51e47
Merge pull request #3341 from Shopify/canary_upstream
Add canary annotation and alternative backends for traffic shaping
2018-11-06 12:22:16 -08:00
Conor Landry
412cd70d3a implement canary annotation and alternative backends
Adds the ability to create alternative backends. Alternative backends enable
traffic shaping by sharing a single location but routing to different
backends depending on the TrafficShapingPolicy defined by AlternativeBackends.

When the list of upstreams and servers are retrieved, we then call
mergeAlternativeBackends which iterates through the paths of every ingress
and checks if the backend supporting the path is a AlternativeBackend. If
so, we then iterate through the map of servers and find the real backend
that the AlternativeBackend should fall under. Once found, the
AlternativeBackend is embedded in the list of VirtualBackends for the real
backend.

If no matching real backend for a AlternativeBackend is found, then the
AlternativeBackend is deleted as it cannot be backed by any server.
2018-11-06 13:13:14 -05:00
k8s-ci-robot
265f96bf14
Merge pull request #3344 from ecosia/jg-customerrors-per-ingress
Adds CustomHTTPErrors ingress annotation and test
2018-11-06 09:21:49 -08:00
jasongwartz
0ebf0354cb Adds CustomHTTPErrors ingress annotation and test
Adds per-server/location error-catch functionality to nginx template

Adds documentation

Reduces template duplication with helper function for CUSTOM_ERRORS data

Updates documentation

Adds e2e test for customerrors

Removes AllCustomHTTPErrors, replaces with template function with deduplication and adds e2e test of deduplication

Fixes copy-paste error in test, adds additional test cases

Reverts noop change in controller.go (unused now)
2018-11-06 16:47:52 +01:00
k8s-ci-robot
08d5ffabbf
Merge pull request #3367 from aledbf/503-restart
Remove reloads when there is no endpoints
2018-11-06 06:39:04 -08:00
Manuel Alejandro de Brito Fontes
3838145a8c
Remove reloads when there is no endpoints 2018-11-06 09:26:04 -03:00
k8s-ci-robot
ecf605bf60
Merge pull request #3369 from SataQiu/fix-20181106
Fix some typos
2018-11-06 04:02:10 -08:00
k8s-ci-robot
c19f7eb1df
Merge pull request #3370 from xichengliudui/fix181106
Fix typo: whitlelist -> whitelist
2018-11-06 04:00:49 -08:00
xichengliudui
a13ea30e6d Fix typo: whitlelist -> whitelist 2018-11-06 04:59:03 -05:00
SataQiu
76b5a7b45e fix typos 2018-11-06 15:58:56 +08:00
mooncake
4b518ec03c Fix some typos
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-11-05 22:10:11 +08:00
liuwei
ce6e564f82 merge from master 2018-11-02 13:13:24 +08:00
Manuel Alejandro de Brito Fontes
71ebe1cba5 Code linting 2018-10-30 20:46:48 -03:00
k8s-ci-robot
bec97b36c7
Merge pull request #3321 from mbode/geoip2
Add configuration for geoip2 module
2018-10-30 05:09:38 -07:00
Maximilian Bode
c27c57dc8b Add configuration for geoip2 module
Based on closed PRs #2551, #2755
2018-10-29 21:25:23 +01:00
Manuel Alejandro de Brito Fontes
fed013ab6f Fix status update in case of connection errors 2018-10-29 13:01:41 -03:00
liuwei
ad57c76b73 Support cookie expires 2018-10-29 15:21:10 +08:00
Henry Tran
3cbfd63992 Refactor EWMA to not use shared dictionaries 2018-10-25 22:33:42 +04:00
Zenara Daley
9f2a0b6363 Add healthcheck timeout as CLA 2018-10-24 16:02:28 -04:00
Aarni Koskela
4a71111d4c Fix usages of %q formatting for numbers (%d)
This caused logs like "Adjusting ServerNameHashBucketSize variable to '@'"
2018-10-23 18:21:16 +03:00
Elvin Efendi
cdb244e579 fix two bugs with backend-protocol annotation 2018-10-19 09:11:21 -04:00
Manuel Alejandro de Brito Fontes
dc553d8f91 Refactor probe url requests 2018-10-15 16:29:32 -03:00
Manuel Alejandro de Brito Fontes
1b63ca355f
Improve dynamic lua confguration 2018-10-12 14:29:41 -03:00
k8s-ci-robot
9af9ef5fd9
Merge pull request #3230 from reactiveops/backoff-dynamic-config
Retry initial backend configuration
2018-10-12 10:01:21 -07:00
Corey O'Brien
e0020e22d1 Switch to using wait.ExponentialBackoff 2018-10-12 09:19:20 -04:00
k8s-ci-robot
0baf62dd6a
Merge pull request #3222 from diazjf/add-timeouts-and-such
Allow Ability to Configure Upstream Keepalive
2018-10-12 06:15:09 -07:00
Corey O'Brien
ee6bb942e5 Retry initial backend configuration 2018-10-12 00:12:59 -04:00
Fernando Diaz
12955a4a1b Allow Ability to Configure Upstream Keepalive
Allows Upstream Keepalive values like keepalive_timeout and
keepalive_requests to be configured via ConfigMap.

Fixes #3099
2018-10-11 20:46:42 -05:00
Manuel Alejandro de Brito Fontes
4c46ee95c9
Update leader election methods 2018-10-10 21:46:45 -03:00
k8s-ci-robot
3038da8719
Merge pull request #3215 from hchenxa/hchenxa
align opentracing user-guide with nginx configmap configuration
2018-10-10 06:56:15 -07:00
k8s-ci-robot
3edf11b85f
Merge pull request #3198 from aledbf/only-dynamic
Only support dynamic configuration
2018-10-10 05:07:34 -07:00
Hui Chen
f8052385f9 aline opentracing user-guide with nginx configmap configuration 2018-10-10 11:25:53 +08:00
Manuel Alejandro de Brito Fontes
74c2f93de6
Only support dynamic configuration 2018-10-09 22:05:45 -03:00
k8s-ci-robot
f56ab42cd2
Merge pull request #3194 from bshelton229/literal-dollar-character
Make literal $ character work in set $location_path
2018-10-09 15:52:39 -07:00
Bryan Shelton
3686e4f366 Move escapeLocationPathVar to escapeLiteralDollar 2018-10-09 12:58:50 -07:00
Elvin Efendi
78f12c25c5 delete upstream healthcheck annotation 2018-10-09 09:14:13 -04:00
Manuel Alejandro de Brito Fontes
859b298d42 Remove annotations grpc-backend and secure-backend already deprecated 2018-10-08 12:26:06 -03:00
Bryan Shelton
3dc131bd57 Make literal $ character work in set $location_path 2018-10-07 12:58:39 -07:00
Manuel Alejandro de Brito Fontes
44bdc7eb59 Remove support for TCP and UDP services 2018-10-07 10:53:37 -03:00
Zenara Daley
bd3f56eaa0 allow curly braces to be used in regex paths 2018-10-04 10:58:38 -04:00
k8s-ci-robot
d9f58144eb
Merge pull request #3145 from Shopify/regex-modifier
Add "use-regex" Annotation to Toggle Regular Expression Location Modifier
2018-10-01 11:31:43 -07:00
Zenara Daley
f29bdc3e8d Add 'use regex' annotation to toggle nginx regex location modifier 2018-10-01 13:54:11 -04:00
Zenara Daley
a7c2633e4e remove payload from log (#3135) 2018-09-26 12:09:14 -03:00
Elvin Efendi
b3a22f7fc0 do not require --default-backend-service 2018-09-25 21:14:28 -04:00
k8s-ci-robot
6393ca6aaf
Merge pull request #2997 from StarOfService/global-block-ip-ua-ref
Provide possibility to block IPs, User-Agents and Referers globally
2018-09-25 05:51:56 -07:00
Pavel Sinkevych
7212d0081b Provide possibility to block CIDRs, User-Agents and Referers globally 2018-09-25 14:16:20 +03:00
Manuel de Brito Fontes
91ae204f6c Replace standard json encoding with jsoniter 2018-09-22 14:25:01 -03:00