mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 14:57:16 +08:00
[bitnami/memcached] adding HPA (#7251)
* [bitnami/memcached] adding HPA * Update bitnami/memcached/values.yaml Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * Only HA architecture Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * newline Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * common.names.fullname Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * Minor version bump Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * common.names.fullname Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com> * typo Co-authored-by: scabrinha <scabrinha@tesla.com> Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>
This commit is contained in:
@@ -22,4 +22,4 @@ name: memcached
|
|||||||
sources:
|
sources:
|
||||||
- https://github.com/bitnami/bitnami-docker-memcached
|
- https://github.com/bitnami/bitnami-docker-memcached
|
||||||
- http://memcached.org/
|
- http://memcached.org/
|
||||||
version: 5.13.7
|
version: 5.14.0
|
||||||
|
|||||||
@@ -77,6 +77,11 @@ The command removes all the Kubernetes components associated with the chart and
|
|||||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
||||||
| `image.debug` | Enable image debug mode | `false` |
|
| `image.debug` | Enable image debug mode | `false` |
|
||||||
| `architecture` | Memcached architecture. Allowed values: standalone or high-availability | `standalone` |
|
| `architecture` | Memcached architecture. Allowed values: standalone or high-availability | `standalone` |
|
||||||
|
| `autoscaling.enabled` | Enable Memcached statefulset autoscaling | `false` |
|
||||||
|
| `autoscaling.minReplicas` | Memcached statefulset autoscaling minimum number of replicas | `3` |
|
||||||
|
| `autoscaling.maxReplicas` | Memcached statefulset autoscaling maximum number of replicas | `6` |
|
||||||
|
| `autoscaling.targetCPU` | Memcached statefulset autoscaling target CPU percentage | `50` |
|
||||||
|
| `autoscaling.targetMemory` | Memcached statefulset autoscaling target CPU memory | `50` |
|
||||||
| `hostAliases` | Add deployment host aliases | `[]` |
|
| `hostAliases` | Add deployment host aliases | `[]` |
|
||||||
| `memcachedUsername` | Memcached admin user | `""` |
|
| `memcachedUsername` | Memcached admin user | `""` |
|
||||||
| `memcachedPassword` | Memcached admin password | `""` |
|
| `memcachedPassword` | Memcached admin password | `""` |
|
||||||
|
|||||||
34
bitnami/memcached/templates/hpa.yaml
Normal file
34
bitnami/memcached/templates/hpa.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{{- if and .Values.autoscaling.enabled (eq .Values.architecture "high-availability") }}
|
||||||
|
apiVersion: autoscaling/v2beta1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||||
|
{{- if .Values.commonLabels }}
|
||||||
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||||
|
kind: StatefulSet
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- if .Values.autoscaling.targetCPU }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
targetAverageUtilization: {{ .Values.autoscaling.targetCPU }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.autoscaling.targetMemory }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
targetAverageUtilization: {{ .Values.autoscaling.targetMemory }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -136,6 +136,21 @@ service:
|
|||||||
## @param service.annotations Additional annotations for Memcached service
|
## @param service.annotations Additional annotations for Memcached service
|
||||||
##
|
##
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
|
## Memcached Autoscaling
|
||||||
|
## @param autoscaling.enabled Enable memcached statefulset autoscaling (requires architecture: "high-availability")
|
||||||
|
## @param autoscaling.minReplicas memcached statefulset autoscaling minimum number of replicas
|
||||||
|
## @param autoscaling.maxReplicas memcached statefulset autoscaling maximum number of replicas
|
||||||
|
## @param autoscaling.targetCPU memcached statefulset autoscaling target CPU percentage
|
||||||
|
## @param autoscaling.targetMemory memcached statefulset autoscaling target CPU memory
|
||||||
|
##
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
minReplicas: 3
|
||||||
|
maxReplicas: 6
|
||||||
|
targetCPU: 50
|
||||||
|
targetMemory: 50
|
||||||
|
|
||||||
## Memcached containers' resource requests and limits
|
## Memcached containers' resource requests and limits
|
||||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
|||||||
Reference in New Issue
Block a user