Skip to content

Commit d5bbaed

Browse files
committed
Add support for image pull secrets
Signed-off-by: Manuel Alejandro de Brito Fontes <[email protected]>
1 parent 40aaad2 commit d5bbaed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ function install() {
100100
# Install Calico.
101101
kubectl apply -f https://docs.projectcalico.org/manifests/calico-vxlan.yaml
102102

103+
# Create secret with container registry credentials
104+
if [ -n "${IMAGE_PULL_SECRET_FILE}" ] && [ -f "${IMAGE_PULL_SECRET_FILE}" ]; then
105+
kubectl create secret generic gitpod-image-pull-secret \
106+
--from-file=.dockerconfigjson="${IMAGE_PULL_SECRET_FILE}" \
107+
--type=kubernetes.io/dockerconfigjson >/dev/null 2>&1 || true
108+
fi
109+
103110
if ${AWS_CMD} iam get-role --role-name "${CLUSTER_NAME}-region-${AWS_REGION}-role-eksadmin" > /dev/null 2>&1; then
104111
KUBECTL_ROLE_ARN=$(${AWS_CMD} iam get-role --role-name "${CLUSTER_NAME}-region-${AWS_REGION}-role-eksadmin" | jq -r .Role.Arn)
105112
else

0 commit comments

Comments
 (0)