From 434abf88a498f33221e9cfc81f6426e665c76ea8 Mon Sep 17 00:00:00 2001 From: i01002747 Date: Fri, 29 Apr 2022 09:07:41 +0200 Subject: [PATCH 1/3] resource limits and requests for each component --- helm/superset/templates/deployment-beat.yaml | 4 +++ .../superset/templates/deployment-worker.yaml | 4 +++ helm/superset/templates/deployment.yaml | 4 +++ helm/superset/values.schema.json | 9 +++++++ helm/superset/values.yaml | 26 +++++++++++++++++++ 5 files changed, 47 insertions(+) diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml index 55223defc642..d46d47ee3f9c 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 07bacd371b77..54eb5d87517e 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 b760d5454da2..4d3a42e8e20a 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 5e419d35a67d..6c4359a0ff94 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 2adc6bf66294..197ec4b3c6e7 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: From 4f2d05740cc8b882b742d2b28cd491e7890715cf Mon Sep 17 00:00:00 2001 From: i01002747 Date: Mon, 16 May 2022 09:37:15 +0200 Subject: [PATCH 2/3] bumped helm chart version --- helm/superset/Chart.lock | 9 +++++++++ helm/superset/Chart.yaml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 helm/superset/Chart.lock diff --git a/helm/superset/Chart.lock b/helm/superset/Chart.lock new file mode 100644 index 000000000000..43826a2ea524 --- /dev/null +++ b/helm/superset/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.1.22 +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 16.3.1 +digest: sha256:f80cc4ec2bb6f327d348bc15e9192cc6ab2163781c1e35f85720565a36a1cb14 +generated: "2022-04-29T21:12:17.889093837+02:00" diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 8d93ab473195..70dd6fd162b8 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 From 40a5db6695729483a411c0110d8b6126d3660c30 Mon Sep 17 00:00:00 2001 From: Moritz Rathberger <46812235+rathberm@users.noreply.github.com> Date: Mon, 16 May 2022 09:38:49 +0200 Subject: [PATCH 3/3] Delete Chart.lock --- helm/superset/Chart.lock | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 helm/superset/Chart.lock diff --git a/helm/superset/Chart.lock b/helm/superset/Chart.lock deleted file mode 100644 index 43826a2ea524..000000000000 --- a/helm/superset/Chart.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 11.1.22 -- name: redis - repository: https://charts.bitnami.com/bitnami - version: 16.3.1 -digest: sha256:f80cc4ec2bb6f327d348bc15e9192cc6ab2163781c1e35f85720565a36a1cb14 -generated: "2022-04-29T21:12:17.889093837+02:00"