From 1577312fb8cf2bce1b0e55b3b48ffc2e6d73b508 Mon Sep 17 00:00:00 2001 From: dandds Date: Wed, 31 Jul 2019 16:30:26 -0400 Subject: [PATCH] Add htpwasswd for basic auth on login-dev. Add the k8s secret and volume mount for the htpasswd file. --- k8s/aws/aws.yml | 10 ++++++++++ k8s/azure/azure.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/k8s/aws/aws.yml b/k8s/aws/aws.yml index dfb434b0..a5ab4588 100644 --- a/k8s/aws/aws.yml +++ b/k8s/aws/aws.yml @@ -57,6 +57,9 @@ spec: subPath: atst.conf - name: uwsgi-socket-dir mountPath: "/var/run/uwsgi" + - name: nginx-htpasswd + mountPath: "/etc/nginx/.htpasswd" + subPath: .htpasswd volumes: - name: atst-config secret: @@ -81,6 +84,13 @@ spec: - name: uwsgi-socket-dir emptyDir: medium: Memory + - name: nginx-htpasswd + secret: + secretName: atst-nginx-htpasswd + items: + - key: htpasswd + path: .htpasswd + mode: 0640 --- apiVersion: extensions/v1beta1 kind: Deployment diff --git a/k8s/azure/azure.yml b/k8s/azure/azure.yml index 2040e24e..8fc03623 100644 --- a/k8s/azure/azure.yml +++ b/k8s/azure/azure.yml @@ -57,6 +57,9 @@ spec: subPath: atst.conf - name: uwsgi-socket-dir mountPath: "/var/run/uwsgi" + - name: nginx-htpasswd + mountPath: "/etc/nginx/.htpasswd" + subPath: .htpasswd volumes: - name: atst-config secret: @@ -81,6 +84,13 @@ spec: - name: uwsgi-socket-dir emptyDir: medium: Memory + - name: nginx-htpasswd + secret: + secretName: atst-nginx-htpasswd + items: + - key: htpasswd + path: .htpasswd + mode: 0640 --- apiVersion: extensions/v1beta1 kind: Deployment