Skip to content

Commit

Permalink
do encoding and decoding
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati committed Aug 17, 2022
1 parent b4a191e commit 5a04f3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install/kots/manifests/gitpod-installer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ spec:
| base64 -d \
> /tmp/gitpodregistry.json
DOCKER_CONFIG='{{repl ConfigOptionData "reg_docker_config" }}'
export REGISTRY_SECRET=$(cat "${DOCKER_CONFIG}" /tmp/gitpodregistry.json | jq -s '.[0] * .[1]' - - | base64 -w 0)
DOCKER_CONFIG='{{repl ConfigOptionData "reg_docker_config" | Base64Encode }}'
echo "${DOCKER_CONFIG}" | base64 -d > /tmp/userregistry.json
export REGISTRY_SECRET=$(jq -s '.[0] * .[1]' /tmp/userregistry.json /tmp/gitpodregistry.json | base64 -w 0)
echo "Gitpod: update the in-cluster registry secret"
yq eval-all --inplace '(select(.kind == "Secret" and .metadata.name == "builtin-registry-auth") | .data.".dockerconfigjson") |= env(REGISTRY_SECRET)' \
Expand Down

0 comments on commit 5a04f3f

Please sign in to comment.