Open pat-s opened 1 year ago
Howdy @pat-s ! Thanks for sending this along!
We actually have a slightly more native option for configuring resources
today.
launcher:
launcherKubernetesProfilesConf:
"*":
default-cpu: 2
default-mem-mb: 2048
cpu-request-ratio: 0.1
memory-request-ratio: 0.2
https://docs.posit.co/job-launcher/kube.html#kube-profiles
Unfortunately this is global and not specified per content. We are shooting for an even-more-native implementation which will allow users to specify resources inside of the UI similar to "number of processes", "connection timeouts," etc. This will allow varying resource selection per content item using the API.
If you have any feedback on whether you would expect this resource-permission selection to be set by publishers or admins-only, or what mechanics would be ideal (i.e. a default value, and users can override, etc.), that would be most welcome!
Just noting that we have a resource
block in our helm connect values currently, but it's not referenced anywhere: https://github.com/rstudio/helm/blob/main/charts/rstudio-connect/values.yaml#L178-L188.
The commented out code examples are also causing helm template
to silently fail in our ci with:
Error: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Resources: v1.ResourceRequirements.Limits: unmarshalerDecoder: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$', error found in #10 byte of ...|led":false,"ephemera|..., bigger context ...|esources":{"limits":{"cpu":"2000m","enabled":false,"ephemeralStorage":"200Mi","memory":"2Gi"},"reque|...
If we want to get our ci fixed we should remove these bits, though we could fix forward and allow setting resource limits with a little effort.
Motivation: AKS has some
azure-policies
in place which deny spawning pods without a resource definition. This applies to thepackrat-restore
pods and eventually denies app deployment.values.yml
:As a workaround I am currently trying with
but this specification results in a 500 from the launcher.
EDIT:
I see the values are just passed along as is and are not limited by the
values.yml
specification.So the following
works!