I’m running shinyproxy on google cloud kubernetes. There I claimed a persistent storage. Now I want my shiny apps spinned up by shinyproxy to be able to access this storage. I tried different setups but failed until now.
On the shinyproxy pods the volume is mounted but not on the shiny apps that are launched by shinyproxy.
The app atlas_test2
does not even launches while atlas_test3
get launched but does not mount the volume.
This is my current deployment yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
name: shinyproxy
spec:
selector:
matchLabels:
run: shinyproxy
replicas: 1
template:
metadata:
labels:
run: shinyproxy
spec:
containers:
- name: shinyproxy
image: shinyproxy-example:v1.0-2
imagePullPolicy: Always
ports:
- containerPort: 8080
volumeMounts:
- name: shiny-persistent-storage
mountPath: /srv/shiny-server/www
- name: kube-proxy-sidecar
image: kube-proxy-sidecar:v1.0-0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8001
volumes:
- name: shiny-persistent-storage
persistentVolumeClaim:
claimName: sp-volumeclaim
My application.yaml file looks like this
proxy:
port: 8080
authentication: simple
admin-groups: admins
users:
- name: jack
password: password
groups: admins
- name: jeff
password: password
groups: user
- name: demo
password: demo
groups: demo
container-backend: kubernetes
kubernetes:
internal-networking: true
url: http://localhost:8001
container-log-path: ./container-logs
specs:
- id: atlas_test2
display-name: Atlas
container-cmd: ["R", "-e", "shiny::runApp('/srv/shiny-server/atlas', host = '0.0.0.0', port = 3838, launch.browser = FALSE, quiet = TRUE)"]
container-image: atlas:v1.0-1
container-volumes: ["/srv/shiny-server/www:/srv/shiny-server/www"]
access-groups: [demo, user]
- id: atlas_test3
display-name: Atlas
container-cmd: ["R", "-e", "shiny::runApp('/srv/shiny-server/atlas', host = '0.0.0.0', port = 3838, launch.browser = FALSE, quiet = TRUE)"]
container-image: atlas:v1.0-1
access-groups: [demo, user]
proxy.kubernetes.volumeMounts:
- name: shiny-persistent-storage
mountPath: /srv/shiny-server/www
logging:
file:
shinyproxy.log
server:
servlet:
context-path: /