Skip to content

Commit

Permalink
[kots]: add proxy service type to advanced options
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Emms authored and roboquat committed Jul 6, 2022
1 parent 41ad209 commit 1b1248d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install/kots/manifests/gitpod-installation-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
containers:
- name: installation-status
# This will normally be the release tag
image: "eu.gcr.io/gitpod-core-dev/build/installer:tar-preview-telemetry.25"
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-clusterip.8"
command:
- /bin/sh
- -c
Expand Down
13 changes: 12 additions & 1 deletion install/kots/manifests/gitpod-installer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
containers:
- name: installer
# This will normally be the release tag
image: "eu.gcr.io/gitpod-core-dev/build/installer:tar-preview-telemetry.25"
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-clusterip.8"
volumeMounts:
- mountPath: /config-patch
name: config-patch
Expand Down Expand Up @@ -263,6 +263,15 @@ spec:
if [ '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}' = "true" ];
then
echo "Gitpod: Applying advanced configuration"
if [ '{{repl ConfigOptionNotEquals "component_proxy_service_serviceType" "" }}' = "true" ];
then
# Empty string defaults to LoadBalancer. This maintains backwards compatibility with the deprecated experimental value
echo "Gitpod: Applying Proxy service type"
yq e -i ".components.proxy.service.serviceType = \"{{repl ConfigOption "component_proxy_service_serviceType" }}\"" "${CONFIG_FILE}"
fi
if [ '{{repl ConfigOptionNotEquals "customization_patch" "" }}' = "true" ];
then
CUSTOMIZATION='{{repl ConfigOptionData "customization_patch" | Base64Encode }}'
Expand All @@ -271,6 +280,8 @@ spec:
# Apply the customization property - if something else is set, this will be ignored
yq e -i ".customization = $(echo "${CUSTOMIZATION}" | base64 -d | yq e -o json '.customization' - | jq -rc) // []" "${CONFIG_FILE}"
fi
else
echo "Gitpod: No advanced configuration applied"
fi
echo "Gitpod: Update platform telemetry value"
Expand Down
21 changes: 21 additions & 0 deletions install/kots/manifests/kots-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,24 @@ spec:
required: false
when: '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}'
help_text: A file with Gitpod config that will be used to patch the generated Gitpod config. Usually provided by Gitpod as a way to tailor your installation.

- name: components
title: Components
description: Customize your component configuration
when: '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}'
items:
- name: component_proxy_service_serviceType
title: Proxy service type
default: ""
help_text: |
Select the [Service Type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
for the Proxy service. If using anything other than "Load Balancer", you are responsible for configuring your network to route
traffic through to the `proxy` service.
type: select_one
items:
- name: ""
title: Load balancer
- name: ClusterIP
title: Cluster IP
- name: NodePort
title: Node port

0 comments on commit 1b1248d

Please sign in to comment.