feat(helm): Support HPA for supersetNode and supersetWorker (#25280)
Co-authored-by: Nav_InverseInfinity <naveen.damotharan@outlook.com>
This commit is contained in:
parent
090ae64dfa
commit
5cc0feb647
|
|
@ -29,7 +29,7 @@ maintainers:
|
|||
- name: craig-rueda
|
||||
email: craig@craigrueda.com
|
||||
url: https://github.com/craig-rueda
|
||||
version: 0.10.6
|
||||
version: 0.10.7
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: 12.1.6
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
|
|||
|
||||
# superset
|
||||
|
||||

|
||||

|
||||
|
||||
Apache Superset is a modern, enterprise-ready business intelligence web application
|
||||
|
||||
|
|
@ -169,6 +169,10 @@ helm install my-superset superset/superset
|
|||
| supersetCeleryFlower.startupProbe.timeoutSeconds | int | `1` | |
|
||||
| supersetCeleryFlower.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryFlower deployments |
|
||||
| supersetNode.affinity | object | `{}` | Affinity to be added to supersetNode deployment |
|
||||
| supersetNode.autoscaling.enabled | bool | `false` | |
|
||||
| supersetNode.autoscaling.maxReplicas | int | `100` | |
|
||||
| supersetNode.autoscaling.minReplicas | int | `1` | |
|
||||
| supersetNode.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
|
||||
| supersetNode.command | list | See `values.yaml` | Startup command |
|
||||
| supersetNode.connections.db_host | string | `"{{ .Release.Name }}-postgresql"` | |
|
||||
| supersetNode.connections.db_name | string | `"superset"` | |
|
||||
|
|
@ -257,6 +261,10 @@ helm install my-superset superset/superset
|
|||
| supersetWebsockets.strategy | object | `{}` | |
|
||||
| supersetWebsockets.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWebsockets deployments |
|
||||
| supersetWorker.affinity | object | `{}` | Affinity to be added to supersetWorker deployment |
|
||||
| supersetWorker.autoscaling.enabled | bool | `false` | |
|
||||
| supersetWorker.autoscaling.maxReplicas | int | `100` | |
|
||||
| supersetWorker.autoscaling.minReplicas | int | `1` | |
|
||||
| supersetWorker.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
|
||||
| supersetWorker.command | list | a `celery worker` command | Worker startup command |
|
||||
| supersetWorker.containerSecurityContext | object | `{}` | |
|
||||
| supersetWorker.deploymentAnnotations | object | `{}` | Annotations to be added to supersetWorker deployment |
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ metadata:
|
|||
annotations: {{- toYaml .Values.supersetWorker.deploymentAnnotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.supersetWorker.autoscaling.enabled }}
|
||||
replicas: {{ .Values.supersetWorker.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "superset.name" . }}-worker
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ metadata:
|
|||
annotations: {{- toYaml .Values.supersetNode.deploymentAnnotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.supersetNode.autoscaling.enabled }}
|
||||
replicas: {{ .Values.supersetNode.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if .Values.supersetNode.strategy }}
|
||||
strategy: {{- toYaml .Values.supersetNode.strategy | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
{{/*
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/}}
|
||||
|
||||
{{- if .Values.supersetNode.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "superset.fullname" . }}-hpa
|
||||
labels:
|
||||
app: {{ template "superset.name" . }}
|
||||
chart: {{ template "superset.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "superset.fullname" . }}
|
||||
minReplicas: {{ .Values.supersetNode.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.supersetNode.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.supersetNode.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.supersetNode.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.supersetNode.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.supersetNode.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
{{/*
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/}}
|
||||
|
||||
{{- if .Values.supersetWorker.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "superset.fullname" . }}-hpa-worker
|
||||
labels:
|
||||
app: {{ template "superset.name" . }}
|
||||
chart: {{ template "superset.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "superset.fullname" . }}-worker
|
||||
minReplicas: {{ .Values.supersetWorker.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.supersetWorker.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.supersetWorker.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.supersetWorker.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.supersetWorker.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.supersetWorker.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -240,6 +240,13 @@ hostAliases: []
|
|||
# Superset node configuration
|
||||
supersetNode:
|
||||
replicaCount: 1
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
# -- Startup command
|
||||
# @default -- See `values.yaml`
|
||||
command:
|
||||
|
|
@ -334,6 +341,13 @@ supersetNode:
|
|||
# Superset Celery worker configuration
|
||||
supersetWorker:
|
||||
replicaCount: 1
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
# -- Worker startup command
|
||||
# @default -- a `celery worker` command
|
||||
command:
|
||||
|
|
|
|||
Loading…
Reference in New Issue