Skip to content

Commit 4c3637c

Browse files
author
Simon Emms
committed
[kots]: add proxy server configuration
1 parent f16a41d commit 4c3637c

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed

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.3"
4343
volumeMounts:
4444
- mountPath: /config-patch
4545
name: config-patch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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: ConfigMap
6+
metadata:
7+
name: proxy-server # Name set in /install/installer/pkg/common/constants.go
8+
labels:
9+
app: gitpod
10+
component: gitpod-installer
11+
# annotations:
12+
# kots.io/when: '{{repl ConfigOptionEquals "proxy_server_enabled" "1" }}'
13+
data:
14+
httpProxy: '{{repl (ConfigOption "proxy_server_http_proxy" | default (HTTPProxy)) }}'
15+
httpsProxy: '{{repl ConfigOption "proxy_server_https_proxy" | default (HTTPSProxy) }}'
16+
noProxy: '{{repl NoProxy }},{{repl ConfigOption "proxy_server_no_proxy" }}' # Merge the KOTS NO_PROXY so we don't lose the ability to talk to it

install/kots/manifests/kots-config.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,37 @@ spec:
382382
383383
Add the domain only (eg, `gitpod.io`). Separate multiple domains with spaces.
384384
385+
- name: proxy_server
386+
title: Proxy server
387+
description: Route your access through a proxy server
388+
items:
389+
- name: proxy_server_enabled
390+
title: Route through a proxy server
391+
type: bool
392+
default: "0"
393+
help_text: Configure proxy access to the Internet
394+
395+
- name: proxy_server_http_proxy
396+
title: HTTP proxy
397+
type: text
398+
default: '{{repl HTTPProxy }}'
399+
when: '{{repl ConfigOptionEquals "proxy_server_enabled" "1" }}'
400+
help_text: Configure HTTP proxy server to route all traffic through. This should be in the format "user:[email protected]:1234"
401+
402+
- name: proxy_server_https_proxy
403+
title: HTTPS proxy
404+
type: text
405+
default: '{{repl HTTPSProxy }}'
406+
when: '{{repl ConfigOptionEquals "proxy_server_enabled" "1" }}'
407+
help_text: Configure HTTPS proxy server to route all traffic through. This should be in the format "user:[email protected]:1234"
408+
409+
- name: proxy_server_no_proxy
410+
title: No proxy
411+
type: text
412+
default: '{{repl NoProxy }}'
413+
when: '{{repl ConfigOptionEquals "proxy_server_enabled" "1" }}'
414+
help_text: Configure URLs that bypass the proxy. This should be a CSV in the format "domain1.com,domain2.com".
415+
385416
- name: advanced
386417
title: Advanced Options
387418
description: Here are advanced options that you should only make use of in coordination with us or when you know what you are doing.

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)