Skip to content

Commit

Permalink
added grabbing proxy-related env vars from container context and sett…
Browse files Browse the repository at this point in the history
…ing them in R

Signed-off-by: shalberd <[email protected]>
  • Loading branch information
shalberd committed Dec 5, 2024
1 parent ecd9e76 commit 6aa943b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rstudio/c9s-python-3.11/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ do
done
# rstudio terminal cant see environment variables set by the container runtime
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
# Also, we store proxy-related env vars lowercased by key so RStudio projects work with proxy by default
env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site
env | grep HTTP_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
env | grep HTTPS_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
env | grep NO_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site

export USER=$(whoami)

Expand Down
4 changes: 4 additions & 0 deletions rstudio/c9s-python-3.9/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ do
done
# rstudio terminal cant see environment variables set by the container runtime
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
# Also, we store proxy-related env vars lowercased by key so RStudio projects work with proxy by default
env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site
env | grep HTTP_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
env | grep HTTPS_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
env | grep NO_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site

export USER=$(whoami)

Expand Down

0 comments on commit 6aa943b

Please sign in to comment.