2018-03-05 00:01:38 +07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-03-04 05:51:52 +07:00
|
|
|
start_apps() {
|
2018-03-05 00:01:38 +07:00
|
|
|
# Create TLS certificate and key for HTTPS termination
|
2019-03-04 05:51:52 +07:00
|
|
|
kubectl create secret generic test-app-tls --namespace=authelia --from-file=apps/ssl/tls.key --from-file=apps/ssl/tls.crt
|
2018-03-05 00:01:38 +07:00
|
|
|
|
|
|
|
# Spawn the applications
|
|
|
|
kubectl apply -f apps
|
|
|
|
}
|
|
|
|
|
|
|
|
start_ingress_controller() {
|
|
|
|
kubectl apply -f ingress-controller
|
|
|
|
}
|
|
|
|
|
2019-03-04 05:51:52 +07:00
|
|
|
start_dashboard() {
|
|
|
|
kubectl apply -f dashboard
|
2018-03-05 00:01:38 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
# Spawn Redis and Mongo as backend for Authelia
|
|
|
|
# Please note they are not configured to be distributed on several machines
|
|
|
|
start_storage() {
|
|
|
|
kubectl apply -f storage
|
|
|
|
}
|
|
|
|
|
|
|
|
# Create a fake mailbox to catch emails sent by Authelia
|
2019-03-04 05:51:52 +07:00
|
|
|
start_mail() {
|
|
|
|
kubectl apply -f mail
|
2018-03-05 00:01:38 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
start_ldap() {
|
|
|
|
kubectl apply -f ldap
|
|
|
|
}
|
|
|
|
|
|
|
|
# Create the Authelia namespace in the cluster
|
|
|
|
create_namespace() {
|
|
|
|
kubectl apply -f namespace.yml
|
|
|
|
}
|
|
|
|
|
|
|
|
create_namespace
|
2019-03-04 05:51:52 +07:00
|
|
|
start_dashboard
|
2018-03-05 00:01:38 +07:00
|
|
|
start_storage
|
|
|
|
start_ldap
|
2019-03-04 05:51:52 +07:00
|
|
|
start_mail
|
2018-03-05 00:01:38 +07:00
|
|
|
start_ingress_controller
|
|
|
|
start_apps
|