Skip to content

Commit

Permalink
RStudio global env vars: changed K8S env var search to beginning-of-l…
Browse files Browse the repository at this point in the history
…ine regex format, changed env var search for PROXY-related vars to begginning-of-line regex format

Signed-off-by: shalberd <[email protected]>
  • Loading branch information
shalberd committed Dec 9, 2024
1 parent 6aa943b commit f68eb64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions rstudio/c9s-python-3.11/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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
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
8 changes: 4 additions & 4 deletions rstudio/c9s-python-3.9/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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
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 f68eb64

Please sign in to comment.