42 lines
1.2 KiB
Bash
Executable file
42 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
echo ""
|
|
echo "... ] DEPLOYING SYSTEM SERVICES [ ..."
|
|
|
|
HOME=$( cd "$(dirname "$0")" && pwd )
|
|
source $HOME/config
|
|
|
|
if [ -f $HOME/config-coreapps ]; then
|
|
echo "config-coreapps file FOUND :)"
|
|
source $HOME/config-coreapps
|
|
else
|
|
echo "config-coreapps file is missing."
|
|
exit 1
|
|
fi
|
|
|
|
export KUBECONFIG=$ADMIN_KUBECONFIG
|
|
export HELM_CACHE_HOME=~/.cache/helm
|
|
export HELM_CONFIG_HOME=~/.config/helm
|
|
export HELM_DATA_HOME=~/.local/share/helm
|
|
|
|
# Setup Ingress-Nginx
|
|
kubectl create namespace ingress-nginx
|
|
if $CERT_MODE; then
|
|
printf "\ndeploying ingress-nginx helm chart WITH TLS termination in TCP/PROXY mode...\n"
|
|
k8x_proxy_mode="true"
|
|
else
|
|
printf "\ndeploying ingress-nginx helm chart WITHOUT TLS termination in HTTP mode...\n"
|
|
k8x_proxy_mode="false"
|
|
fi
|
|
k8x_maxmind_lic="4rD1ICHnexjd6KaY"
|
|
|
|
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
|
|
helm repo update
|
|
helm install \
|
|
ingress-nginx ingress-nginx/ingress-nginx \
|
|
--namespace ingress-nginx \
|
|
--set-string controller.config.use-proxy-protocol="${k8x_proxy_mode}" \
|
|
--set-string controller.maxmindLicenseKey="${k8x_maxmind_lic}" \
|
|
--version 3.15.2 \
|
|
-f yaml/ingress-nginx/values.yaml
|
|
|