Skip to content

Commit 624d685

Browse files
author
Simon Emms
committed
[kots]: only add to base image allow list in airgapped mode
1 parent fd9fd4d commit 624d685

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,20 @@ spec:
144144
145145
if [ '{{repl HasLocalRegistry }}' = "true" ];
146146
then
147-
echo "Gitpod: configuring mirrored container registry"
147+
echo "Gitpod: configuring mirrored container registry for airgapped installation"
148148
149149
yq e -i ".repository = \"{{repl LocalRegistryAddress }}\"" "${CONFIG_FILE}"
150150
yq e -i ".imagePullSecrets[0].kind = \"secret\"" "${CONFIG_FILE}"
151151
yq e -i ".imagePullSecrets[0].name = \"{{repl ImagePullSecretName }}\"" "${CONFIG_FILE}"
152152
yq e -i '.dropImageRepo = true' "${CONFIG_FILE}"
153+
154+
# Add the registry to the server allowlist
155+
yq e -i ".containerRegistry.privateBaseImageAllowList += \"{{repl LocalRegistryHost }}\"" "${CONFIG_FILE}"
153156
fi
154157
155158
# Output the local registry secret - this is proxy.replicated.com if user hasn't set their own
156159
echo "{{repl LocalRegistryImagePullSecret }}" | base64 -d > /tmp/kotsregistry.json
157160
158-
# Add the registries to the server allowlist
159-
yq e -i ".containerRegistry.privateBaseImageAllowList += $(cat /tmp/kotsregistry.json | jq '.auths' | jq -rc 'keys')" "${CONFIG_FILE}"
160-
161161
if [ '{{repl ConfigOptionEquals "reg_incluster" "0" }}' = "true" ];
162162
then
163163
echo "Gitpod: configuring external container registry"

0 commit comments

Comments
 (0)