Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/netbox/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: netbox
version: 7.0.2
version: 7.0.3
# renovate: image=ghcr.io/netbox-community/netbox
appVersion: "v4.4.1"
type: application
Expand Down
1 change: 1 addition & 0 deletions charts/netbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ The following table lists the configurable parameters for this chart and their d
| `autoscaling.maxReplicas` | Maximum number of replicas when autoscaling is enabled | `100` |
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilisation percentage for autoscaling | `80` |
| `autoscaling.targetMemoryUtilizationPercentage` | Target memory utilisation percentage for autoscaling | `null` |
| `autoscaling.behavior` | HPA behavior (scaleUp/scaleDown policies and settings) | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
| `updateStrategy` | Configure deployment update strategy | `{}` (defaults to `RollingUpdate`) |
Expand Down
40 changes: 40 additions & 0 deletions charts/netbox/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,46 @@ spec:
name: {{ include "common.names.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
{{- $behavior := .Values.autoscaling.behavior }}
{{- if $behavior }}
behavior:
{{- $scaleUp := $behavior.scaleUp }}
{{- if $scaleUp }}
scaleUp:
{{- if $scaleUp.stabilizationWindowSeconds }}
stabilizationWindowSeconds: {{ $scaleUp.stabilizationWindowSeconds }}
{{- end }}
{{- if $scaleUp.selectPolicy }}
selectPolicy: {{ $scaleUp.selectPolicy | quote }}
{{- end }}
{{- if $scaleUp.policies }}
policies:
{{- range $scaleUp.policies }}
- type: {{ .type | quote }}
value: {{ .value }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- end }}
{{- $scaleDown := $behavior.scaleDown }}
{{- if $scaleDown }}
scaleDown:
{{- if $scaleDown.stabilizationWindowSeconds }}
stabilizationWindowSeconds: {{ $scaleDown.stabilizationWindowSeconds }}
{{- end }}
{{- if $scaleDown.selectPolicy }}
selectPolicy: {{ $scaleDown.selectPolicy | quote }}
{{- end }}
{{- if $scaleDown.policies }}
policies:
{{- range $scaleDown.policies }}
- type: {{ .type | quote }}
value: {{ .value }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
Expand Down
40 changes: 40 additions & 0 deletions charts/netbox/templates/worker/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,46 @@ spec:
name: {{ include "common.names.fullname" . }}-worker
minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
{{- $behavior := .Values.worker.autoscaling.behavior }}
{{- if $behavior }}
behavior:
{{- $scaleUp := $behavior.scaleUp }}
{{- if $scaleUp }}
scaleUp:
{{- if $scaleUp.stabilizationWindowSeconds }}
stabilizationWindowSeconds: {{ $scaleUp.stabilizationWindowSeconds }}
{{- end }}
{{- if $scaleUp.selectPolicy }}
selectPolicy: {{ $scaleUp.selectPolicy | quote }}
{{- end }}
{{- if $scaleUp.policies }}
policies:
{{- range $scaleUp.policies }}
- type: {{ .type | quote }}
value: {{ .value }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- end }}
{{- $scaleDown := $behavior.scaleDown }}
{{- if $scaleDown }}
scaleDown:
{{- if $scaleDown.stabilizationWindowSeconds }}
stabilizationWindowSeconds: {{ $scaleDown.stabilizationWindowSeconds }}
{{- end }}
{{- if $scaleDown.selectPolicy }}
selectPolicy: {{ $scaleDown.selectPolicy | quote }}
{{- end }}
{{- if $scaleDown.policies }}
policies:
{{- range $scaleDown.policies }}
- type: {{ .type | quote }}
value: {{ .value }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
metrics:
{{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
Expand Down
100 changes: 98 additions & 2 deletions charts/netbox/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,55 @@
"type": "integer"
},
"targetCPUUtilizationPercentage": {
"type": "integer"
"type": ["integer", "null"]
},
"targetMemoryUtilizationPercentage": {
"type": ["integer", "null"],
"default": null
},
"behavior": {
"type": "object",
"default": {},
"properties": {
"scaleUp": {
"type": "object",
"properties": {
"stabilizationWindowSeconds": { "type": "integer" },
"selectPolicy": { "type": "string" },
"policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"value": { "type": "integer" },
"periodSeconds": { "type": "integer" }
},
"required": ["type", "value", "periodSeconds"]
}
}
}
},
"scaleDown": {
"type": "object",
"properties": {
"stabilizationWindowSeconds": { "type": "integer" },
"selectPolicy": { "type": "string" },
"policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"value": { "type": "integer" },
"periodSeconds": { "type": "integer" }
},
"required": ["type", "value", "periodSeconds"]
}
}
}
}
}
}
},
"type": "object"
Expand Down Expand Up @@ -1493,7 +1541,55 @@
"type": "integer"
},
"targetCPUUtilizationPercentage": {
"type": "integer"
"type": ["integer", "null"]
},
"targetMemoryUtilizationPercentage": {
"type": ["integer", "null"],
"default": null
},
"behavior": {
"type": "object",
"default": {},
"properties": {
"scaleUp": {
"type": "object",
"properties": {
"stabilizationWindowSeconds": { "type": "integer" },
"selectPolicy": { "type": "string" },
"policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"value": { "type": "integer" },
"periodSeconds": { "type": "integer" }
},
"required": ["type", "value", "periodSeconds"]
}
}
}
},
"scaleDown": {
"type": "object",
"properties": {
"stabilizationWindowSeconds": { "type": "integer" },
"selectPolicy": { "type": "string" },
"policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"value": { "type": "integer" },
"periodSeconds": { "type": "integer" }
},
"required": ["type", "value", "periodSeconds"]
}
}
}
}
}
}
},
"type": "object"
Expand Down
46 changes: 44 additions & 2 deletions charts/netbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1166,13 +1166,34 @@ cachingDatabase:
## @param autoscaling.maxReplicas Maximum number of replicas
## @param autoscaling.targetCPUUtilizationPercentage Target CPU utilization percentage
## @param autoscaling.targetMemoryUtilizationPercentage Target Memory utilization percentage
## @param autoscaling.behavior.scaleUp.stabilizationWindowSeconds Scale-up stabilization window in seconds
## @param autoscaling.behavior.scaleUp.selectPolicy Policy selection for scale-up (Max|Min|Disabled)
## @param autoscaling.behavior.scaleUp.policies List of scale-up policies [{type,value,periodSeconds}]
## @param autoscaling.behavior.scaleDown.stabilizationWindowSeconds Scale-down stabilization window in seconds
## @param autoscaling.behavior.scaleDown.selectPolicy Policy selection for scale-down (Max|Min|Disabled)
## @param autoscaling.behavior.scaleDown.policies List of scale-down policies [{type,value,periodSeconds}]
##
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetMemoryUtilizationPercentage: null
behavior: {}
# scaleUp:
# stabilizationWindowSeconds: 0
# selectPolicy: Max
# policies:
# - type: Percent
# value: 100
# periodSeconds: 60
# scaleDown:
# stabilizationWindowSeconds: 300
# selectPolicy: Max
# policies:
# - type: Percent
# value: 100
# periodSeconds: 60

## @section Volume permissions parameters

Expand Down Expand Up @@ -1654,13 +1675,34 @@ worker:
## @param worker.autoscaling.maxReplicas Maximum number of replicas
## @param worker.autoscaling.targetCPUUtilizationPercentage Target CPU utilization percentage
## @param worker.autoscaling.targetMemoryUtilizationPercentage Target Memory utilization percentage
## @param worker.autoscaling.behavior.scaleUp.stabilizationWindowSeconds Scale-up stabilization window in seconds
## @param worker.autoscaling.behavior.scaleUp.selectPolicy Policy selection for scale-up (Max|Min|Disabled)
## @param worker.autoscaling.behavior.scaleUp.policies List of scale-up policies [{type,value,periodSeconds}]
## @param worker.autoscaling.behavior.scaleDown.stabilizationWindowSeconds Scale-down stabilization window in seconds
## @param worker.autoscaling.behavior.scaleDown.selectPolicy Policy selection for scale-down (Max|Min|Disabled)
## @param worker.autoscaling.behavior.scaleDown.policies List of scale-down policies [{type,value,periodSeconds}]
##
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
targetMemoryUtilizationPercentage: null
behavior: {}
# scaleUp:
# stabilizationWindowSeconds: 0
# selectPolicy: Max
# policies:
# - type: Percent
# value: 100
# periodSeconds: 60
# scaleDown:
# stabilizationWindowSeconds: 300
# selectPolicy: Max
# policies:
# - type: Percent
# value: 100
# periodSeconds: 60
## @param worker.extraEnvs Extra environment variables to be set on containers
## E.g:
## extraEnvs:
Expand Down