From 034d940be1bad2228412274981fa3cb263cdfa62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gaspard=20F=C3=A9rey?= Date: Mon, 16 Sep 2024 16:47:26 +0200 Subject: [PATCH] Generalized startupProbe injection in all charts (#153) * Generalized startupProbe injection & weaker liveness condition in all charts --------- Co-authored-by: gferey Co-authored-by: Gaspi --- charts/jupyter-pyspark/Chart.yaml | 3 +-- charts/jupyter-pyspark/templates/statefulset.yaml | 6 +++++- charts/jupyter-pyspark/values.schema.json | 10 ++++++++-- charts/jupyter-pyspark/values.yaml | 4 ++-- charts/jupyter-python/Chart.yaml | 3 +-- charts/jupyter-python/templates/statefulset.yaml | 6 +++++- charts/jupyter-python/values.schema.json | 12 +++++++++--- charts/jupyter-python/values.yaml | 2 +- charts/rstudio-sparkr/Chart.yaml | 2 +- charts/rstudio-sparkr/templates/statefulset.yaml | 10 +++++----- charts/rstudio-sparkr/values.schema.json | 10 ++++++++-- charts/rstudio-sparkr/values.yaml | 7 +++++++ charts/rstudio/Chart.yaml | 2 +- charts/rstudio/templates/statefulset.yaml | 10 +++++----- charts/rstudio/values.schema.json | 10 ++++++++-- charts/rstudio/values.yaml | 7 +++++++ charts/vscode-pyspark/Chart.yaml | 2 +- charts/vscode-pyspark/templates/statefulset.yaml | 6 +++++- charts/vscode-pyspark/values.schema.json | 10 ++++++++-- charts/vscode-pyspark/values.yaml | 2 +- charts/vscode-python/Chart.yaml | 2 +- charts/vscode-python/templates/statefulset.yaml | 9 +++++++++ charts/vscode-python/values.schema.json | 10 ++++++++-- charts/vscode-python/values.yaml | 7 +++++++ 24 files changed, 114 insertions(+), 38 deletions(-) diff --git a/charts/jupyter-pyspark/Chart.yaml b/charts/jupyter-pyspark/Chart.yaml index b15f31ad..f492c103 100644 --- a/charts/jupyter-pyspark/Chart.yaml +++ b/charts/jupyter-pyspark/Chart.yaml @@ -24,8 +24,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: 2.0.6 +version: 2.0.7 dependencies: - name: library-chart diff --git a/charts/jupyter-pyspark/templates/statefulset.yaml b/charts/jupyter-pyspark/templates/statefulset.yaml index f96132a2..bbbb02b8 100644 --- a/charts/jupyter-pyspark/templates/statefulset.yaml +++ b/charts/jupyter-pyspark/templates/statefulset.yaml @@ -250,15 +250,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} startupProbe: httpGet: path: / port: {{ .Values.networking.service.port }} - {{- toYaml .Values.startupProbe | nindent 12 }} + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/jupyter-pyspark/values.schema.json b/charts/jupyter-pyspark/values.schema.json index 1b286622..e5a6c8cf 100644 --- a/charts/jupyter-pyspark/values.schema.json +++ b/charts/jupyter-pyspark/values.schema.json @@ -818,8 +818,14 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", diff --git a/charts/jupyter-pyspark/values.yaml b/charts/jupyter-pyspark/values.yaml index 87281b37..c67a3683 100644 --- a/charts/jupyter-pyspark/values.yaml +++ b/charts/jupyter-pyspark/values.yaml @@ -239,7 +239,7 @@ startupProbe: initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 5 + timeoutSeconds: 2 userPreferences: darkMode: false @@ -247,4 +247,4 @@ userPreferences: message: fr: "" - en: "" \ No newline at end of file + en: "" diff --git a/charts/jupyter-python/Chart.yaml b/charts/jupyter-python/Chart.yaml index 2a061f29..cfb658da 100644 --- a/charts/jupyter-python/Chart.yaml +++ b/charts/jupyter-python/Chart.yaml @@ -22,8 +22,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: 2.0.6 +version: 2.0.7 dependencies: - name: library-chart diff --git a/charts/jupyter-python/templates/statefulset.yaml b/charts/jupyter-python/templates/statefulset.yaml index 381283b3..71e5a95d 100644 --- a/charts/jupyter-python/templates/statefulset.yaml +++ b/charts/jupyter-python/templates/statefulset.yaml @@ -201,15 +201,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} startupProbe: httpGet: path: / port: {{ .Values.networking.service.port }} - {{- toYaml .Values.startupProbe | nindent 12 }} + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/jupyter-python/values.schema.json b/charts/jupyter-python/values.schema.json index cf898bf7..c7992b43 100644 --- a/charts/jupyter-python/values.schema.json +++ b/charts/jupyter-python/values.schema.json @@ -725,14 +725,20 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", "overwriteSchemaWith": "ide/startupProbe.json" } - }, + }, "tolerations": { "type": "array", "description": "Array of tolerations", diff --git a/charts/jupyter-python/values.yaml b/charts/jupyter-python/values.yaml index 330e4b7c..f84d42d0 100644 --- a/charts/jupyter-python/values.yaml +++ b/charts/jupyter-python/values.yaml @@ -208,7 +208,7 @@ startupProbe: initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 5 + timeoutSeconds: 2 userPreferences: darkMode: false diff --git a/charts/rstudio-sparkr/Chart.yaml b/charts/rstudio-sparkr/Chart.yaml index 379a9733..a79e25bc 100644 --- a/charts/rstudio-sparkr/Chart.yaml +++ b/charts/rstudio-sparkr/Chart.yaml @@ -23,7 +23,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: 2.0.5 +version: 2.0.6 dependencies: - name: library-chart diff --git a/charts/rstudio-sparkr/templates/statefulset.yaml b/charts/rstudio-sparkr/templates/statefulset.yaml index 2a2fd8c1..fcf9e009 100644 --- a/charts/rstudio-sparkr/templates/statefulset.yaml +++ b/charts/rstudio-sparkr/templates/statefulset.yaml @@ -223,19 +223,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} startupProbe: httpGet: path: / port: {{ .Values.networking.service.port }} - failureThreshold: 60 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/rstudio-sparkr/values.schema.json b/charts/rstudio-sparkr/values.schema.json index 6f03cb20..36d75ec4 100644 --- a/charts/rstudio-sparkr/values.schema.json +++ b/charts/rstudio-sparkr/values.schema.json @@ -750,8 +750,14 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", diff --git a/charts/rstudio-sparkr/values.yaml b/charts/rstudio-sparkr/values.yaml index b6437e07..f0d1541e 100644 --- a/charts/rstudio-sparkr/values.yaml +++ b/charts/rstudio-sparkr/values.yaml @@ -220,6 +220,13 @@ tolerations: [] affinity: {} +startupProbe: + failureThreshold: 60 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 2 + proxy: enabled: false noProxy: "" diff --git a/charts/rstudio/Chart.yaml b/charts/rstudio/Chart.yaml index 3c11cb31..6f7efba2 100644 --- a/charts/rstudio/Chart.yaml +++ b/charts/rstudio/Chart.yaml @@ -22,7 +22,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: 2.0.5 +version: 2.0.6 dependencies: - name: library-chart diff --git a/charts/rstudio/templates/statefulset.yaml b/charts/rstudio/templates/statefulset.yaml index 508534ab..3992d909 100644 --- a/charts/rstudio/templates/statefulset.yaml +++ b/charts/rstudio/templates/statefulset.yaml @@ -136,19 +136,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} startupProbe: httpGet: path: / port: {{ .Values.networking.service.port }} - failureThreshold: 60 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/rstudio/values.schema.json b/charts/rstudio/values.schema.json index 6afe8812..a644b74c 100644 --- a/charts/rstudio/values.schema.json +++ b/charts/rstudio/values.schema.json @@ -674,8 +674,14 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", diff --git a/charts/rstudio/values.yaml b/charts/rstudio/values.yaml index bb147cea..93ed9e22 100644 --- a/charts/rstudio/values.yaml +++ b/charts/rstudio/values.yaml @@ -178,6 +178,13 @@ tolerations: [] affinity: {} +startupProbe: + failureThreshold: 60 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 2 + repository: configMapName: "" packageManagerUrl: "" diff --git a/charts/vscode-pyspark/Chart.yaml b/charts/vscode-pyspark/Chart.yaml index a6faf387..ac893916 100644 --- a/charts/vscode-pyspark/Chart.yaml +++ b/charts/vscode-pyspark/Chart.yaml @@ -24,7 +24,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: 2.0.5 +version: 2.0.6 dependencies: - name: library-chart diff --git a/charts/vscode-pyspark/templates/statefulset.yaml b/charts/vscode-pyspark/templates/statefulset.yaml index 01916374..c40dc5c0 100644 --- a/charts/vscode-pyspark/templates/statefulset.yaml +++ b/charts/vscode-pyspark/templates/statefulset.yaml @@ -247,15 +247,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} startupProbe: httpGet: path: / port: {{ .Values.networking.service.port }} - {{- toYaml .Values.startupProbe | nindent 12 }} + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/vscode-pyspark/values.schema.json b/charts/vscode-pyspark/values.schema.json index f9102413..2b60ed79 100644 --- a/charts/vscode-pyspark/values.schema.json +++ b/charts/vscode-pyspark/values.schema.json @@ -787,8 +787,14 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", diff --git a/charts/vscode-pyspark/values.yaml b/charts/vscode-pyspark/values.yaml index 72223c7b..5c01c342 100644 --- a/charts/vscode-pyspark/values.yaml +++ b/charts/vscode-pyspark/values.yaml @@ -239,7 +239,7 @@ startupProbe: initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 5 + timeoutSeconds: 2 userPreferences: darkMode: false diff --git a/charts/vscode-python/Chart.yaml b/charts/vscode-python/Chart.yaml index 682f71a0..86077faf 100644 --- a/charts/vscode-python/Chart.yaml +++ b/charts/vscode-python/Chart.yaml @@ -22,7 +22,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: 2.0.5 +version: 2.0.6 dependencies: - name: library-chart diff --git a/charts/vscode-python/templates/statefulset.yaml b/charts/vscode-python/templates/statefulset.yaml index 6dd6814f..294e7d4a 100644 --- a/charts/vscode-python/templates/statefulset.yaml +++ b/charts/vscode-python/templates/statefulset.yaml @@ -187,10 +187,19 @@ spec: httpGet: path: / port: {{ .Values.networking.service.port }} + timeoutSeconds: 2 + failureThreshold: 6 readinessProbe: httpGet: path: / port: {{ .Values.networking.service.port }} + {{- if hasKey .Values "startupProbe" }} + startupProbe: + httpGet: + path: / + port: {{ .Values.networking.service.port }} + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/vscode-python/values.schema.json b/charts/vscode-python/values.schema.json index 7a401f5f..e0459695 100644 --- a/charts/vscode-python/values.schema.json +++ b/charts/vscode-python/values.schema.json @@ -734,8 +734,14 @@ }, "startupProbe": { "type": "object", - "description": "Start up probe", - "default": {}, + "description": "Startup probe", + "default": { + "failureThreshold": 60, + "initialDelaySeconds": 10, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 2 + }, "x-onyxia": { "hidden": true, "overwriteDefaultWith": "region.startupProbe", diff --git a/charts/vscode-python/values.yaml b/charts/vscode-python/values.yaml index 0d48dcc8..1502e290 100644 --- a/charts/vscode-python/values.yaml +++ b/charts/vscode-python/values.yaml @@ -200,6 +200,13 @@ tolerations: [] affinity: {} +startupProbe: + failureThreshold: 60 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 2 + userPreferences: darkMode: false language: "en"