about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <vincent@kivra.com>2016-03-02T14·31+0100
committerVincent Ambo <vincent@kivra.com>2016-03-02T14·31+0100
commit83eb026d3e441294419e7edce96f2d745b7266ef (patch)
treeb9045ed5b5fa1c0aceb86233bed5300a15ec2a92
parenta2c95a740d84f71158b28776b337407269251ce5 (diff)
[nginx] Add versioned RC
-rw-r--r--nginx/nginx-rc.yaml8
-rw-r--r--nginx/server.conf3
2 files changed, 9 insertions, 2 deletions
diff --git a/nginx/nginx-rc.yaml b/nginx/nginx-rc.yaml
index 5a1c1f43689b..e876ae09374a 100644
--- a/nginx/nginx-rc.yaml
+++ b/nginx/nginx-rc.yaml
@@ -6,16 +6,18 @@ metadata:
   labels:
     app: nginx
     version: 1.9.11
-    spec: v1
+    spec: v2
 spec:
   replicas: 2
   selector:
     app: nginx
+    rcv: v2
   template:
     metadata:
       labels:
         app: nginx
         lb-target: nginx
+        rcv: v2
     spec:
       containers:
         - image: nginx:1.9.11
@@ -27,6 +29,8 @@ spec:
               mountPath: /etc/nginx/ssl/dhparam
             - name: nginx-config
               mountPath: /etc/nginx/conf.d
+            - name: nginx-logs
+              mountPath: /var/log/nginx
           ports:
             - containerPort: 80
             - containerPort: 443
@@ -40,3 +44,5 @@ spec:
         - name: nginx-config
           secret:
             secretName: nginx-config
+        - name: nginx-logs
+          emptyDir: {}
diff --git a/nginx/server.conf b/nginx/server.conf
index 965e36259dad..269c519bff1f 100644
--- a/nginx/server.conf
+++ b/nginx/server.conf
@@ -6,6 +6,8 @@ log_format logstash '$http_host '
 '$request_time '
 '$upstream_response_time';
 
+access_log   /var/log/nginx/access.log  logstash;
+
 # Modern SSL config
 ssl_protocols TLSv1.2;
 ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
@@ -25,7 +27,6 @@ add_header Strict-Transport-Security max-age=15768000;
 server {
     listen       80;
     server_name  *.tazj.in tazj.in;
-    access_log   /var/log/nginx/tls_redirect.log  logstash;
     return       301 https://$server_name$request_uri;
 }