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

feat(Helm Chart): Support resource limits and requests for each component #20052

Merged
merged 3 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 9 additions & 0 deletions helm/superset/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down
26 changes: 26 additions & 0 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down