ducky/nginx
2015-06-30
ducky/nginx/services/nginx.json
Make nginx kubernetes-ready. Add our upstream definitions, to route requests to our ducky-authd service and our ducky-subscriptionsd service. Remove the test handler that was installed at /. Update our proxy-redirect rules so the proxy redirects actually work now, and what used to redirect us to /profiles now redirects us to /auth/profiles. Define a Replication Controller that will spin up nginx pods for us and auto-attach the necessary JWT secret volume to read our JWT secret. Define a Service that will route to nginx for us.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/nginx.json Tue Jun 30 00:40:12 2015 -0400 1.3 @@ -0,0 +1,34 @@ 1.4 +{ 1.5 + "kind":"Service", 1.6 + "apiVersion":"v1", 1.7 + "metadata":{ 1.8 + "name":"ducky-nginx", 1.9 + "labels":{ 1.10 + "name":"nginx", 1.11 + "context": "ducky", 1.12 + "repo": "ducky--nginx", 1.13 + "role": "proxy" 1.14 + } 1.15 + }, 1.16 + "spec":{ 1.17 + "ports": [ 1.18 + { 1.19 + "name": "http", 1.20 + "port": 80, 1.21 + "targetPort": "http" 1.22 + }, 1.23 + { 1.24 + "name": "https", 1.25 + "port": 443, 1.26 + "targetPort": "https" 1.27 + } 1.28 + ], 1.29 + "selector":{ 1.30 + "name":"nginx", 1.31 + "context": "ducky", 1.32 + "repo": "ducky--nginx", 1.33 + "role": "proxy" 1.34 + }, 1.35 + "type": "LoadBalancer" 1.36 + } 1.37 +}