From 15e393bc3ae6bba0536b3559723272bf09316dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Prud=27homme?= Date: Tue, 10 Oct 2023 22:04:18 +0200 Subject: [PATCH] feat(vertical-pod-autoscaler): update registry.k8s.io/autoscaling/vpa to v1.0.0 --- charts/vertical-pod-autoscaler/Chart.yaml | 4 +- charts/vertical-pod-autoscaler/README.md | 15 ++++--- .../files/crds/verticalpodautoscalers.yaml | 42 +++++++++++++++++-- .../admission-controller/deployment.yaml | 10 +++-- .../templates/recommender/clusterrole.yaml | 8 +++- .../templates/recommender/deployment.yaml | 10 +++-- .../templates/updater/clusterrole.yaml | 2 - .../templates/updater/deployment.yaml | 10 +++-- charts/vertical-pod-autoscaler/values.yaml | 32 ++++++++++---- 9 files changed, 98 insertions(+), 35 deletions(-) diff --git a/charts/vertical-pod-autoscaler/Chart.yaml b/charts/vertical-pod-autoscaler/Chart.yaml index 6aba87b1c..315a2551a 100644 --- a/charts/vertical-pod-autoscaler/Chart.yaml +++ b/charts/vertical-pod-autoscaler/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.14.0 +appVersion: 1.0.0 description: Set of components that automatically adjust the amount of CPU and memory requested by pods running in the Kubernetes Cluster home: https://github.com/kubernetes/autoscaler icon: https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.svg @@ -10,7 +10,7 @@ name: vertical-pod-autoscaler sources: - https://github.com/kubernetes/autoscaler - https://github.com/cowboysysop/charts/tree/master/charts/vertical-pod-autoscaler -version: 9.3.0 +version: 9.2.0 dependencies: - name: common version: 2.9.0 diff --git a/charts/vertical-pod-autoscaler/README.md b/charts/vertical-pod-autoscaler/README.md index 4c900ac98..c1ace4e1e 100644 --- a/charts/vertical-pod-autoscaler/README.md +++ b/charts/vertical-pod-autoscaler/README.md @@ -147,7 +147,7 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `admissionController.replicaCount` | Number of replicas | `1` | | `admissionController.image.registry` | Image registry | `registry.k8s.io` | | `admissionController.image.repository` | Image repository | `autoscaling/vpa-admission-controller` | -| `admissionController.image.tag` | Image tag | `0.14.0` | +| `admissionController.image.tag` | Image tag | `1.0.0` | | `admissionController.image.digest` | Image digest | `""` | | `admissionController.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `admissionController.pdb.create` | Specifies whether a pod disruption budget should be created | `false` | @@ -162,6 +162,8 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `admissionController.podSecurityContext.runAsNonRoot` | Whether the container must run as a non-root user | `true` | | `admissionController.podSecurityContext.runAsUser` | The UID to run the entrypoint of the container process | `65534` | | `admissionController.priorityClassName` | Priority class name | `nil` | +| `admissionController.runtimeClassName` | Runtime class name | `""` | +| `admissionController.topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` | | `admissionController.securityContext` | Container security context | `{}` | | `admissionController.containerPorts.https` | Container port for HTTPS | `8000` | | `admissionController.containerPorts.metrics` | Container port for Metrics | `8944` | @@ -190,7 +192,6 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `admissionController.resources` | CPU/Memory resource requests/limits | `{}` | | `admissionController.nodeSelector` | Node labels for pod assignment | `{}` | | `admissionController.tolerations` | Tolerations for pod assignment | `[]` | -| `admissionController.topologySpreadConstraints` | Topology spread constraints for pod assignment | `[]` | | `admissionController.affinity` | Map of node/pod affinities | `{}` | | `admissionController.extraArgs` | Additional container arguments | | | `admissionController.extraArgs.v` | Number for the log level verbosity | `2` | @@ -223,7 +224,7 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `recommender.replicaCount` | Number of replicas | `1` | | `recommender.image.registry` | Image registry | `registry.k8s.io` | | `recommender.image.repository` | Image repository | `autoscaling/vpa-recommender` | -| `recommender.image.tag` | Image tag | `0.14.0` | +| `recommender.image.tag` | Image tag | `1.0.0` | | `recommender.image.digest` | Image digest | `""` | | `recommender.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `recommender.pdb.create` | Specifies whether a pod disruption budget should be created | `false` | @@ -238,6 +239,8 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `recommender.podSecurityContext.runAsNonRoot` | Whether the container must run as a non-root user | `true` | | `recommender.podSecurityContext.runAsUser` | The UID to run the entrypoint of the container process | `65534` | | `recommender.priorityClassName` | Priority class name | `nil` | +| `recommender.runtimeClassName` | Runtime class name | `""` | +| `recommender.topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` | | `recommender.securityContext` | Container security context | `{}` | | `recommender.containerPorts.metrics` | Container port for Metrics | `8942` | | `recommender.livenessProbe.enabled` | Enable liveness probe | `true` | @@ -261,7 +264,6 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `recommender.resources` | CPU/Memory resource requests/limits | `{}` | | `recommender.nodeSelector` | Node labels for pod assignment | `{}` | | `recommender.tolerations` | Tolerations for pod assignment | `[]` | -| `recommender.topologySpreadConstraints` | Topology spread constraints for pod assignment | `[]` | | `recommender.affinity` | Map of node/pod affinities | `{}` | | `recommender.extraArgs` | Additional container arguments | | | `recommender.extraArgs.v` | Number for the log level verbosity | `2` | @@ -291,7 +293,7 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `updater.replicaCount` | Number of replicas | `1` | | `updater.image.registry` | Image registry | `registry.k8s.io` | | `updater.image.repository` | Image repository | `autoscaling/vpa-updater` | -| `updater.image.tag` | Image tag | `0.14.0` | +| `updater.image.tag` | Image tag | `1.0.0` | | `updater.image.digest` | Image digest | `""` | | `updater.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `updater.pdb.create` | Specifies whether a pod disruption budget should be created | `false` | @@ -306,6 +308,8 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `updater.podSecurityContext.runAsNonRoot` | Whether the container must run as a non-root user | `true` | | `updater.podSecurityContext.runAsUser` | The UID to run the entrypoint of the container process | `65534` | | `updater.priorityClassName` | Priority class name | `nil` | +| `updater.runtimeClassName` | Runtime class name | `""` | +| `updater.topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` | | `updater.securityContext` | Container security context | `{}` | | `updater.containerPorts.metrics` | Container port for Metrics | `8943` | | `updater.livenessProbe.enabled` | Enable liveness probe | `true` | @@ -329,7 +333,6 @@ $ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io | `updater.resources` | CPU/Memory resource requests/limits | `{}` | | `updater.nodeSelector` | Node labels for pod assignment | `{}` | | `updater.tolerations` | Tolerations for pod assignment | `[]` | -| `updater.topologySpreadConstraints` | Topology spread constraints for pod assignment | `[]` | | `updater.affinity` | Map of node/pod affinities | `{}` | | `updater.extraArgs` | Additional container arguments | | | `updater.extraArgs.v` | Number for the log level verbosity | `2` | diff --git a/charts/vertical-pod-autoscaler/files/crds/verticalpodautoscalers.yaml b/charts/vertical-pod-autoscaler/files/crds/verticalpodautoscalers.yaml index 819d50734..e154142bf 100644 --- a/charts/vertical-pod-autoscaler/files/crds/verticalpodautoscalers.yaml +++ b/charts/vertical-pod-autoscaler/files/crds/verticalpodautoscalers.yaml @@ -163,7 +163,7 @@ spec: description: API version of the referent type: string kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' + description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' @@ -178,6 +178,39 @@ spec: pods. If not specified, all fields in the `PodUpdatePolicy` are set to their default values. properties: + evictionRequirements: + description: EvictionRequirements is a list of EvictionRequirements + that need to evaluate to true in order for a Pod to be evicted. + If more than one EvictionRequirement is specified, all of them + need to be fulfilled to allow eviction. + items: + description: EvictionRequirement defines a single condition + which needs to be true in order to evict a Pod + properties: + changeRequirement: + description: EvictionChangeRequirement refers to the relationship + between the new target recommendation for a Pod and its + current requests, what kind of change is necessary for + the Pod to be evicted + enum: + - TargetHigherThanRequests + - TargetLowerThanRequests + type: string + resource: + description: Resources is a list of one or more resources + that the condition applies to. If more than one resource + is given, the EvictionRequirement is fulfilled if at least + one resource meets `changeRequirement`. + items: + description: ResourceName is the name identifying various + resources in a ResourceList. + type: string + type: array + required: + - changeRequirement + - resource + type: object + type: array minReplicas: description: Minimal number of replicas which need to be alive for Updater to attempt pod eviction (pending other checks like @@ -312,7 +345,8 @@ spec: type: object served: true storage: true - subresources: {} + subresources: + status: {} - deprecated: true deprecationWarning: autoscaling.k8s.io/v1beta2 API is deprecated name: v1beta2 @@ -405,7 +439,7 @@ spec: description: API version of the referent type: string kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' + description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' @@ -547,3 +581,5 @@ spec: type: object served: true storage: false + subresources: + status: {} diff --git a/charts/vertical-pod-autoscaler/templates/admission-controller/deployment.yaml b/charts/vertical-pod-autoscaler/templates/admission-controller/deployment.yaml index 5c951efba..cb014a92a 100644 --- a/charts/vertical-pod-autoscaler/templates/admission-controller/deployment.yaml +++ b/charts/vertical-pod-autoscaler/templates/admission-controller/deployment.yaml @@ -42,7 +42,13 @@ spec: {{- if .Values.admissionController.priorityClassName }} priorityClassName: {{ .Values.admissionController.priorityClassName | quote }} {{- end }} + {{- if .Values.admissionController.runtimeClassName }} + runtimeClassName: {{ .Values.admissionController.runtimeClassName | quote }} + {{- end }} serviceAccountName: {{ include "vertical-pod-autoscaler.admissionController.serviceAccountName" . }} + {{- if .Values.admissionController.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.admissionController.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} securityContext: {{- toYaml .Values.admissionController.podSecurityContext | nindent 8 }} containers: @@ -134,10 +140,6 @@ spec: {{- with .Values.admissionController.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.admissionController.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: tls-secret diff --git a/charts/vertical-pod-autoscaler/templates/recommender/clusterrole.yaml b/charts/vertical-pod-autoscaler/templates/recommender/clusterrole.yaml index 5a46e863d..450bd9e08 100644 --- a/charts/vertical-pod-autoscaler/templates/recommender/clusterrole.yaml +++ b/charts/vertical-pod-autoscaler/templates/recommender/clusterrole.yaml @@ -48,7 +48,6 @@ rules: - get - list - watch - - patch - apiGroups: - "autoscaling.k8s.io" resources: @@ -57,6 +56,13 @@ rules: - get - list - watch + # system:vpa-status-actor + - apiGroups: + - "autoscaling.k8s.io" + resources: + - verticalpodautoscalers/status + verbs: + - get - patch # system:vpa-checkpoint-actor - apiGroups: diff --git a/charts/vertical-pod-autoscaler/templates/recommender/deployment.yaml b/charts/vertical-pod-autoscaler/templates/recommender/deployment.yaml index a5a79df11..ea84e09ec 100644 --- a/charts/vertical-pod-autoscaler/templates/recommender/deployment.yaml +++ b/charts/vertical-pod-autoscaler/templates/recommender/deployment.yaml @@ -40,7 +40,13 @@ spec: {{- if .Values.recommender.priorityClassName }} priorityClassName: {{ .Values.recommender.priorityClassName | quote }} {{- end }} + {{- if .Values.recommender.runtimeClassName }} + runtimeClassName: {{ .Values.recommender.runtimeClassName | quote }} + {{- end }} serviceAccountName: {{ include "vertical-pod-autoscaler.recommender.serviceAccountName" . }} + {{- if .Values.recommender.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.recommender.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} securityContext: {{- toYaml .Values.recommender.podSecurityContext | nindent 8 }} containers: @@ -120,7 +126,3 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.recommender.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/vertical-pod-autoscaler/templates/updater/clusterrole.yaml b/charts/vertical-pod-autoscaler/templates/updater/clusterrole.yaml index 51d1593fd..aaa241803 100644 --- a/charts/vertical-pod-autoscaler/templates/updater/clusterrole.yaml +++ b/charts/vertical-pod-autoscaler/templates/updater/clusterrole.yaml @@ -41,7 +41,6 @@ rules: - get - list - watch - - patch - apiGroups: - "autoscaling.k8s.io" resources: @@ -50,7 +49,6 @@ rules: - get - list - watch - - patch # system:vpa-target-reader - apiGroups: - "*" diff --git a/charts/vertical-pod-autoscaler/templates/updater/deployment.yaml b/charts/vertical-pod-autoscaler/templates/updater/deployment.yaml index 76041a609..1939e33e6 100644 --- a/charts/vertical-pod-autoscaler/templates/updater/deployment.yaml +++ b/charts/vertical-pod-autoscaler/templates/updater/deployment.yaml @@ -41,7 +41,13 @@ spec: {{- if .Values.updater.priorityClassName }} priorityClassName: {{ .Values.updater.priorityClassName | quote }} {{- end }} + {{- if .Values.updater.runtimeClassName }} + runtimeClassName: {{ .Values.updater.runtimeClassName | quote }} + {{- end }} serviceAccountName: {{ include "vertical-pod-autoscaler.updater.serviceAccountName" . }} + {{- if .Values.updater.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.updater.topologySpreadConstraints "context" .) | nindent 8 }} + {{- end }} securityContext: {{- toYaml .Values.updater.podSecurityContext | nindent 8 }} containers: @@ -123,8 +129,4 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.updater.topologySpreadConstraints }} - topologySpreadConstraints: - {{- toYaml . | nindent 8 }} - {{- end }} {{- end }} diff --git a/charts/vertical-pod-autoscaler/values.yaml b/charts/vertical-pod-autoscaler/values.yaml index a983de1b3..4da409d4b 100644 --- a/charts/vertical-pod-autoscaler/values.yaml +++ b/charts/vertical-pod-autoscaler/values.yaml @@ -95,6 +95,12 @@ admissionController: priorityClassName: # priorityClassName : high-priority + ## @param admissionController.runtimeClassName Runtime class name + runtimeClassName: "" + + ## @param admissionController.topologySpreadConstraints Topology Spread Constraints for pod assignment + topologySpreadConstraints: [] + ## @param admissionController.securityContext Container security context securityContext: {} # capabilities: @@ -198,9 +204,6 @@ admissionController: ## @param admissionController.tolerations Tolerations for pod assignment tolerations: [] - ## @param admissionController.topologySpreadConstraints Topology spread constraints for pod assignment - topologySpreadConstraints: [] - ## @param admissionController.affinity Map of node/pod affinities affinity: {} @@ -345,6 +348,12 @@ recommender: priorityClassName: # priorityClassName : high-priority + ## @param recommender.runtimeClassName Runtime class name + runtimeClassName: "" + + ## @param recommender.topologySpreadConstraints Topology Spread Constraints for pod assignment + topologySpreadConstraints: [] + ## @param recommender.securityContext Container security context securityContext: {} # capabilities: @@ -430,9 +439,6 @@ recommender: ## @param recommender.tolerations Tolerations for pod assignment tolerations: [] - ## @param recommender.topologySpreadConstraints Topology spread constraints for pod assignment - topologySpreadConstraints: [] - ## @param recommender.affinity Map of node/pod affinities affinity: {} @@ -446,6 +452,8 @@ recommender: # container-pod-name-label: pod_name # cpu-histogram-decay-half-life: 24h0m0s # cpu-integer-post-processor-enabled: false + # external-metrics-cpu-metric: "" + # external-metrics-memory-metric: "" # history-length: 8d # history-resolution: 1h # kube-api-burst: 10 @@ -458,6 +466,7 @@ recommender: # min-checkpoints: 10 # oom-bump-up-ratio: 1.2 # oom-min-bump-up-bytes: 104857600 + # password: "" # pod-label-prefix: pod_label_ # pod-name-label: kubernetes_pod_name # pod-namespace-label: kubernetes_namespace @@ -471,6 +480,8 @@ recommender: # recommender-name: default # storage: checkpoint # target-cpu-percentile: 0.9 + # use-external-metrics: false + # username: "" v: 2 # vpa-object-namespace: "" @@ -596,6 +607,12 @@ updater: priorityClassName: # priorityClassName : high-priority + ## @param updater.runtimeClassName Runtime class name + runtimeClassName: "" + + ## @param updater.topologySpreadConstraints Topology Spread Constraints for pod assignment + topologySpreadConstraints: [] + ## @param updater.securityContext Container security context securityContext: {} # capabilities: @@ -681,9 +698,6 @@ updater: ## @param updater.tolerations Tolerations for pod assignment tolerations: [] - ## @param updater.topologySpreadConstraints Topology spread constraints for pod assignment - topologySpreadConstraints: [] - ## @param updater.affinity Map of node/pod affinities affinity: {}