2019-11-02 14:32:58 +00:00
|
|
|
#!/bin/sh
|
2018-03-04 17:01:38 +00:00
|
|
|
|
2019-03-03 22:51:52 +00:00
|
|
|
start_apps() {
|
2018-03-04 17:01:38 +00:00
|
|
|
# Create TLS certificate and key for HTTPS termination
|
2019-04-24 21:52:08 +00:00
|
|
|
kubectl create secret generic test-app-tls --namespace=authelia --from-file=apps/ssl/server.key --from-file=apps/ssl/server.cert
|
2018-03-04 17:01:38 +00:00
|
|
|
|
|
|
|
# Spawn the applications
|
|
|
|
kubectl apply -f apps
|
|
|
|
}
|
|
|
|
|
|
|
|
start_ingress_controller() {
|
|
|
|
kubectl apply -f ingress-controller
|
|
|
|
}
|
|
|
|
|
2019-11-16 10:38:21 +00:00
|
|
|
# Spawn Redis and storage backend
|
2018-03-04 17:01:38 +00:00
|
|
|
# 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-03 22:51:52 +00:00
|
|
|
start_mail() {
|
|
|
|
kubectl apply -f mail
|
2018-03-04 17:01:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
start_ldap() {
|
2019-04-24 21:52:08 +00:00
|
|
|
kubectl create configmap ldap-config --namespace=authelia --from-file=ldap/base.ldif --from-file=ldap/access.rules
|
2018-03-04 17:01:38 +00:00
|
|
|
kubectl apply -f ldap
|
|
|
|
}
|
|
|
|
|
|
|
|
# Create the Authelia namespace in the cluster
|
|
|
|
create_namespace() {
|
|
|
|
kubectl apply -f namespace.yml
|
|
|
|
}
|
|
|
|
|
|
|
|
create_namespace
|
|
|
|
start_storage
|
|
|
|
start_ldap
|
2019-03-03 22:51:52 +00:00
|
|
|
start_mail
|
2018-03-04 17:01:38 +00:00
|
|
|
start_ingress_controller
|
|
|
|
start_apps
|