Skip to content

Commit ee71ee5

Browse files
author
Simon Emms
committed
[kots]: add proxy server configuration
1 parent e0647b1 commit ee71ee5

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

install/installer/scripts/kots-install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ yq e -i ".domain = \"${DOMAIN}\"" "${CONFIG_FILE}"
7676
yq e -i '.license.kind = "secret"' "${CONFIG_FILE}"
7777
yq e -i '.license.name = "gitpod-license"' "${CONFIG_FILE}"
7878

79+
echo "Gitpod: Inject the HTTP_PROXY settings secret"
80+
yq e -i '.httpProxy.kind = "secret"' "${CONFIG_FILE}"
81+
yq e -i '.httpProxy.name = "http-proxy-settings"' "${CONFIG_FILE}"
82+
7983
if [ "${OPEN_VSX_URL}" != "" ];
8084
then
8185
echo "Gitpod: Setting Open VSX Registry URL"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
# Licensed under the MIT License. See License-MIT.txt in the project root for license information.
3+
4+
apiVersion: v1
5+
kind: Secret
6+
metadata:
7+
name: http-proxy-settings
8+
labels:
9+
app: gitpod
10+
component: gitpod-installer
11+
type: Opaque
12+
data:
13+
httpProxy: repl{{ HTTPProxy | Base64Encode | quote }}
14+
httpsProxy: repl{{ HTTPSProxy | Base64Encode | quote }}
15+
noProxy: repl{{ printf "kotsadm,.%s,%s" (ConfigOption "domain") (NoProxy) | Base64Encode | quote }}

install/kots/manifests/gitpod-installer-job.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
containers:
4040
- name: installer
4141
# This will normally be the release tag
42-
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-move-kots-bash-script.28"
42+
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-proxy-config.23"
4343
volumeMounts:
4444
- mountPath: /config-patch
4545
name: config-patch

install/kots/manifests/kots-preflight.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ spec:
7777
- |
7878
CONNECTION="error"
7979
80+
export http_proxy="{{repl HTTPProxy }}"
81+
export HTTP_PROXY="{{repl HTTPProxy }}"
82+
export https_proxy="{{repl HTTPSProxy }}"
83+
export HTTPS_PROXY="{{repl HTTPSProxy }}"
84+
export no_proxy="{{repl NoProxy }}"
85+
export NO_PROXY="{{repl NoProxy }}"
86+
8087
if [ '{{repl HasLocalRegistry }}' = "true" ];
8188
then
8289
# Don't test for airgapped

0 commit comments

Comments
 (0)