Skip to content

Commit 8fec6ce

Browse files
authored
RHOAIENG-23584: fix(run-rstudio.sh): expose all env vars (#1037)
1 parent 57c1422 commit 8fec6ce

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rstudio/c9s-python-3.11/run-rstudio.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ do
2323
cp -r /opt/app-root/bin/Rpackages/4.4/$package_folder /opt/app-root/src/Rpackages/4.4/
2424
fi
2525
done
26-
# rstudio terminal cant see environment variables set by the container runtime
27-
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
26+
# rstudio terminal can't see environment variables set by the container runtime;
27+
# so we set all env variables to the Renviron.site config file. For kubectl, we need the KUBERNETES_* env vars at least.
2828
# Also, we store proxy-related env vars lowercased by key so RStudio projects work with proxy by default
29-
env | grep "^KUBERNETES_" >> /usr/lib64/R/etc/Renviron.site
29+
env >> /usr/lib64/R/etc/Renviron.site
3030
env | grep "^HTTP_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
3131
env | grep "^HTTPS_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
3232
env | grep "^NO_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site

rstudio/rhel9-python-3.11/run-rstudio.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ do
2323
cp -r /opt/app-root/bin/Rpackages/4.4/$package_folder /opt/app-root/src/Rpackages/4.4/
2424
fi
2525
done
26-
# rstudio terminal cant see environment variables set by the container runtime
27-
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
26+
# rstudio terminal can't see environment variables set by the container runtime;
27+
# so we set all env variables to the Renviron.site config file. For kubectl, we need the KUBERNETES_* env vars at least.
2828
# Also, we store proxy-related env vars lowercased by key so RStudio projects work with proxy by default
29-
env | grep "^KUBERNETES_" >> /usr/lib64/R/etc/Renviron.site
29+
env >> /usr/lib64/R/etc/Renviron.site
3030
env | grep "^HTTP_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
3131
env | grep "^HTTPS_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
3232
env | grep "^NO_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site

0 commit comments

Comments
 (0)