Add htpwasswd for basic auth on login-dev.

Add the k8s secret and volume mount for the htpasswd file.
This commit is contained in:
dandds 2019-07-31 16:30:26 -04:00
parent 6280fc3c08
commit 1577312fb8
2 changed files with 20 additions and 0 deletions

View File

@ -57,6 +57,9 @@ spec:
subPath: atst.conf subPath: atst.conf
- name: uwsgi-socket-dir - name: uwsgi-socket-dir
mountPath: "/var/run/uwsgi" mountPath: "/var/run/uwsgi"
- name: nginx-htpasswd
mountPath: "/etc/nginx/.htpasswd"
subPath: .htpasswd
volumes: volumes:
- name: atst-config - name: atst-config
secret: secret:
@ -81,6 +84,13 @@ spec:
- name: uwsgi-socket-dir - name: uwsgi-socket-dir
emptyDir: emptyDir:
medium: Memory medium: Memory
- name: nginx-htpasswd
secret:
secretName: atst-nginx-htpasswd
items:
- key: htpasswd
path: .htpasswd
mode: 0640
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment

View File

@ -57,6 +57,9 @@ spec:
subPath: atst.conf subPath: atst.conf
- name: uwsgi-socket-dir - name: uwsgi-socket-dir
mountPath: "/var/run/uwsgi" mountPath: "/var/run/uwsgi"
- name: nginx-htpasswd
mountPath: "/etc/nginx/.htpasswd"
subPath: .htpasswd
volumes: volumes:
- name: atst-config - name: atst-config
secret: secret:
@ -81,6 +84,13 @@ spec:
- name: uwsgi-socket-dir - name: uwsgi-socket-dir
emptyDir: emptyDir:
medium: Memory medium: Memory
- name: nginx-htpasswd
secret:
secretName: atst-nginx-htpasswd
items:
- key: htpasswd
path: .htpasswd
mode: 0640
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment