diff --git a/charts/jupyterhub-outpost/Chart.yaml b/charts/jupyterhub-outpost/Chart.yaml index 602fc1c6dcf778bbc0a724be72c022f70dab516b..7be7eeeb73e9f325e609847c3b904b97707e435e 100644 --- a/charts/jupyterhub-outpost/Chart.yaml +++ b/charts/jupyterhub-outpost/Chart.yaml @@ -17,10 +17,10 @@ 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.0.8 +version: 2.0.0 # 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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.0.5" +appVersion: "2.0.0" diff --git a/charts/jupyterhub-outpost/README.md b/charts/jupyterhub-outpost/README.md index 0a99f4abbdb16b54e0d5848e8b10d42d34b7f074..1b9bebf18c16f1a6a5c3e96515c9babb1bb1e42d 100644 --- a/charts/jupyterhub-outpost/README.md +++ b/charts/jupyterhub-outpost/README.md @@ -73,6 +73,7 @@ helm delete --purge my-jupyterhub-outpost | `fullnameOverride` | String to fully override common.names.fullname template | `""` | | `cryptSecret` | Existing secret containing `secret_key`. To create a key run `python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'` | `""` | | `sshPublicKeys` | Public keys, to enable port-forwarding from JupyterHub to the Outpost. May containt ssh options like `from=...` | `[]` | +| `flavors` | Flavors for the system. Check values.yaml for default value. Set to `null` to disable flavors | `check values.yaml` | | `outpostUsers` | Name of existing Secret with `usernames` and `passwords`. Multiple values must be semicolon separated | `""` | | `outpostConfig` | Configuration of Outpost Application. See documentation for more information. | `""` | | `extraPythonPackages` | Array containing python packages, that should be installed (normally the Spawner you want to configure) | `[]` | @@ -116,6 +117,9 @@ extraEnvVarsSecrets: ``` ### CHANGELOG +#### 2.0.0 +- Flavors are now integrated in the helm chart. They are enabled by default. Set flavors=null to disable them. +- JupyterHub Outpost 2.0.0 added a new column to the service table: jupyterhub_user_id. Update database if neccessary. #### 1.0.8 - Add the option to configure `externalTrafficPolicy` in the SSH service, allowing users to preserve the client IP address when needed. #### 1.0.7 diff --git a/charts/jupyterhub-outpost/templates/configmap_flavors b/charts/jupyterhub-outpost/templates/configmap_flavors new file mode 100644 index 0000000000000000000000000000000000000000..86f3ef293fecce0d59d441d8a689e1fb51c37883 --- /dev/null +++ b/charts/jupyterhub-outpost/templates/configmap_flavors @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "jupyterhub-outpost.fullname" . }}-flavors + labels: + {{- include "jupyter-hub-customizations.labels" . | nindent 4 }} +data: + flavors.yaml: |- + {{- with .Values.flavors }} + flavors: + {{- toYaml . | nindent 4 }} + {{- end }} \ No newline at end of file diff --git a/charts/jupyterhub-outpost/templates/configmap_flavors.yaml b/charts/jupyterhub-outpost/templates/configmap_flavors.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9659f6e81308136fb26ea2502bedb80cc3dde7d3 --- /dev/null +++ b/charts/jupyterhub-outpost/templates/configmap_flavors.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "jupyterhub-outpost.fullname" . }}-flavors + labels: + {{- include "jupyterhub-outpost.labels" . | nindent 4 }} +data: + flavors.yaml: |- + {{- with .Values.flavors }} + {{- toYaml . | nindent 4 }} + {{- end }} \ No newline at end of file diff --git a/charts/jupyterhub-outpost/templates/deployment.yaml b/charts/jupyterhub-outpost/templates/deployment.yaml index bb3dd9c3db636da4d92377dca5bfdbef0d063d5e..a2d6a3c4c3b42464cf4e823b2393f3cf8450ebf2 100644 --- a/charts/jupyterhub-outpost/templates/deployment.yaml +++ b/charts/jupyterhub-outpost/templates/deployment.yaml @@ -112,6 +112,8 @@ spec: {{- end }} - mountPath: /mnt/outpost_config name: outpost-config + - mountPath: /mnt/flavors + name: outpost-flavors {{- with .Values.extraVolumeMounts }} {{- . | toYaml | nindent 12 }} {{- end }} @@ -133,6 +135,9 @@ spec: configMap: name: {{ include "jupyterhub-outpost.fullname" . }}-auth {{- end }} + - name: outpost-flavors + configMap: + name: {{ include "jupyterhub-outpost.fullname" . }}-flavors - name: outpost-config configMap: name: {{ include "jupyterhub-outpost.fullname" . }}-config diff --git a/charts/jupyterhub-outpost/values.yaml b/charts/jupyterhub-outpost/values.yaml index 3a465019e90eb93fb547fd4b817c126a7695f213..400f40519e0c33d3da45cb8706575ef9fedfa705 100644 --- a/charts/jupyterhub-outpost/values.yaml +++ b/charts/jupyterhub-outpost/values.yaml @@ -95,6 +95,66 @@ outpostConfigPath: "" outpostConfigSuppressLogs: true extraPythonPackages: [] + + +flavors: + flavors: + minimal: + max: 5 + maxPerUser: 1 + weight: 10 + display_name: "Minimal" + description: "Service will run with minimal resources for max 1 hour." + runtime: + hours: 1 + resources: + cpu_guarantee: 0.1 + cpu_limit: 1 + mem_guarantee: "128M" + mem_limit: "512M" + + default: + max: 20 + maxPerUser: 3 + weight: 11 + display_name: "Default" + description: "Service will run with normal resources for max 5 days" + runtime: + hours: 120 + resources: + cpu_guarantee: 0.1 + cpu_limit: 1 + mem_guarantee: "256M" + mem_limit: "2048M" + # hubs: # Example: when supporting multiple hubs (in the OutpostUsers secret) each may get a different set of flavors + # normalhubs: + # weight: 10 + # jupyterhub_name: + # - huba + # - hubb + # flavors: + # - default + # minimalhub: + # weight: 15 + # jupyterhub_name: + # - hubmini + # flavors: + # - minimal + # users: # Example: users with a username that's not ending with "@mycompany.org" will only get the minimal flavor + # publicUsers: + # negate_authentication: true + # authentication: + # username: ".*@mycompany.org" + # flavors: ["minimal"] + # weight: 10 + # googleUsers: # users with a google email address will not be allowed at all + # authentication: + # username: ".*@g(oogle)*mail.com" + # forbidden: true + # weight: 20 + + + # Extra Envs / Secrets / Containers extraEnvVars: [] extraEnvVarsCMs: []