Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine reasonable defaults for Spin Operator pod cpu/mem resources #21

Open
calebschoepp opened this issue Feb 2, 2024 · 6 comments
Assignees

Comments

@calebschoepp
Copy link
Contributor

calebschoepp commented Feb 2, 2024

Decide on default/baseline cpu/mem configuration for the Spin Operator.

Main operator container: https://github.com/fermyon/spin-operator/blob/main/config/manager/manager.yaml#L92-L100
and kube-rbac-proxy: https://github.com/fermyon/spin-operator/blob/main/config/default/manager_auth_proxy_patch.yaml#L28-L34

I'm assuming we'll want to ensure the defaults are friendly to resource-constrained or small-footprint clusters (minikube, kind, k3d).

@calebschoepp
Copy link
Contributor Author

CC @vdice

@bacongobbler
Copy link
Contributor

Is this something critical for the release? Seems like it skirts the line between "nice to have" (we document this and let users figure it out initially) vs. "must have" (it's critical for the spin-operator to have these limits in place).

What's your take on this work item's priority?

@macolso
Copy link
Contributor

macolso commented Feb 26, 2024

From a UX perspective, resource limits and requests are table stakes in the k8s world. My vote would be to place this in the "must have."

QQ: do operators work like pods, in that if we don't define resource requests/limits they get assigned a lower QoS class? Or is that just a pod construct?

@macolso macolso changed the title Spin Operator pod cpu/mem resources Determine reasonable defaults for Spin Operator pod cpu/mem resources Feb 28, 2024
@jpflueger
Copy link

One thing to keep in mind here is that when setting resource requests/limits using the containerd shim, it drastically increases the time until the startup/readiness probes pass. So if we're setting the requests/limits I would suggest also setting defaults for probes.

@bacongobbler bacongobbler self-assigned this Mar 6, 2024
@bacongobbler
Copy link
Contributor

This work was completed a while ago and is already part of the chart:

## resources represent default cpu/mem limits for the operator container.
resources:
# TODO: update these per https://github.com/spinkube/spin-operator/issues/21
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi

resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10
}}

@calebschoepp
Copy link
Contributor Author

@bacongobbler I think that part of the work here was running some load tests to see if those numbers are reasonable e.g. put 500 SpinApps on a cluster and see if the controller can keep up given it's resource limits/requests.

@calebschoepp calebschoepp reopened this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants