Merge pull request #5558 from ionos-cloud/add-vpa-to-chart
chart: Add option to install VPA
This commit is contained in:
commit
28a1abf601
|
|
@ -11,4 +11,4 @@ name: cluster-autoscaler
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
|
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
|
||||||
type: application
|
type: application
|
||||||
version: 9.26.0
|
version: 9.27.0
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,21 @@ Containers:
|
||||||
|
|
||||||
Though enough for the majority of installations, the default PodSecurityPolicy _could_ be too restrictive depending on the specifics of your release. Please make sure to check that the template fits with any customizations made or disable it by setting `rbac.pspEnabled` to `false`.
|
Though enough for the majority of installations, the default PodSecurityPolicy _could_ be too restrictive depending on the specifics of your release. Please make sure to check that the template fits with any customizations made or disable it by setting `rbac.pspEnabled` to `false`.
|
||||||
|
|
||||||
|
### VerticalPodAutoscaler
|
||||||
|
|
||||||
|
The chart can install a [`VerticalPodAutoscaler`](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) for the Deployment if needed. A VPA can help minimize wasted resources when usage spikes periodically or remediate containers that are being OOMKilled.
|
||||||
|
|
||||||
|
The following example snippet can be used to install VPA that allows scaling down from the default recommendations of the deployment template:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
vpa:
|
||||||
|
enabled: true
|
||||||
|
containerPolicy:
|
||||||
|
minAllowed:
|
||||||
|
cpu: 20m
|
||||||
|
memory: 50Mi
|
||||||
|
```
|
||||||
|
|
||||||
## Values
|
## Values
|
||||||
|
|
||||||
| Key | Type | Default | Description |
|
| Key | Type | Default | Description |
|
||||||
|
|
@ -413,3 +428,7 @@ Though enough for the majority of installations, the default PodSecurityPolicy _
|
||||||
| tolerations | list | `[]` | List of node taints to tolerate (requires Kubernetes >= 1.6). |
|
| tolerations | list | `[]` | List of node taints to tolerate (requires Kubernetes >= 1.6). |
|
||||||
| topologySpreadConstraints | list | `[]` | You can use topology spread constraints to control how Pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains. (requires Kubernetes >= 1.19). |
|
| topologySpreadConstraints | list | `[]` | You can use topology spread constraints to control how Pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains. (requires Kubernetes >= 1.19). |
|
||||||
| updateStrategy | object | `{}` | [Deployment update strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) |
|
| updateStrategy | object | `{}` | [Deployment update strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) |
|
||||||
|
| vpa | object | `{"containerPolicy":{},"enabled":false,"updateMode":"Auto"}` | Configure a VerticalPodAutoscaler for the cluster-autoscaler Deployment. |
|
||||||
|
| vpa.containerPolicy | object | `{}` | [ContainerResourcePolicy](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler/v0.13.0/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L159). The containerName is always et to the deployment's container name. This value is required if VPA is enabled. |
|
||||||
|
| vpa.enabled | bool | `false` | If true, creates a VerticalPodAutoscaler. |
|
||||||
|
| vpa.updateMode | string | `"Auto"` | [UpdateMode](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler/v0.13.0/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L124) |
|
||||||
|
|
|
||||||
|
|
@ -318,4 +318,19 @@ Containers:
|
||||||
|
|
||||||
Though enough for the majority of installations, the default PodSecurityPolicy _could_ be too restrictive depending on the specifics of your release. Please make sure to check that the template fits with any customizations made or disable it by setting `rbac.pspEnabled` to `false`.
|
Though enough for the majority of installations, the default PodSecurityPolicy _could_ be too restrictive depending on the specifics of your release. Please make sure to check that the template fits with any customizations made or disable it by setting `rbac.pspEnabled` to `false`.
|
||||||
|
|
||||||
|
### VerticalPodAutoscaler
|
||||||
|
|
||||||
|
The chart can install a [`VerticalPodAutoscaler`](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md) for the Deployment if needed. A VPA can help minimize wasted resources when usage spikes periodically or remediate containers that are being OOMKilled.
|
||||||
|
|
||||||
|
The following example snippet can be used to install VPA that allows scaling down from the default recommendations of the deployment template:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
vpa:
|
||||||
|
enabled: true
|
||||||
|
containerPolicy:
|
||||||
|
minAllowed:
|
||||||
|
cpu: 20m
|
||||||
|
memory: 50Mi
|
||||||
|
```
|
||||||
|
|
||||||
{{ template "chart.valuesSection" . }}
|
{{ template "chart.valuesSection" . }}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{- if .Values.vpa.enabled -}}
|
||||||
|
apiVersion: autoscaling.k8s.io/v1
|
||||||
|
kind: VerticalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ include "cluster-autoscaler.labels" . | indent 4 }}
|
||||||
|
name: {{ template "cluster-autoscaler.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
targetRef:
|
||||||
|
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ template "cluster-autoscaler.fullname" . }}
|
||||||
|
updatePolicy:
|
||||||
|
updateMode: {{ .Values.vpa.updateMode | quote }}
|
||||||
|
resourcePolicy:
|
||||||
|
containerPolicies:
|
||||||
|
- containerName: {{ template "cluster-autoscaler.name" . }}
|
||||||
|
{{- .Values.vpa.containerPolicy | toYaml | nindent 6 }}
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -387,3 +387,12 @@ updateStrategy: {}
|
||||||
# maxSurge: 1
|
# maxSurge: 1
|
||||||
# maxUnavailable: 0
|
# maxUnavailable: 0
|
||||||
# type: RollingUpdate
|
# type: RollingUpdate
|
||||||
|
|
||||||
|
# vpa -- Configure a VerticalPodAutoscaler for the cluster-autoscaler Deployment.
|
||||||
|
vpa:
|
||||||
|
# vpa.enabled -- If true, creates a VerticalPodAutoscaler.
|
||||||
|
enabled: false
|
||||||
|
# vpa.updateMode -- [UpdateMode](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler/v0.13.0/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L124)
|
||||||
|
updateMode: "Auto"
|
||||||
|
# vpa.containerPolicy -- [ContainerResourcePolicy](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler/v0.13.0/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L159). The containerName is always et to the deployment's container name. This value is required if VPA is enabled.
|
||||||
|
containerPolicy: {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue