Skip to content

Commit

Permalink
055
Browse files Browse the repository at this point in the history
  • Loading branch information
amitza committed Aug 31, 2024
1 parent 3b745f7 commit 5a42d81
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 24 deletions.
2 changes: 1 addition & 1 deletion charts/cache/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://github.com/lavanet/helm-charts/blob/main/docs/logo/logo.png?raw=tr
sources:
- https://github.com/lavanet/helm-charts
type: application
version: 0.5.4
version: 0.5.5
appVersion: "v2.5.0"
kubeVersion: ">=1.25.0-0"
home: https://lavanet.xyz
Expand Down
12 changes: 7 additions & 5 deletions charts/cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Lava helm chart for the cache service

![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)
![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)

## Lavanet Cache Helm Chart

Expand All @@ -29,10 +29,12 @@ Kubernetes: `>=1.25.0-0`
|-----|------|---------|-------------|
| additionalArgs | list | `[]` | Lavap cache additional CLI arguments |
| affinity | object | `{}` | Assign custom [affinity] rules to the deployment |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| autoscaling.behavior | object | `{}` | Configures the scaling behavior of the target in both Up and Down directions. |
| autoscaling.enabled | bool | `false` | Enable Horizontal Pod Autoscaler ([HPA]) for the Cache |
| autoscaling.maxReplicas | int | `5` | Maximum number of replicas for the Cache [HPA] |
| autoscaling.minReplicas | int | `1` | Minimum number of replicas for the Cache [HPA] |
| autoscaling.targetCPUUtilizationPercentage | int | `50` | Average CPU utilization percentage for the Cache [HPA] |
| autoscaling.targetMemoryUtilizationPercentage | int | `50` | Average memory utilization percentage for the Cache [HPA] |
| certificate.additionalHosts | list | `[]` | Certificate Subject Alternate Names (SANs) |
| certificate.annotations | object | `{}` | Annotations to be applied to the Server Certificate |
| certificate.domain | string | `""` (defaults to global.domain) | Certificate primary domain (commonName) |
Expand Down
14 changes: 12 additions & 2 deletions charts/cache/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,26 @@ spec:
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- with .Values.server.autoscaling.metrics }}
{{- toYaml . | nindent 4 }}
{{- else }}
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- with .Values.server.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
27 changes: 24 additions & 3 deletions charts/cache/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,32 @@ resources: {}
# memory: 128Mi

autoscaling:
# -- Enable Horizontal Pod Autoscaler ([HPA]) for the Cache
enabled: false
# -- Minimum number of replicas for the Cache [HPA]
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
# -- Maximum number of replicas for the Cache [HPA]
maxReplicas: 5
# -- Average CPU utilization percentage for the Cache [HPA]
targetCPUUtilizationPercentage: 50
# -- Average memory utilization percentage for the Cache [HPA]
targetMemoryUtilizationPercentage: 50
# -- Configures the scaling behavior of the target in both Up and Down directions.
behavior: {}
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
# - type: Pods
# value: 1
# periodSeconds: 180
# scaleUp:
# stabilizationWindowSeconds: 300
# policies:
# - type: Pods
# value: 2
# periodSeconds: 60
# -- Configures custom HPA metrics for the Cache
# Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

# -- [Node selector]
nodeSelector: {}
Expand Down
2 changes: 1 addition & 1 deletion charts/consumer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://github.com/lavanet/helm-charts/blob/main/docs/logo/logo.png?raw=tr
sources:
- https://github.com/lavanet/helm-charts
type: application
version: 0.5.4
version: 0.5.5
appVersion: "v2.5.0"
kubeVersion: ">=1.25.0-0"
home: https://lavanet.xyz
Expand Down
12 changes: 7 additions & 5 deletions charts/consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Lava helm chart for the consumer service

![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)
![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)

## Lavanet Consumer Helm Chart

Expand Down Expand Up @@ -102,10 +102,12 @@ Kubernetes: `>=1.25.0-0`
|-----|------|---------|-------------|
| additionalArgs | list | `[]` | Lavap consumer additional CLI arguments |
| affinity | object | `{}` | Assign custom [affinity] rules to the deployment |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| autoscaling.behavior | object | `{}` | Configures the scaling behavior of the target in both Up and Down directions. |
| autoscaling.enabled | bool | `false` | Enable Horizontal Pod Autoscaler ([HPA]) for the Consumer |
| autoscaling.maxReplicas | int | `5` | Maximum number of replicas for the Consumer [HPA] |
| autoscaling.minReplicas | int | `1` | Minimum number of replicas for the Consumer [HPA] |
| autoscaling.targetCPUUtilizationPercentage | int | `50` | Average CPU utilization percentage for the Consumer [HPA] |
| autoscaling.targetMemoryUtilizationPercentage | int | `50` | Average memory utilization percentage for the Consumer [HPA] |
| cache.address | string | `"cache:20100"` | Cache address |
| cache.enabled | bool | `true` | Should add cache arg |
| certificate.additionalHosts | list | `[]` | Certificate Subject Alternate Names (SANs) |
Expand Down
14 changes: 12 additions & 2 deletions charts/consumer/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,27 @@ spec:
minReplicas: {{ $.Values.autoscaling.minReplicas }}
maxReplicas: {{ $.Values.autoscaling.maxReplicas }}
metrics:
{{- with .Values.server.autoscaling.metrics }}
{{- toYaml . | nindent 4 }}
{{- else }}
{{- if $.Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ $.Values.autoscaling.targetCPUUtilizationPercentage }}
type: Utilization
averageUtilization: {{ $.Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if $.Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ $.Values.autoscaling.targetMemoryUtilizationPercentage }}
type: Utilization
averageUtilization: {{ $.Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- with .Values.server.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
27 changes: 24 additions & 3 deletions charts/consumer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,32 @@ resources: {}
# memory: 128Mi

autoscaling:
# -- Enable Horizontal Pod Autoscaler ([HPA]) for the Consumer
enabled: false
# -- Minimum number of replicas for the Consumer [HPA]
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
# -- Maximum number of replicas for the Consumer [HPA]
maxReplicas: 5
# -- Average CPU utilization percentage for the Consumer [HPA]
targetCPUUtilizationPercentage: 50
# -- Average memory utilization percentage for the Consumer [HPA]
targetMemoryUtilizationPercentage: 50
# -- Configures the scaling behavior of the target in both Up and Down directions.
behavior: {}
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
# - type: Pods
# value: 1
# periodSeconds: 180
# scaleUp:
# stabilizationWindowSeconds: 300
# policies:
# - type: Pods
# value: 2
# periodSeconds: 60
# -- Configures custom HPA metrics for the Consumer
# Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

# -- [Node selector]
nodeSelector: {}
Expand Down
2 changes: 1 addition & 1 deletion charts/provider/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://github.com/lavanet/helm-charts/blob/main/docs/logo/logo.png?raw=tr
sources:
- https://github.com/lavanet/helm-charts
type: application
version: 0.5.4
version: 0.5.5
appVersion: "v2.5.0"
kubeVersion: ">=1.25.0-0"
home: https://lavanet.xyz
Expand Down
2 changes: 1 addition & 1 deletion charts/provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Lava helm chart for the provider service

![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)
![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)

## Lavanet Provider Helm Chart

Expand Down

0 comments on commit 5a42d81

Please sign in to comment.