# Customize resource limits for renku On-premise sessions

**URL:** <https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936>\
**Category:** Renku Admin\
**Created:** [2 November 2023 14:20 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936 "2023-11-02T14:20:17Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [2 November 2023 14:20 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/1 "2023-11-02T14:20:17Z")

</div>

Hello everyone,

I’d like to change the limit values of these resources in capture.  
In the doc I found that this is in the config **notebooks.serverOptions** as on the second capture.  
but when I add all serverOptions config (as taken from the doc) and modify the resources limit interval and even the displayName value, these changes are not updated in my renku On-premise instance.

same for defaultSessionImage: “renku/renkulab-py:3.9-0.18.0”  
which is in the notebooks config, when I define my own image, it’s still not updated

my version of renku is 0.38.0

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/5b6815d63f879bd1794d3984cb1f7e9142800c76.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/3f90540263319294be2556b6138e9da7b1a5408a.png)

link to the values.yaml reference containing the config

> <https://github.com/SwissDataScienceCenter/renku/blob/master/helm-chart/renku/values.yaml>

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [7 November 2023 06:51 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/2 "2023-11-07T06:51:00Z")

</div>

Does anyone have any ideas please , I’m still having this problem?

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [7 November 2023 08:16 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/3 "2023-11-07T08:16:29Z")

</div>

Hi @franckyfrancky - sorry about the delay, hopefully I can help clarify things.

There are two types of configuration: first (shown in your first image) is the project configuration. Here you can specify which resources the project (ideally) needs to work smoothly. The second type is the configuration of the resources for the instance. I believe it is this second one that you are struggling with.

