mirror of
https://github.com/openfaas/faas.git
synced 2025-06-17 12:46:59 +00:00
Deploy basic auth plugin
As part of #1209, this change deploys, but does not enable the new basic-auth plugin service. Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
03ebf167c0
commit
6d8ebc65f1
@ -6,6 +6,7 @@ if ! [ -x "$(command -v docker)" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export BASIC_AUTH="true"
|
export BASIC_AUTH="true"
|
||||||
|
export AUTH_URL="http://basic-auth-plugin:8080/validate"
|
||||||
|
|
||||||
sha_cmd="shasum -a 256"
|
sha_cmd="shasum -a 256"
|
||||||
if ! command -v shasum >/dev/null; then
|
if ! command -v shasum >/dev/null; then
|
||||||
@ -17,6 +18,7 @@ do
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
--no-auth | -n)
|
--no-auth | -n)
|
||||||
export BASIC_AUTH="false"
|
export BASIC_AUTH="false"
|
||||||
|
export AUTH_URL=""
|
||||||
;;
|
;;
|
||||||
--help | -h)
|
--help | -h)
|
||||||
echo "Usage: \n [default]\tdeploy the OpenFaaS core services\n --no-auth [-n]\tdisable basic authentication.\n --help\tdisplays this screen"
|
echo "Usage: \n [default]\tdeploy the OpenFaaS core services\n --no-auth [-n]\tdisable basic authentication.\n --help\tdisplays this screen"
|
||||||
|
@ -3,7 +3,7 @@ services:
|
|||||||
gateway:
|
gateway:
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
image: openfaas/gateway:0.12.0
|
image: openfaas/gateway:0.13.6
|
||||||
networks:
|
networks:
|
||||||
- functions
|
- functions
|
||||||
environment:
|
environment:
|
||||||
@ -21,6 +21,8 @@ services:
|
|||||||
scale_from_zero: "true" # Enable if you want functions to scale from 0/0 to min replica count upon invoke
|
scale_from_zero: "true" # Enable if you want functions to scale from 0/0 to min replica count upon invoke
|
||||||
max_idle_conns: 1024
|
max_idle_conns: 1024
|
||||||
max_idle_conns_per_host: 1024
|
max_idle_conns_per_host: 1024
|
||||||
|
auth_proxy_url: "${AUTH_URL:-}"
|
||||||
|
auth_proxy_pass_body: "false"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
# limits: # Enable if you want to limit memory usage
|
# limits: # Enable if you want to limit memory usage
|
||||||
@ -39,6 +41,32 @@ services:
|
|||||||
- basic-auth-user
|
- basic-auth-user
|
||||||
- basic-auth-password
|
- basic-auth-password
|
||||||
|
|
||||||
|
# auth service provide basic-auth plugin for system APIs
|
||||||
|
basic-auth-plugin:
|
||||||
|
image: openfaas/basic-auth-plugin:0.1.0
|
||||||
|
networks:
|
||||||
|
- functions
|
||||||
|
environment:
|
||||||
|
secret_mount_path: "/run/secrets/"
|
||||||
|
deploy:
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- "node.role == manager"
|
||||||
|
- "node.platform.os == linux"
|
||||||
|
resources:
|
||||||
|
# limits: # Enable if you want to limit memory usage
|
||||||
|
# memory: 100M
|
||||||
|
reservations:
|
||||||
|
memory: 50M
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 20
|
||||||
|
window: 380s
|
||||||
|
secrets:
|
||||||
|
- basic-auth-user
|
||||||
|
- basic-auth-password
|
||||||
|
|
||||||
# Docker Swarm provider
|
# Docker Swarm provider
|
||||||
faas-swarm:
|
faas-swarm:
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user