Files
home-docker/apply.sh
T
2020-06-07 17:21:33 +10:00

56 lines
1.7 KiB
Bash
Executable File

#! /bin/bash -eu
## install nginx ingress controller grafana dashboards
# https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards
kubectl -n kube-system apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
k apply -f prometheus-pv.yml -n default
helm upgrade --install prometheus -n default -f prometheus-values.yaml stable/prometheus-operator
k create namespace nginx-ingress
helm upgrade --install ingress bitnami/nginx-ingress-controller -n nginx-ingress -f nginx-values.yaml
k apply -f prometheus-ingress.yml
kubectl -n default create secret generic oauth2-proxy-creds \
--from-literal=cookie-secret=ZuThURd/AK9ouHNxg0Czhg== \
--from-literal=client-id=4f46385b435275c693ec \
--from-literal=client-secret=518d5b4693aaaee3e62ce5b8d9da6ec5cc160098
helm upgrade oauth2-proxy --install stable/oauth2-proxy \
--reuse-values \
--values oauth2-proxy-config.yaml
k apply -f postgres-pv.yml -n default
k create namespace db && helm upgrade --install postgres -n db -f postgres-values.yaml bitnami/postgresql
# media applications
k apply -f media.yaml
# influxdb
helm upgrade --install influxdb bitnami/influxdb --namespace db \
--set adminUser.name=junv \
--set adminUser.pwd=Lovewifi2020! \
--set persistence.storageClass=manual \
--set persistence.existingClaim=influxdb \
--set influxdb.securityContext.fsGroup=1000 \
--set influxdb.securityContext.runAsUser=1000
# metabase
k apply -f metabase.yaml -n home-apps
# create secret
kubectl -n apps create secret generic database-credentials --from-literal=password=wGWHn9bhjJbM27V
k apply -f pihole-pv.yaml -n home-apps
kubectl -n home-apps create secret generic pihole-admin-password --from-literal=webpassword=Uj2s3iUkRubkJs4