Last active
December 18, 2016 01:12
-
-
Save theobolo/48724a1ebeef6296d7bfcc2b4feb9844 to your computer and use it in GitHub Desktop.
IngressController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using system's kubectl: /home/coursierprive/kubernetes/cluster/kubectl.sh | |
NAMESPACE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
default application-apimobile 10.3.254.241 <none> 80/TCP 3h | |
default default-http-backend 10.3.160.229 <none> 80/TCP 3h | |
default jenkins 10.3.252.1 <none> 80/TCP,50000/TCP 2h | |
default kubernetes 10.3.0.1 <none> 443/TCP 4h | |
kube-system dashboard-canary 10.3.15.88 nodes 80/TCP 4h | |
kube-system kube-dns 10.3.0.10 <none> 53/UDP,53/TCP 4h | |
NAMESPACE NAME READY STATUS RESTARTS AGE | |
default application-apimobile-3444075748-203lx 1/1 Running 0 3h | |
default application-apimobile-3444075748-40hyq 1/1 Running 0 2h | |
default application-apimobile-3444075748-aiej6 1/1 Running 0 3h | |
default application-apimobile-3444075748-cbcnf 1/1 Running 0 2h | |
default application-apimobile-3444075748-guihx 1/1 Running 0 3h | |
default application-apimobile-3444075748-h0775 1/1 Running 0 3h | |
default application-apimobile-3444075748-i720z 1/1 Running 0 2h | |
default application-apimobile-3444075748-kctr9 1/1 Running 0 2h | |
default application-apimobile-3444075748-qytxf 1/1 Running 0 3h | |
default application-apimobile-3444075748-x8j5x 1/1 Running 0 2h | |
default default-http-backend-b5do5 1/1 Running 0 3h | |
default jenkins-client-wz1co 1/1 Running 0 2h | |
default jenkins-vh0g9 1/1 Running 0 2h | |
default nginx-ingress-lb-18hep 1/1 Running 0 9m | |
default nginx-ingress-lb-9lbhl 1/1 Running 0 9m | |
default nginx-ingress-lb-pv8ae 1/1 Running 0 9m | |
default nginx-ingress-lb-rh862 1/1 Running 0 9m | |
default nginx-ingress-lb-sedxj 1/1 Running 0 9m | |
default nginx-ingress-lb-zg9g9 1/1 Running 0 9m | |
kube-system k8s-master-kube-20160428-120550-vm-master 4/4 Running 2 4h | |
kube-system k8s-node-kube-20160428-120550-vm-node000000 1/1 Running 0 4h | |
kube-system k8s-node-kube-20160428-120550-vm-node000002 1/1 Running 0 4h | |
kube-system k8s-node-kube-20160428-120550-vm-node000003 1/1 Running 0 4h | |
kube-system k8s-node-kube-20160428-120550-vm-node000004 1/1 Running 0 4h | |
kube-system k8s-node-kube-20160428-120550-vm-node000005 1/1 Running 0 4h | |
kube-system kube-dns-v11-mf2qf 4/4 Running 0 4h | |
kube-system kubernetes-dashboard-canary-o36gt 1/1 Running 0 4h | |
NAMESPACE NAME RULE BACKEND ADDRESS AGE | |
default apimobile-map - 10.0.1.4,10.0.0.6,10.0.0.6,10.0.0.4,10.0.0.8,10.0.0.9,10.0.0.7 3h | |
azureapi.coursierprive.com | |
/apimobile application-apimobile:80 | |
kube-20160428-120550-loadbalancer.northeurope.cloudapp.azure.com | |
/ application-apimobile:80 | |
NAMESPACE NAME DESIRED CURRENT AGE | |
default default-http-backend 1 1 3h | |
default jenkins 1 1 2h | |
default jenkins-client 1 1 2h | |
kube-system kube-dns-v11 1 1 4h | |
kube-system kubernetes-dashboard-canary 1 1 4h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using system's kubectl: /home/coursierprive/kubernetes/cluster/kubectl.sh | |
I0428 16:52:39.202214 1 main.go:94] Using build: https://github.com/bprashanth/contrib.git - git-7fbd252 | |
I0428 16:52:39.463096 1 main.go:129] Validated default/default-http-backend as the default backend | |
W0428 16:52:39.463498 1 ssl.go:90] no file dhparam.pem found in secrets | |
I0428 16:52:39.466325 1 controller.go:743] starting NGINX loadbalancer controller | |
I0428 16:52:39.466941 1 command.go:33] Starting NGINX process... | |
I0428 16:52:39.472889 1 event.go:211] Event(api.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"apimobile-map", UID:"c70c096b-0d44-11e6-b2a1-000d3ab2cc3c", APIVersion:"extensions", ResourceVersion:"12863", FieldPath:""}): type: 'Normal' reason: 'CREATE' default/apimobile-map | |
I0428 16:52:41.091244 1 controller.go:274] Updating loadbalancer default/apimobile-map with IP 10.0.0.9 | |
I0428 16:52:41.114727 1 command.go:72] change in configuration detected. Reloading... | |
I0428 16:52:41.536493 1 event.go:211] Event(api.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"apimobile-map", UID:"c70c096b-0d44-11e6-b2a1-000d3ab2cc3c", APIVersion:"extensions", ResourceVersion:"12952", FieldPath:""}): type: 'Normal' reason: 'UPDATE' default/apimobile-map | |
I0428 16:52:41.565592 1 event.go:211] Event(api.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"apimobile-map", UID:"c70c096b-0d44-11e6-b2a1-000d3ab2cc3c", APIVersion:"extensions", ResourceVersion:"12863", FieldPath:""}): type: 'Normal' reason: 'CREATE' ip: 10.0.0.9 | |
I0428 16:52:44.902132 1 event.go:211] Event(api.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"apimobile-map", UID:"c70c096b-0d44-11e6-b2a1-000d3ab2cc3c", APIVersion:"extensions", ResourceVersion:"12969", FieldPath:""}): type: 'Normal' reason: 'UPDATE' default/apimobile-map | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:20 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.010 10.2.13.3:8080 0 0.005 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:36 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.005 10.2.13.3:8080 0 0.004 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:37 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.005 10.2.13.5:8080 0 0.003 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:38 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.008 10.2.13.5:8080 0 0.006 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:38 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.017 10.2.38.3:8080 0 0.015 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:38 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.003 10.2.38.3:8080 0 0.002 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:38 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.008 10.2.38.5:8080 0 0.007 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:39 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.004 10.2.38.5:8080 0 0.002 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:39 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.023 10.2.52.2:8080 0 0.022 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:39 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.007 10.2.52.2:8080 0 0.005 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:40 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.012 10.2.52.4:8080 0 0.011 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:53:41 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 800 0.006 10.2.52.4:8080 0 0.004 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:12 +0000] "GET /apimobile/ HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 775 0.017 10.2.56.2:8080 0 0.015 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:13 +0000] "GET /apimobile/ HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 818 0.007 10.2.56.2:8080 0 0.005 404 | |
2016/04/28 16:54:14 [error] 21#21: *4 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.2.38.1, server: azureapi.coursierprive.com, request: "GET /favicon.ico HTTP/1.1", host: "azureapi.coursierprive.com", referrer: "http://azureapi.coursierprive.com/apimobile/" | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:14 +0000] "GET /favicon.ico HTTP/1.1" 404 53 "http://azureapi.coursierprive.com/apimobile/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 773 0.001 - - - - | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:14 +0000] "GET /apimobile/ HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 818 0.012 10.2.56.4:8080 0 0.011 404 | |
2016/04/28 16:54:14 [error] 21#21: *4 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.2.38.1, server: azureapi.coursierprive.com, request: "GET /favicon.ico HTTP/1.1", host: "azureapi.coursierprive.com", referrer: "http://azureapi.coursierprive.com/apimobile/" | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:14 +0000] "GET /favicon.ico HTTP/1.1" 404 53 "http://azureapi.coursierprive.com/apimobile/" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 773 0.001 - - - - | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:14 +0000] "GET /apimobile/ HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 818 0.004 10.2.56.4:8080 0 0.003 404 | |
10.2.38.1 - [10.2.38.1] - - [28/Apr/2016:16:54:43 +0000] "GET /apimobile HTTP/1.1" 404 53 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" 774 0.018 10.2.64.2:8080 0 0.014 404 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using system's kubectl: /home/coursierprive/kubernetes/cluster/kubectl.sh | |
daemon off; | |
worker_processes 2; | |
pid /run/nginx.pid; | |
worker_rlimit_nofile 131072; | |
pcre_jit on; | |
events { | |
multi_accept on; | |
worker_connections 16384; | |
use epoll; | |
} | |
http { | |
# lus sectrion to return proper error codes when custom pages are used | |
lua_package_path '.?.lua;./etc/nginx/lua/?.lua;/etc/nginx/lua/vendor/lua-resty-http/lib/?.lua;'; | |
init_by_lua_block { | |
require("error_page") | |
} | |
sendfile on; | |
aio threads; | |
tcp_nopush on; | |
tcp_nodelay on; | |
log_subrequest on; | |
reset_timedout_connection on; | |
keepalive_timeout 75s; | |
types_hash_max_size 2048; | |
server_names_hash_max_size 512; | |
server_names_hash_bucket_size 256; | |
include /etc/nginx/mime.types; | |
default_type text/html; | |
gzip on; | |
gzip_comp_level 5; | |
gzip_http_version 1.1; | |
gzip_min_length 256; | |
gzip_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component; | |
gzip_proxied any; | |
gzip_vary on; | |
client_max_body_size "1m"; | |
log_format upstreaminfo '$remote_addr - ' | |
'[$proxy_add_x_forwarded_for] - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' | |
'$request_length $request_time $upstream_addr $upstream_response_length $upstream_response_time $upstream_status'; | |
access_log /var/log/nginx/access.log upstreaminfo; | |
error_log /var/log/nginx/error.log notice; | |
# Custom dns resolver. | |
resolver 10.3.0.10 valid=30s; | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
# trust http_x_forwarded_proto headers correctly indicate ssl offloading | |
map $http_x_forwarded_proto $pass_access_scheme { | |
default $http_x_forwarded_proto; | |
'' $scheme; | |
} | |
# Map a response error watching the header Content-Type | |
map $http_accept $httpAccept { | |
default html; | |
application/json json; | |
application/xml xml; | |
text/plain text; | |
} | |
map $httpAccept $httpReturnType { | |
default text/html; | |
json application/json; | |
xml application/xml; | |
text text/plain; | |
} | |
server_name_in_redirect off; | |
port_in_redirect off; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
# turn on session caching to drastically improve performance | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_session_timeout 10m; | |
# allow configuring ssl session tickets | |
ssl_session_tickets on; | |
# slightly reduce the time-to-first-byte | |
ssl_buffer_size 4k; | |
# allow configuring custom ssl ciphers | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
ssl_prefer_server_ciphers on; | |
# Custom error pages | |
proxy_intercept_errors on; | |
error_page 403 = @custom_403; | |
error_page 404 = @custom_404; | |
error_page 405 = @custom_405; | |
error_page 408 = @custom_408; | |
error_page 413 = @custom_413; | |
error_page 501 = @custom_501; | |
error_page 502 = @custom_502; | |
error_page 503 = @custom_503; | |
error_page 504 = @custom_504; | |
# In case of errors try the next upstream server before returning an error | |
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504 ; | |
upstream default-application-apimobile-80 { | |
least_conn; | |
server 10.2.13.3:8080; | |
server 10.2.13.5:8080; | |
server 10.2.38.3:8080; | |
server 10.2.38.5:8080; | |
server 10.2.52.2:8080; | |
server 10.2.52.4:8080; | |
server 10.2.56.2:8080; | |
server 10.2.56.4:8080; | |
server 10.2.64.2:8080; | |
server 10.2.64.5:8080; | |
} | |
upstream default-jenkins-80 { | |
least_conn; | |
server 10.2.52.5:8080; | |
} | |
upstream upstream-default-backend { | |
least_conn; | |
server 10.2.64.3:8080; | |
} | |
server { | |
listen 80; | |
server_name _; | |
location / { | |
proxy_set_header Host $host; | |
# Pass Real IP | |
proxy_set_header X-Real-IP $remote_addr; | |
# Allow websocket connections | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-Proto $pass_access_scheme; | |
proxy_connect_timeout 5s; | |
proxy_send_timeout 60s; | |
proxy_read_timeout 60s; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_pass http://upstream-default-backend; | |
} | |
# this is required to avoid error if nginx is being monitored | |
# with an external software (like sysdig) | |
location /nginx_status { | |
allow 127.0.0.1; | |
deny all; | |
access_log off; | |
stub_status on; | |
} | |
location @custom_403 { | |
internal; | |
content_by_lua_block { | |
openURL(403) | |
} | |
} | |
location @custom_404 { | |
internal; | |
content_by_lua_block { | |
openURL(404) | |
} | |
} | |
location @custom_405 { | |
internal; | |
content_by_lua_block { | |
openURL(405) | |
} | |
} | |
location @custom_408 { | |
internal; | |
content_by_lua_block { | |
openURL(408) | |
} | |
} | |
location @custom_413 { | |
internal; | |
content_by_lua_block { | |
openURL(413) | |
} | |
} | |
location @custom_502 { | |
internal; | |
content_by_lua_block { | |
openURL(502) | |
} | |
} | |
location @custom_503 { | |
internal; | |
content_by_lua_block { | |
openURL(503) | |
} | |
} | |
location @custom_504 { | |
internal; | |
content_by_lua_block { | |
openURL(504) | |
} | |
} | |
} | |
server { | |
listen 80; | |
server_name azureapi.coursierprive.com; | |
location / { | |
proxy_set_header Host $host; | |
# Pass Real IP | |
proxy_set_header X-Real-IP $remote_addr; | |
# Allow websocket connections | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-Proto $pass_access_scheme; | |
proxy_connect_timeout 5s; | |
proxy_send_timeout 60s; | |
proxy_read_timeout 60s; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_pass http://default-jenkins-80; | |
} | |
location /jenkins { | |
proxy_set_header Host $host; | |
# Pass Real IP | |
proxy_set_header X-Real-IP $remote_addr; | |
# Allow websocket connections | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-Proto $pass_access_scheme; | |
proxy_connect_timeout 5s; | |
proxy_send_timeout 60s; | |
proxy_read_timeout 60s; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_pass http://default-jenkins-80; | |
} | |
location @custom_403 { | |
internal; | |
content_by_lua_block { | |
openURL(403) | |
} | |
} | |
location @custom_404 { | |
internal; | |
content_by_lua_block { | |
openURL(404) | |
} | |
} | |
location @custom_405 { | |
internal; | |
content_by_lua_block { | |
openURL(405) | |
} | |
} | |
location @custom_408 { | |
internal; | |
content_by_lua_block { | |
openURL(408) | |
} | |
} | |
location @custom_413 { | |
internal; | |
content_by_lua_block { | |
openURL(413) | |
} | |
} | |
location @custom_502 { | |
internal; | |
content_by_lua_block { | |
openURL(502) | |
} | |
} | |
location @custom_503 { | |
internal; | |
content_by_lua_block { | |
openURL(503) | |
} | |
} | |
location @custom_504 { | |
internal; | |
content_by_lua_block { | |
openURL(504) | |
} | |
} | |
} | |
server { | |
listen 80; | |
server_name kube-20160428-120550-loadbalancer.northeurope.cloudapp.azure.com; | |
location / { | |
proxy_set_header Host $host; | |
# Pass Real IP | |
proxy_set_header X-Real-IP $remote_addr; | |
# Allow websocket connections | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-Proto $pass_access_scheme; | |
proxy_connect_timeout 5s; | |
proxy_send_timeout 60s; | |
proxy_read_timeout 60s; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_pass http://default-application-apimobile-80; | |
} | |
location @custom_403 { | |
internal; | |
content_by_lua_block { | |
openURL(403) | |
} | |
} | |
location @custom_404 { | |
internal; | |
content_by_lua_block { | |
openURL(404) | |
} | |
} | |
location @custom_405 { | |
internal; | |
content_by_lua_block { | |
openURL(405) | |
} | |
} | |
location @custom_408 { | |
internal; | |
content_by_lua_block { | |
openURL(408) | |
} | |
} | |
location @custom_413 { | |
internal; | |
content_by_lua_block { | |
openURL(413) | |
} | |
} | |
location @custom_502 { | |
internal; | |
content_by_lua_block { | |
openURL(502) | |
} | |
} | |
location @custom_503 { | |
internal; | |
content_by_lua_block { | |
openURL(503) | |
} | |
} | |
location @custom_504 { | |
internal; | |
content_by_lua_block { | |
openURL(504) | |
} | |
} | |
} | |
# default server, including healthcheck | |
server { | |
listen 8080 default_server reuseport; | |
location /healthz { | |
access_log off; | |
return 200; | |
} | |
location /nginx_status { | |
access_log off; | |
stub_status on; | |
} | |
location / { | |
proxy_pass http://upstream-default-backend; | |
} | |
location @custom_403 { | |
internal; | |
content_by_lua_block { | |
openURL(403) | |
} | |
} | |
location @custom_404 { | |
internal; | |
content_by_lua_block { | |
openURL(404) | |
} | |
} | |
location @custom_405 { | |
internal; | |
content_by_lua_block { | |
openURL(405) | |
} | |
} | |
location @custom_408 { | |
internal; | |
content_by_lua_block { | |
openURL(408) | |
} | |
} | |
location @custom_413 { | |
internal; | |
content_by_lua_block { | |
openURL(413) | |
} | |
} | |
location @custom_502 { | |
internal; | |
content_by_lua_block { | |
openURL(502) | |
} | |
} | |
location @custom_503 { | |
internal; | |
content_by_lua_block { | |
openURL(503) | |
} | |
} | |
location @custom_504 { | |
internal; | |
content_by_lua_block { | |
openURL(504) | |
} | |
} | |
} | |
# default server for services without endpoints | |
server { | |
listen 8181; | |
location / { | |
content_by_lua_block { | |
openURL(503) | |
} | |
} | |
} | |
} | |
stream { | |
# TCP services | |
# UDP services | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment