Skip to content

Commit

Permalink
Fix documentation. Remove unnecessary setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jemacchi committed Oct 1, 2024
1 parent bb203f1 commit 20a488c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 1 addition & 7 deletions templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
{{- if hasKey $serviceDefinition.hpa "name" }}
name: {{ $serviceDefinition.hpa.name }}
{{- else }}
name: {{ include "common.fullname" (dict "root" $ "service" $serviceDefinition "serviceName" $serviceName ) }}-hpa
{{- end }}
{{- $hpaDict := deepCopy $serviceDefinition }}
{{- $hpaDict := merge $hpaDict (dict "annotations" $serviceDefinition.hpa.annotations "labels" $serviceDefinition.hpa.labels) }}
{{- include "common.metadata" (dict "root" $ "service" $hpaDict "serviceName" $serviceName) | nindent 2 }}
{{- include "common.metadata" ( dict "root" $ "service" $serviceDefinition "serviceName" $serviceName ) | nindent 2 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
4 changes: 2 additions & 2 deletions values.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
- **`ports`** _(array)_
- **`hpa`** _(object)_
- **`enabled`** _(boolean, required)_: Enable or disable HPA for the service.
- **`minReplicas`** _(integer, required)_: Minimal number of replicas. Minimum: `1`.
- **`maxReplicas`** _(integer, required)_: Max number of replicas. Minimum: `1`.
- **`minReplicas`** _(integer, required)_: Minimal number of replicas. Minimum: `1`. Default: `1`.
- **`maxReplicas`** _(integer, required)_: Max number of replicas. Minimum: `1`. Default: `10`.
- **`metrics`** _(array)_: Metrics definition.
- **Items** _(object)_
- **`type`** _(string, required)_: Metric types (Resource, Pods, External). Must be one of: `["Resource", "Pods", "External"]`.
Expand Down
6 changes: 4 additions & 2 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1095,12 +1095,14 @@
"minReplicas": {
"type": "integer",
"minimum": 1,
"description": "Minimal number of replicas."
"description": "Minimal number of replicas.",
"default": 1
},
"maxReplicas": {
"type": "integer",
"minimum": 1,
"description": "Max number of replicas."
"description": "Max number of replicas.",
"default": 10
},
"metrics": {
"type": "array",
Expand Down

0 comments on commit 20a488c

Please sign in to comment.