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

Support memory and disk requests for staging apps #2715

Open
tcdowney opened this issue Jul 20, 2023 · 4 comments
Open

Support memory and disk requests for staging apps #2715

tcdowney opened this issue Jul 20, 2023 · 4 comments
Labels
epic good first issue Good for newcomers incomplete This issue still needs fleshing out

Comments

@tcdowney
Copy link
Member

tcdowney commented Jul 20, 2023

Description

CF for VMs specifies memory and disk requests/limits (there is no distinction between these on CF) for app staging tasks on Diego. The specific values for these come from several potential sources:

  1. The staging_memory_in_mb and staging_disk_in_mb properties can be set when creating a Build via POST /v3/builds
  2. If nothing is specifically requested on the Build then the staging task will use the memory and disk_quota fields associated with the app's web Process unless those values are lower than a globally configured minimum

The logic for this lives here in Cloud Controller:
https://github.com/cloudfoundry/cloud_controller_ng/blob/640009b846362fbd443e79ad559700a9e1999846/app/actions/build_create.rb#L147-L161

Korifi does not currently specify any requests/limits on the kpack Image by default, but does allow the platform operator to optionally specific global minimum requests as of #2685.

Stories


Considerations

  • Currently Korifi does not set memory/disk requests by default when staging apps. Changing the default behavior may be surprising to operators since it could impact pod scheduling on their clusters.
  • CF for VMs supports quotas at the org and space level that allow the operator limit how much memory/disk apps in a given org or space can use. This is an important guardrail to prevent someone from requesting an absurd amount of resources. Korifi does not support quotas at this time, but we may consider putting ResourceQuotas in place to prevent abuse (or at least documenting that this could be done) or putting some other sort of limits in place.
@tcdowney tcdowney added incomplete This issue still needs fleshing out epic good first issue Good for newcomers labels Jul 20, 2023
@denispeyrusaubes
Copy link

Hi, is there a play to use space-quota using korifi on EKS/ECR ?

cf  create-space-quota myquota -i 2M -m 2G -r 5 -s 20

returns :

API endpoint not found at 'https://api.cf.retengr.io/v3/space_quotas'

@tcdowney
Copy link
Member Author

tcdowney commented Aug 4, 2023

Hi @denispeyrusaubes, Korifi doesn't currently support the Cloud Foundry-style quotas and their associated endpoints. In the meantime I recommend using Kubernetes ResourceQuotas in your namespaces to put up some guardrails around resource consumption.

We might eventually support those endpoints, but nothing is planned in the near-term.

@denispeyrusaubes
Copy link

ok, thank for your response.
Is there a place where all not supported endpoints are listed ?
I am migrating my training material from old kubecf to korifi, and some exercices cannot be ran anymore :(

@tcdowney
Copy link
Member Author

tcdowney commented Aug 4, 2023

Is there a place where all not supported endpoints are listed ? I am migrating my training material from old kubecf to korifi, and some exercices cannot be ran anymore :(

The closest thing we've got are these docs which list the endpoints which are supported. We don't have anything that lists the inverse.

and some exercices cannot be ran anymore :(

If you're willing, we'd appreciate it if you created issues for anything missing that you feel is important. We're always looking for feedback from the community to help us prioritize what to work on next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic good first issue Good for newcomers incomplete This issue still needs fleshing out
Projects
Status: Draft
Development

No branches or pull requests

2 participants