Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions cos/pipeline/02configure
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ target=${target}:${MOD_PARAMS[__MICROK8S_CHANNEL__]}
MOD_PASSTHROUGH_OPTS+=( --release-name $target )

# Automatically use proxy if in prodstack only
if $(timeout 1s getent hosts squid.internal &> /dev/null) && [ -z "${MOD_PARAMS[__CONTAINERD_PROXY__]}" ]; then
MOD_MSGS[1_proxy.0]='PROXY: squid.internal exists, setting containerd proxy to http://squid.internal:3128'
MOD_PARAMS[__CONTAINERD_PROXY__]=http://squid.internal:3128
if [ -z "${MOD_PARAMS[__CONTAINERD_PROXY__]}" ]; then
if [[ -n ${http_proxy:-""} ]]; then
MOD_PARAMS[__CONTAINERD_PROXY__]=${http_proxy}
elif $(timeout 1s nc -vz egress.ps7.internal 3128 &> /dev/null); then
MOD_MSGS[1_proxy.0]='PROXY: egress.ps7.internal reachable, setting containerd proxy to http://egress.ps7.internal:3128'
MOD_PARAMS[__CONTAINERD_PROXY__]=http://egress.ps7.internal:3128
elif $(timeout 1s nc -vz squid.internal 3128 &> /dev/null); then
MOD_MSGS[1_proxy.0]='PROXY: squid.internal reachable, setting containerd proxy to http://squid.internal:3128'
MOD_PARAMS[__CONTAINERD_PROXY__]=http://squid.internal:3128
fi
fi

if ! has_opt --charmed-ceph-lxd && ! has_opt --microceph; then
Expand Down
14 changes: 12 additions & 2 deletions identity-platform/configure
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ if ! snap list | grep -q helm; then
sudo snap install helm --classic
fi

# Detect proxy
_proxy=${https_proxy:-${http_proxy:-""}}
if [[ -z "$_proxy" ]]; then
if $(timeout 1s nc -vz egress.ps7.internal 3128 &> /dev/null); then
_proxy=http://egress.ps7.internal:3128
elif $(timeout 1s nc -vz squid.internal 3128 &> /dev/null); then
_proxy=http://squid.internal:3128
fi
fi

# Install authentik
kubectl get ns authentik &> /dev/null || kubectl create ns authentik
https_proxy=http://squid.internal:3128 helm repo add authentik https://charts.goauthentik.io
https_proxy=http://squid.internal:3128 helm repo update
https_proxy=${_proxy} helm repo add authentik https://charts.goauthentik.io
https_proxy=${_proxy} helm repo update
helm install authentik authentik/authentik -f ./authentik-values.yaml -n authentik --version 2024.10.1

timeout=0
Expand Down
9 changes: 7 additions & 2 deletions microk8s/pipeline/02configure
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ target=${target}:${MOD_PARAMS[__MICROK8S_CHANNEL__]}
MOD_PASSTHROUGH_OPTS+=( --release-name $target )

# Automatically use proxy if in prodstack only
if $(timeout 1s getent hosts squid.internal &> /dev/null) && [ -z "${MOD_PARAMS[__CONTAINERD_PROXY__]}" ]; then
MOD_MSGS[1_proxy.0]='PROXY: squid.internal exists, setting containerd proxy to http://squid.internal:3128'
if [[ -n ${http_proxy:-""} ]]; then
MOD_PARAMS[__CONTAINERD_PROXY__]=${http_proxy}
elif $(timeout 1s nc -vz egress.ps7.internal 3128 &> /dev/null); then
MOD_MSGS[1_proxy.0]='PROXY: egress.ps7.internal reachable, setting containerd proxy to http://egress.ps7.internal:3128'
MOD_PARAMS[__CONTAINERD_PROXY__]=http://egress.ps7.internal:3128
elif $(timeout 1s nc -vz squid.internal 3128 &> /dev/null); then
MOD_MSGS[1_proxy.0]='PROXY: squid.internal reachable, setting containerd proxy to http://squid.internal:3128'
MOD_PARAMS[__CONTAINERD_PROXY__]=http://squid.internal:3128
fi

Expand Down
Loading