From 6cd0c301716d70d95bb9f14414aa5d78043e976b Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Wed, 7 Sep 2022 10:13:06 +0000 Subject: [PATCH] [kots]: add proxy server configuration --- install/kots/manifests/gitpod-installer-job.yaml | 2 +- install/kots/manifests/gitpod-proxy-server.yaml | 14 ++++++++++++++ install/kots/manifests/kots-preflight.yaml | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 install/kots/manifests/gitpod-proxy-server.yaml diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 0fe7a5629d946c..82911eaebd24fd 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -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.22" volumeMounts: - mountPath: /config-patch name: config-patch diff --git a/install/kots/manifests/gitpod-proxy-server.yaml b/install/kots/manifests/gitpod-proxy-server.yaml new file mode 100644 index 00000000000000..f50e6060cc3d69 --- /dev/null +++ b/install/kots/manifests/gitpod-proxy-server.yaml @@ -0,0 +1,14 @@ +# 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: ConfigMap +metadata: + name: proxy-server # Name set in /install/installer/pkg/common/constants.go + labels: + app: gitpod + component: gitpod-installer +data: + httpProxy: repl{{ HTTPProxy | quote }} + httpsProxy: repl{{ HTTPProxy | quote }} + noProxy: '.{{repl ConfigOption "domain" }},{{repl NoProxy }}' diff --git a/install/kots/manifests/kots-preflight.yaml b/install/kots/manifests/kots-preflight.yaml index dc350d44af5771..d6e78afbf786b6 100644 --- a/install/kots/manifests/kots-preflight.yaml +++ b/install/kots/manifests/kots-preflight.yaml @@ -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