Skip to content

Commit

Permalink
[kots]: add proxy server configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Emms committed Sep 13, 2022
1 parent 7d3a5e8 commit f791db5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions install/installer/scripts/kots-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ yq e -i ".domain = \"${DOMAIN}\"" "${CONFIG_FILE}"
yq e -i '.license.kind = "secret"' "${CONFIG_FILE}"
yq e -i '.license.name = "gitpod-license"' "${CONFIG_FILE}"

echo "Gitpod: Inject the HTTP_PROXY settings secret"
yq e -i '.httpProxy.kind = "secret"' "${CONFIG_FILE}"
yq e -i '.httpProxy.name = "http-proxy-settings"' "${CONFIG_FILE}"

if [ "${OPEN_VSX_URL}" != "" ];
then
echo "Gitpod: Setting Open VSX Registry URL"
Expand Down
15 changes: 15 additions & 0 deletions install/kots/manifests/gitpod-http-proxy-settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
# Licensed under the MIT License. See License-MIT.txt in the project root for license information.

apiVersion: v1
kind: Secret
metadata:
name: http-proxy-settings
labels:
app: gitpod
component: gitpod-installer
type: Opaque
data:
httpProxy: repl{{ HTTPProxy | Base64Encode | quote }}
httpsProxy: repl{{ HTTPSProxy | Base64Encode | quote }}
noProxy: repl{{ printf "kotsadm,.%s,%s" (ConfigOption "domain") (NoProxy) | Base64Encode | quote }}
2 changes: 1 addition & 1 deletion install/kots/manifests/gitpod-installer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
containers:
- name: installer
# This will normally be the release tag
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-move-kots-bash-script.28"
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-proxy-config.23"
volumeMounts:
- mountPath: /config-patch
name: config-patch
Expand Down
7 changes: 7 additions & 0 deletions install/kots/manifests/kots-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ spec:
- |
CONNECTION="error"
export http_proxy="{{repl HTTPProxy }}"
export HTTP_PROXY="{{repl HTTPProxy }}"
export https_proxy="{{repl HTTPSProxy }}"
export HTTPS_PROXY="{{repl HTTPSProxy }}"
export no_proxy="{{repl NoProxy }}"
export NO_PROXY="{{repl NoProxy }}"
if [ '{{repl HasLocalRegistry }}' = "true" ];
then
# Don't test for airgapped
Expand Down

0 comments on commit f791db5

Please sign in to comment.