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

Set request limits for operator to ensure QOS Class #90

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/theia-cloud-base/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# theia-cloud-base

![Version: 1.1.0-next.0](https://img.shields.io/badge/Version-1.1.0--next.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0-next](https://img.shields.io/badge/AppVersion-1.1.0--next-informational?style=flat-square)
![Version: 1.1.0-next.1](https://img.shields.io/badge/Version-1.1.0--next.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0-next](https://img.shields.io/badge/AppVersion-1.1.0--next-informational?style=flat-square)

Theia-cloud base chart

Expand Down
2 changes: 1 addition & 1 deletion charts/theia-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.0-next.3
version: 1.1.0-next.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 5 additions & 1 deletion charts/theia-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# theia-cloud

![Version: 1.1.0-next.1](https://img.shields.io/badge/Version-1.1.0--next.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0-next](https://img.shields.io/badge/AppVersion-1.1.0--next-informational?style=flat-square)
![Version: 1.1.0-next.4](https://img.shields.io/badge/Version-1.1.0--next.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0-next](https://img.shields.io/badge/AppVersion-1.1.0--next-informational?style=flat-square)

A Helm chart for Theia Cloud

Expand Down Expand Up @@ -56,6 +56,7 @@ A Helm chart for Theia Cloud
| landingPage.additionalApps | string | `nil` | The page may show these additional apps in a drop down. This is a map. The key maps to the app definition name The value is the label that is supposed to be shown in the UI Example: different-app-definition: label: "Different App Definition" further-app-definition: label: "Further App Definition" |
| landingPage.appDefinition | string | `"theia-cloud-demo"` | the app id to launch |
| landingPage.disableInfo | bool | `false` | Should showing info title and text below the launch button be disabled true hides the info title and text false shows the info title and text |
| landingPage.enabled | bool | `true` | Whether the landing page shall be enabled |
| landingPage.ephemeralStorage | bool | `true` | If set to true no persisted storage is used when creating sessions on the landing page. Set to false if you want to use persisted storage. |
| landingPage.image | string | `"theiacloud/theia-cloud-landing-page:1.1.0-next"` | the landing page image to use |
| landingPage.imagePullPolicy | string | `nil` | Optional: Override the imagePullPolicy for the landing page's docker image. If this is omitted or empty, the root at .Values.imagePullPolicy is used. |
Expand All @@ -71,6 +72,7 @@ A Helm chart for Theia Cloud
| monitor.activityTracker.enable | bool | `true` | Should the activityTracker module be enabled |
| monitor.activityTracker.interval | int | `1` | Minutes between re-pinging the pods |
| monitor.enable | bool | `true` | Should the monitor be enabled |
| oauth2Proxy | object | `{"cookieDomains":[],"whitelistDomains":[]}` | Values related to OAuth2 Proxy configuration |
| operator | object | (see details below) | Values related to the operator |
| operator.bandwidthLimiter | string | `"K8SANNOTATION"` | Whether Theia Cloud shall limit network speed. This might not be fully supported on all cloud provider/in all clusters. Possible values: - K8SANNOTATION Set via kubernetes annotations (kubernetes.io/egress-bandwidth and kubernetes.io/ingress-bandwidth) - WONDERSHAPER Set via wondershaper init container - K8SANNOTATIONANDWONDERSHAPER Set Kubernetes annotations and use wondershaper init container |
| operator.cloudProvider | string | `"K8S"` | Select your cloud provider. Possible values: - K8S Plain Kubernetes - MINIKUBE Local deployment on Minikube |
Expand All @@ -85,6 +87,8 @@ A Helm chart for Theia Cloud
| operator.oAuth2ProxyVersion | string | `"v7.5.1"` | The version to use of the quay.io/oauth2-proxy/oauth2-proxy image |
| operator.replicas | int | `1` | Number of operator instances to create |
| operator.requestedStorage | string | `"250Mi"` | The amount of requested storage for each persistent volume claim (PVC) for workspaces. This is directly passed to created PVCs and must be a valid Kubernetes quantity. See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/ |
| operator.requestsCpu | string | `"100m"` | Amount of CPU requested for the operator.. |
| operator.requestsMemory | string | `"1000M"` | Amount of memory requested for the operator. |
| operator.sessionsPerUser | string | `"1"` | Set the number of active sessions a single user can launch |
| operator.storageClassName | string | `"default"` | The name of the storage class for persistent volume claims for workspaces. This storage class must be present on the cluster. Most cloud providers offer a default storage class without additional configuration. |
| operator.wondershaperImage | string | `"theiacloud/theia-cloud-wondershaper:1.1.0-next"` | If bandwidthLimiter is set to WONDERSHAPER or K8SANNOTATIONANDWONDERSHAPER this image will be used for the wondershaper init container |
Expand Down
2 changes: 2 additions & 0 deletions charts/theia-cloud/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ spec:
imagePullSecrets:
- name: {{ tpl (.Values.operator.imagePullSecret | toString) . }}
{{- end }}
requestsMemory: {{ tpl (.Values.operator.requestsMemory | toString) . }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be similar to: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#example-1

So something like this?

    resources:
      requests:
        memory: {{ tpl (.Values.operator.requestsMemory | toString) . }}
        cpu: {{ tpl (.Values.operator.requestsCpu | toString) . }}

I also think the nesting level might be wrong, this should go under containers -> operator-container on the same level as image.

requestsCpu: {{ tpl (.Values.operator.requestsCpu | toString) . }}
6 changes: 6 additions & 0 deletions charts/theia-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ operator:
# -- The version to use of the quay.io/oauth2-proxy/oauth2-proxy image
oAuth2ProxyVersion: "v7.5.1"

# -- Amount of memory requested for the operator.
requestsMemory: 1000M

# -- Amount of CPU requested for the operator..
requestsCpu: "100m"

# -- Values of the Theia Cloud REST service
# @default -- (see details below)
service:
Expand Down