You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by cr...@apache.org on 2022/05/25 15:50:03 UTC

[superset] branch master updated: feat(Helm Chart): Support resource limits and requests for each component (#20052)

This is an automated email from the ASF dual-hosted git repository.

craigrueda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 259e03ee12 feat(Helm Chart): Support resource limits and requests for each component (#20052)
259e03ee12 is described below

commit 259e03ee12b0c82d801a0ad5765de4456a9646c5
Author: Moritz Rathberger <46...@users.noreply.github.com>
AuthorDate: Wed May 25 17:49:56 2022 +0200

    feat(Helm Chart): Support resource limits and requests for each component (#20052)
---
 helm/superset/Chart.yaml                       |  2 +-
 helm/superset/templates/deployment-beat.yaml   |  4 ++++
 helm/superset/templates/deployment-worker.yaml |  4 ++++
 helm/superset/templates/deployment.yaml        |  4 ++++
 helm/superset/values.schema.json               |  9 +++++++++
 helm/superset/values.yaml                      | 26 ++++++++++++++++++++++++++
 6 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index 8d93ab4731..70dd6fd162 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -22,7 +22,7 @@ maintainers:
   - name: craig-rueda
     email: craig@craigrueda.com
     url: https://github.com/craig-rueda
-version: 0.6.1
+version: 0.6.2
 dependencies:
 - name: postgresql
   version: 11.1.22
diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml
index 55223defc6..d46d47ee3f 100644
--- a/helm/superset/templates/deployment-beat.yaml
+++ b/helm/superset/templates/deployment-beat.yaml
@@ -98,7 +98,11 @@ spec:
           {{- tpl (toYaml .) $ | nindent 12 -}}
           {{- end }}
           resources:
+          {{- if .Values.supersetCeleryBeat.resources }}
+{{ toYaml .Values.supersetCeleryBeat.resources | indent 12 }}
+          {{- else }}
 {{ toYaml .Values.resources | indent 12 }}
+          {{- end }}
     {{- with .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml . | indent 8 }}
diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml
index 07bacd371b..54eb5d8751 100644
--- a/helm/superset/templates/deployment-worker.yaml
+++ b/helm/superset/templates/deployment-worker.yaml
@@ -99,7 +99,11 @@ spec:
           {{- tpl (toYaml .) $ | nindent 12 -}}
           {{- end }}
           resources:
+          {{- if .Values.supersetWorker.resources }}
+{{ toYaml .Values.supersetWorker.resources | indent 12 }}
+          {{- else }}
 {{ toYaml .Values.resources | indent 12 }}
+          {{- end }}
     {{- with .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml . | indent 8 }}
diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml
index b760d5454d..4d3a42e8e2 100644
--- a/helm/superset/templates/deployment.yaml
+++ b/helm/superset/templates/deployment.yaml
@@ -115,7 +115,11 @@ spec:
               containerPort: {{ .Values.service.port }}
               protocol: TCP
           resources:
+          {{- if .Values.supersetNode.resources }}
+{{ toYaml .Values.supersetNode.resources | indent 12 }}
+          {{- else }}
 {{ toYaml .Values.resources | indent 12 }}
+          {{- end }}
     {{- with .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml . | indent 8 }}
diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json
index 5e419d35a6..6c4359a0ff 100644
--- a/helm/superset/values.schema.json
+++ b/helm/superset/values.schema.json
@@ -275,6 +275,9 @@
                 },
                 "podLabels": {
                     "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels"
+                },
+                "resources": {
+                    "type": "object"
                 }
             },
             "required": [
@@ -305,6 +308,9 @@
                 },
                 "podLabels": {
                     "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels"
+                },
+                "resources": {
+                    "type": "object"
                 }
             },
             "required": [
@@ -336,6 +342,9 @@
                 },
                 "podLabels": {
                     "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels"
+                },
+                "resources": {
+                    "type": "object"
                 }
             },
             "required": [
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index 2adc6bf662..197ec4b3c6 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -203,6 +203,8 @@ resources: {}
   # choice for the user. This also increases chances charts run on environments with little
   # resources, such as Minikube. If you do want to specify resources, uncomment the following
   # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # The limits below will apply to all Superset components. To set individual resource limitations refer to the pod specific values below.
+  # The pod specific values will overwrite anything that is set here.
   # limits:
   #   cpu: 100m
   #   memory: 128Mi
@@ -253,6 +255,14 @@ supersetNode:
   podAnnotations: {}
   ## Labels to be added to supersetNode pods
   podLabels: {}
+  # Resource settings for the supersetNode pods - these settings overwrite might existing values from the global resources object defined above.
+  resources: {}
+    # limits:
+    #  cpu: 100m
+    #  memory: 128Mi
+    # requests:
+    #  cpu: 100m
+    #  memory: 128Mi
 ##
 ## Superset worker configuration
 supersetWorker:
@@ -275,6 +285,14 @@ supersetWorker:
   podAnnotations: {}
   ## Labels to be added to supersetWorker pods
   podLabels: {}
+  # Resource settings for the supersetWorker pods - these settings overwrite might existing values from the global resources object defined above.
+  resources: {}
+    # limits:
+    #  cpu: 100m
+    #  memory: 128Mi
+    # requests:
+    #  cpu: 100m
+    #  memory: 128Mi
 ##
 ## Superset beat configuration (to trigger scheduled jobs like reports)
 supersetCeleryBeat:
@@ -299,6 +317,14 @@ supersetCeleryBeat:
   podAnnotations: {}
   ## Labels to be added to supersetCeleryBeat pods
   podLabels: {}
+  # Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above.
+  resources: {}
+    # limits:
+    #  cpu: 100m
+    #  memory: 128Mi
+    # requests:
+    #  cpu: 100m
+    #  memory: 128Mi
 ##
 ## Init job configuration
 init: