openanalytics / shinyproxy

ShinyProxy - Open Source Enterprise Deployment for Shiny and data science apps
https://www.shinyproxy.io
Apache License 2.0
525 stars 151 forks source link

proxy.kubernetes.node-selector not working #471

Closed cdenneen closed 6 months ago

cdenneen commented 10 months ago

Based on the documentation it appear the following is the proper syntax:

  proxy:
    stop-proxies-on-shutdown: false
    landing-page: /
    favicon-path: favicon.ico
    heartbeat-rate: 10000
    heartbeat-timeout: 60000
    containerBackend: kubernetes
    kubernetes:
      internal-networking: true
      image-pull-policy: Always
      node-selector: "kubernetes.io/arch=amd64"

However I have seen the following in some people's examples:

proxy:
  kubernetes:
    node-selector:
      kubernetes.io/arch: amd64

honestly the later would be preferred but right now the proxy comes up without the nodeSelctor actually set:

QoS Class:                   Burstable
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s

But you can see from inspecting the shinyproxy resource it is there:

$ kubectl -n shinyproxy get shinyproxy proxy1 -o jsonpath='{.spec.proxy.kubernetes.node-selector}'
kubernetes.io/arch=amd64

I'm using shinyproxy-operator: 2.0.0

LEDfan commented 10 months ago

Hi

The first syntax you posted is the correct one, e.g.:

proxy:
   kubernetes:
      node-selector: "kubernetes.io/os=linux,kubernetes.io/arch=amd64"

I will add this example to the documentation.

Please note that this selector is added to the pods created by ShinyProxy, such as a Shiny app you specified in the ShinyProxy config. This configuration is not used by the operator and therefore is not added to the ShinyProxy pod itself. If you need to add a nodeSelector to the shinyproxy pod itself, you can use kubernetesPodTemplateSpecPatches, see: https://github.com/openanalytics/shinyproxy-operator/tree/master/docs/deployment#modify-the-shinyproxy-pod

LEDfan commented 6 months ago

Hi, since I believe this question has been answered and the documentation has been updated, I'll close this issue. Please open a new issue or re-open this issue if you are still experiencing an issue.