In [version 0.31.0](https://github.com/SwissDataScienceCenter/renku/releases/tag/0.31.0) we introduced the concept of “resource classes” in Renku. These are pre-configured combinations of cpu and storage requests for sessions. The values you are setting under `serverOptions` serve only as a default starting point for setting these classes - these defaults can be modified, and new resource pools and classes added, through the API. We are about to make a new release that adds an admin panel which allows you to more easily modify the resource pools and classes ([here are the docs](https://github.com/SwissDataScienceCenter/renku/pull/3347)). You’ll be able to use the admin panel from renku version 0.42.1 (should be released today).

Hope that helps!

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [7 November 2023 08:24 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/4 "2023-11-07T08:24:20Z")

</div>

actually the docs PR just got merged, you can see the page [here](https://renku.readthedocs.io/en/latest/how-to-guides/admin/crc.html). As mentioned above, please wait for 0.42.1 before using this feature.

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [7 November 2023 11:27 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/5 "2023-11-07T11:27:05Z")

</div>

Hi @rrrrrok

Thanks for your clarification.  
As you said, I also thought that serverOptions served as the default starting point for the settings, which is why I thought that by changing these values (increasing the values) it would also allow me to set larger resource values when starting a session.

But as my new capture below shows, I couldn’t start a session with a GPU or 3 RAM (\>2), so I went to the session settings and filled in the RAM:3 and GPU:1 fields, and I come back to the start a session page and I have these errors highlighted in red.

so if I can’t increase this from serverOptions, I have to go through the SWAGGER API, right?  
If so, which endpoint is it?

Indeed, my wish is in addition to the resources, to be able to modify the defaultSessionImage ect… but if that’s possible from the API, then that’s fine too 🙂

Great for the admin panel to come in 0.42.1

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/ace8500832e1bf019ec08cc2a388ff053e94d548.png)

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [7 November 2023 12:15 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/6 "2023-11-07T12:15:15Z")

</div>

> so if I can’t increase this from serverOptions, I have to go through the SWAGGER API, right?  
> If so, which endpoint is it?

yes exactly - the `serverOptions` in the values file are just used to initialize the database, but have no effect after that. In fact, we will likely remove them altogether in a future release.

You can see some instructions on how to use the swagger API [here](https://renku.readthedocs.io/en/latest/how-to-guides/admin/crc.html#working-with-the-compute-resource-control-service). Note that you have to first give your user the `renku-admin` role in keycloak, before you can perform any admin actions via the API.

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [8 November 2023 11:11 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/7 "2023-11-08T11:11:55Z")

</div>

Hi @rrrrrok ,

Regarding the definition of resources through swagger, I have a permission problem when I try to update a resource pool as you can see on my screenshot. I have passed the renku-admin role on keycloak to the user and I use clients \> renku \> settings ( **client id** and **client secret** to authorize in swagger).

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/81aba353b9141e1e282fdb5f707bdc9323efd2b1.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/49cdcfc1cd78ba55a9f361b2fc7d0be8e362cb8a.png)

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [8 November 2023 11:26 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/8 "2023-11-08T11:26:39Z")

</div>

Hi @franckyfrancky - make sure you are using the PKCE flow when you authenticate in swagger. The error you are seeing could be because of the client not the user.

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [8 November 2023 11:27 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/9 "2023-11-08T11:27:17Z")

</div>

I also tried to migrate to renku 0.42.0 to benefit from the admin panel, but I have several pods that fail, I may for the moment stay on renku 0.38.0 unless you have an idea of why my pods fail with 0.42.0

below is a description of 3 failed pods

 ![Capture d'écran 2023-11-08 100553](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/2f89b3f1d04a3f752d423cd4b0c2e9ae7a0c87c8.png)

 ![describe pod renku-token-repository-55c6f75d48-qkxcw](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/b14f68b509580c7af7dbda9d44fe8007b5db9495.png)

 ![describe pod renku-webhook-service-585b9cf896-s5d6s](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/f78b23a99cb6d7791361d6afe5cb93e58b355ed4.png)

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [8 November 2023 11:28 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/10 "2023-11-08T11:28:41Z")

</div>

> [@rrrrrok](#):
>
> make sure you are using the PKCE flow when you authenticate in swagger. The error you are seeing could be because of the client not the user.

yes, with this I no longer get the same message

![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/a702168de69a46636b4a3c678227c923073f384b.png)

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [8 November 2023 12:06 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/12 "2023-11-08T12:06:40Z")

</div>

but I can’t find the right payload for the PATCH, there are always suggestions on the expected values, yet this body looks like the example body proposed on swagger.

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/d9e5d68bc3ee7ec7917eb535789ec49a03d0f821.png)

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [13 November 2023 16:27 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/13 "2023-11-13T16:27:29Z")

</div>

Hi @franckyfrancky - we had some bugs in some of the endpoints of that service and fixed many of them in the `0.42.1` bugfix release - which version are you working with now?

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [13 November 2023 17:31 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/14 "2023-11-13T17:31:18Z")

</div>

> [@rrrrrok](#):
>
> 0.42.1

Hi @rrrrrok

Now I’m using version 0.38.0 and it’s in this version that I’m trying to manage resources using swagger.

I’ve also tried to upgrade to version 0.42.1 to get the admin panel, but I get the above error, as shown in the image of my terminal.

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [13 November 2023 17:31 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/15 "2023-11-13T17:31:34Z")

</div>

apart from the version upgrade of the renku helm repo, are there any other configurations or changes (values) required to go from version 0.3.x to 0.4.x?

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [13 November 2023 21:12 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/16 "2023-11-13T21:12:29Z")

</div>

Hi @franckyfrancky - all of the helm configuration changes are listed in the [values changelog file](https://github.com/SwissDataScienceCenter/renku/blob/master/helm-chart/values.yaml.changelog.md). In particular, version `0.39.0` is a major refactoring of the helm chart so some care needs to be taken to upgrade to that version.

---

<div class="post-metadata">

**Author:** ![franckyfrancky](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@franckyfrancky](https://renku.discourse.group/u/franckyfrancky)\
**Post date:** [15 November 2023 08:31 UTC](https://renku.discourse.group/t/customize-resource-limits-for-renku-on-premise-sessions/936/17 "2023-11-15T08:31:17Z")

</div>

Great ! changlog helped me a lot.  
Thanks 🙂

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/385f0f59b0e69cd1a81e1a7bb581cb9d281bf433.png)
