From c6e6a0b20f054e5d657640bb91fb551d6c17b148 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 11 May 2023 18:32:50 +0300 Subject: [PATCH] fix(autoscaler): switch from the deprecated beta version (v2beta2) to the GA version (v2) (#10) The previously used beta version of `HorizontalPodScaler`, `autoscaling/v2beta2`, has been deprecated and will be removed in Kubernetes v1.26. Upgrade to the GA version, `autoscaling/v2`, (available since v1.23) to be ready for the v1.26 upgrade. For more details see the [v1.26 deprecations guide][1] as well as xlts-dev/registry#304. [1]: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-26 --- README.md | 4 ++-- charts/verdaccio/Chart.yaml | 2 +- charts/verdaccio/templates/autoscaler.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6ccc678..a281127 100644 --- a/README.md +++ b/README.md @@ -139,8 +139,8 @@ and their default values. | `livenessProbe.failureThreshold` | Min failures for the probe to be considered failed | `3` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#probe-v1-core) | | `livenessProbe.successThreshold` | Min successes for the probe to be considered successful | `1` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#probe-v1-core) | | `autoscaler.enabled` | Whether to enable the HorizontalPodAutoscaler | `false` | | -| `autoscaler.minReplicas` | Lower limit for the number of replicas when scaling down, overrides `replicaCount` when `autoscaler` is `enabled` | `1` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#horizontalpodautoscalerspec-v2beta1-autoscaling) | -| `autoscaler.maxReplicas` | Upper limit for the number of replicas when scaling up | `1` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#horizontalpodautoscalerspec-v2beta1-autoscaling) | +| `autoscaler.minReplicas` | Lower limit for the number of replicas when scaling down, overrides `replicaCount` when `autoscaler` is `enabled` | `1` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#horizontalpodautoscaler-v2-autoscaling) | +| `autoscaler.maxReplicas` | Upper limit for the number of replicas when scaling up | `1` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#horizontalpodautoscaler-v2-autoscaling) | | `autoscaler.metrics` | List of `MetricSpec` objects to trigger scaling | `[]` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#metricspec-v2beta2-autoscaling) | | `topologySpreadConstraints` | List of `TopologySpreadConstraint` objects to apply to the pod(s) | `[]` | [1](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#topologyspreadconstraint-v1-core) | diff --git a/charts/verdaccio/Chart.yaml b/charts/verdaccio/Chart.yaml index af061f0..9301ba4 100644 --- a/charts/verdaccio/Chart.yaml +++ b/charts/verdaccio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A lightweight, private NPM proxy registry for GKE name: verdaccio-gke-charts -version: 0.2.8 +version: 0.3.0 appVersion: 5.14.0 home: https://xlts-dev.github.io/verdaccio-gke-charts/ icon: https://cdn.verdaccio.dev/logos/default.png diff --git a/charts/verdaccio/templates/autoscaler.yaml b/charts/verdaccio/templates/autoscaler.yaml index fb7a34d..d6eeb49 100644 --- a/charts/verdaccio/templates/autoscaler.yaml +++ b/charts/verdaccio/templates/autoscaler.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaler.enabled }} -apiVersion: autoscaling/v2beta2 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ template "verdaccio.fullname" . }}